#15820: Implement sequences of bounded integers
--------------------------------------------+------------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-6.2
Component: algebra | Resolution:
Keywords: sequence bounded integer | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
--------------------------------------------+------------------------
Comment (by SimonKing):
Replying to [comment:33 ncohen]:
> > Sure. And you want to do this same computation `10^7` times?
>
> I don't get it. If the width is a power of two, then there are 6
possible values, i.e. 2^1, 2^2, 2^3, 2^4, 2^5, 2^6. Otherwise you have at
most 64, but really who cares in the end ?
Apparently I am not used to templated code...
I was somehow thinking that you suggested to keep the bitlength of the
upper bound for the integers as the ''only'' parameter, which means that
you would need to compute all the other things either for each operation
or (when storing it as attribute of the sequences) for each sequence.
> I am thinking of this :
> http://stackoverflow.com/questions/4840819/c-template-specialization-
with-constant-value
>
> That's C++, and I don't see how to do it in Cython, though.
Part of the question is: Do we want to use gmp as backend? Or do we want
to (re-)implement operations on densely packed `long*` by ourselves? Given
the timings, gmp ''is'' an option.
Anyway, I'll have a look at the stackoverflow discussion. Thank you for
the pointer!
The next question then is how to access the code from Cython. I've done
this with C, but not C++.
--
Ticket URL: <http://trac.sagemath.org/ticket/15820#comment:34>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.