vincent at vinc17.net
Wed Jan 15 23:00:14 UTC 2014
On 2014-01-15 23:54:27 +0100, Vincent Lefevre wrote:
> On 2014-01-15 23:23:28 +0100, Niels Möller wrote:
> > Zimmermann Paul <Paul.Zimmermann at inria.fr> writes:
> > >> #define GMP_NUMB_BITS 64
> > It would make sense to have this (and GMP_LIMB_BITS) in mini-gmp.h. But
> > the definition (which must be portable and not depending on configure)
> > is
> > #define GMP_LIMB_BITS (sizeof(mp_limb_t) * CHAR_BIT)
> > which depends on <limits.h>. And unlike GMP's definition, it's not a
> > preprocessor constant, so it's not a fully compatible substitute (#if
> > GMP_LIMB_BITS == 64 won't work with mini-gmp).
> > If you need a preprocessor constant, I think it has to be defined (or
> > redefined) outside of mini-gmp.h.
> Yes, we need a preprocessor constant. But we could have a configure
> test (run if --enable-mini-gmp was used) to define it.
Well, this would mean that we would have to get rid of GMP_LIMB_BITS
in mpfr.h, but here we don't see a preprocessor constant, so that we
could replace it by sizeof(mp_limb_t) * CHAR_BIT.
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the gmp-devel