diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-01-08 00:30:06 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-01-08 00:30:06 +0100 |
commit | 039211c27cde1b2923947f29698166a453892fb4 (patch) | |
tree | 12d6c83fc21b634355f0f9d8a904a541ea88b03e /tune/speed.c | |
parent | ca9f7dd73391d4958e3602469242c275c601cf2a (diff) | |
download | gmp-039211c27cde1b2923947f29698166a453892fb4.tar.gz |
* tune/speed.c (r_string): "r" is a limb, use BITS_PER_MP_LIMB and
change LONG_ONES to LIMB_ONES.
Diffstat (limited to 'tune/speed.c')
-rw-r--r-- | tune/speed.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tune/speed.c b/tune/speed.c index ded31f2a4..390f3d858 100644 --- a/tune/speed.c +++ b/tune/speed.c @@ -656,8 +656,9 @@ run_gnuplot (int argc, char *argv[]) /* Return a long with n many one bits (starting from the least significant) */ -#define LONG_ONES(n) \ - ((n) == BITS_PER_LONGINT ? -1L : (n) == 0 ? 0L : (1L << (n)) - 1) + +#define LIMB_ONES(n) \ + ((n) == BITS_PER_MP_LIMB ? -1L : (n) == 0 ? 0L : (1L << (n)) - 1) mp_limb_t r_string (const char *s) @@ -692,24 +693,24 @@ r_string (const char *s) if (strcmp (s, "bits") == 0) { mp_limb_t l; - if (n > BITS_PER_LONGINT) + if (n > BITS_PER_MP_LIMB) { fprintf (stderr, "%ld bit parameter invalid (max %d bits)\n", - n, BITS_PER_LONGINT); + n, BITS_PER_MP_LIMB); exit (1); } mpn_random (&l, 1); - return (l | (1 << (n-1))) & LONG_ONES(n); + return (l | (1 << (n-1))) & LIMB_ONES(n); } else if (strcmp (s, "ones") == 0) { - if (n > BITS_PER_LONGINT) + if (n > BITS_PER_MP_LIMB) { fprintf (stderr, "%ld bit parameter invalid (max %d bits)\n", - n, BITS_PER_LONGINT); + n, BITS_PER_MP_LIMB); exit (1); } - return LONG_ONES (n); + return LIMB_ONES (n); } else if (*s != '\0') { |