Variadic function for multiplications with mpz_t
Ha T. Lam
hatlam at gmail.com
Mon Jan 12 22:36:07 UTC 2015
Unfortunately, there are a lot of GMP functions that are not available
with the wrapper class, e.g. invert, gcd, nextprime, (non-negative) mod,
etc. I end up converting between the C++ class and the C functions so often
that I decided to go with the C functions instead, despite being not very
comfortable with C.
On Mon, Jan 12, 2015 at 2:22 PM, Hans Aberg <haberg-1 at telia.com> wrote:
>
> > On 12 Jan 2015, at 17:43, Marc Glisse <marc.glisse at inria.fr> wrote:
> >
> > On Mon, 12 Jan 2015, Torbjörn Granlund wrote:
>
> >> Or is there another solution?
> >
> > Use C++ instead ;-)
>
> C++11 is rather stable at this point, and compilers optimize fairly
> aggressively. For example, a class with move assignment/constructor, e =
> a*b + c*d in Clang of OS X 10.10.2 seems to invoke only one move (no
> copying); if I write the operations out:
> a*b
> c*d
> a*b + c*d
> e = std::move(a*b+c*d)
>
>
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss
>
More information about the gmp-discuss
mailing list