summaryrefslogtreecommitdiff
path: root/tune
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2011-08-07 21:28:02 +0200
committerTorbjorn Granlund <tege@gmplib.org>2011-08-07 21:28:02 +0200
commit174d4fd334cb6dce6a09e4ce3edb33bdd19d938a (patch)
tree996385720c9357186939de8f032050b76c39bcfe /tune
parent385eadb78463524370526fb012f38d037cb3f7fe (diff)
downloadgmp-174d4fd334cb6dce6a09e4ce3edb33bdd19d938a.tar.gz
Use integer fields for mp_bases logarithm tables.
Diffstat (limited to 'tune')
-rw-r--r--tune/speed.h7
-rw-r--r--tune/tuneup.c3
2 files changed, 4 insertions, 6 deletions
diff --git a/tune/speed.h b/tune/speed.h
index 1ed35266a..48a420668 100644
--- a/tune/speed.h
+++ b/tune/speed.h
@@ -1,7 +1,7 @@
/* Header for speed and threshold things.
-Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010 Free
-Software Foundation, Inc.
+Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010, 2011
+Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -2974,8 +2974,7 @@ int speed_routine_count_zeros_setup
for (i = 0; i < s->size; i++) \
xp[i] = s->xp[i] % base; \
\
- wn = ((mp_size_t) (s->size / mp_bases[base].chars_per_bit_exactly)) \
- / GMP_LIMB_BITS + 2; \
+ LIMBS_PER_DIGIT_IN_BASE (wn, s->size, base); \
SPEED_TMP_ALLOC_LIMBS (wp, wn, s->align_wp); \
\
/* use this during development to check wn is big enough */ \
diff --git a/tune/tuneup.c b/tune/tuneup.c
index 8a82e06b5..88ee2158b 100644
--- a/tune/tuneup.c
+++ b/tune/tuneup.c
@@ -2344,8 +2344,7 @@ speed_mpn_pre_set_str (struct speed_params *s)
for (i = 0; i < s->size; i++)
str[i] = s->xp[i] % base;
- wn = ((mp_size_t) (s->size / mp_bases[base].chars_per_bit_exactly))
- / GMP_LIMB_BITS + 2;
+ LIMBS_PER_DIGIT_IN_BASE (wn, s->size, base);
SPEED_TMP_ALLOC_LIMBS (wp, wn, s->align_wp);
/* use this during development to check wn is big enough */