_mp_alloc vs ALLOC

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Wed Feb 22 20:28:52 CET 2012


Ciao,

Il Mer, 22 Febbraio 2012 7:41 pm, Torbjorn Granlund ha scritto:
> Marc Glisse <marc.glisse at inria.fr> writes:

>   their length. By the way, is there any difference between PTR and
>   LIMBS? Say one that should be used in some circumstances and one in
>   others?
>
> You're welcome to clean up this.  The macro LIMBS is used in just one
> file, AFAICT, I have  no idea why it exists

I suspect there are other unused macros hanging in gmp-impl.h ...

>   Unrelated, I was thinking of changing (when gmp is compiled with a C++
...
>   TMP_DECL and TMP_FREE so TMP_DECL would create a variable whose

Unrelated :-) We might define more macros like TMP_ALLOC_LIMBS_2 . I mean
_3 and _4. So that they can be used to reduce the number of allocations.
Do you agree? (I just touched mpz/gcdext.c, and _4 should be used there).

Regards,
m

-- 
http://bodrato.it/



More information about the gmp-devel mailing list