mpz_limbs interface

Niels Möller nisse at lysator.liu.se
Sat Feb 8 08:50:34 UTC 2014


bodrato at mail.dm.unipi.it writes:

> So, maybe we can discuss about adding a new function to the _limbs interface:
>
> mp_ptr
> mpz_init_limbs_write (mpz_t x, mp_size_t n)
> {
>   ALLOC (x) = n;
>   PTR (x) = (mp_ptr) (*__gmp_allocate_func) (n*GMP_LIMB_BYTES);
>   SIZ (x) = 0;
>
>   return PTR (x);
> }

What is this intended for? Looks a bit like like mpz_init2.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list