mpn_sizeinbase

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Thu Jun 21 19:10:20 CEST 2012


Ciao,

Il Gio, 14 Giugno 2012 9:42 pm, bodrato at mail.dm.unipi.it ha scritto:
> 2) gmp-impl.h defines the unused macro MPN_SIZEINBASE_16.
> Can we remove it?

I suggest to replace it with the macro MPN_SIZEINBASE_2EXP currently
defined in mpz/export.c .

This macro should be used also to count the size in bits, with base2exp=1,
in e.g. mpz/n_pow_ui.c, mpz/get_d_2exp.c, mpn/rootrem.c, mpn/powlo.c ...
This way we can have all of them supporting nails the same way.

But the question is: which type should we use for _SIZEINBASE internals?
I'm tempted to use mp_bitcnt_t, but both mpn_sizeinbase and mpz_sizeinbase
return a size_t. Suggestions?

Regards,
m

-- 
http://bodrato.it/software/strassen.html




More information about the gmp-devel mailing list