[Gmp-commit] /home/hgfiles/gmp: (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clea...

mercurial at gmplib.org mercurial at gmplib.org
Mon Jan 4 21:23:24 CET 2010


details:   /home/hgfiles/gmp/rev/dfe7965fe2ea
changeset: 13317:dfe7965fe2ea
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jan 04 21:23:22 2010 +0100
description:
(SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up.

diffstat:

 ChangeLog    |   2 ++
 tune/speed.h |  13 +++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (49 lines):

diff -r f4ed09601598 -r dfe7965fe2ea ChangeLog
--- a/ChangeLog	Mon Jan 04 15:49:38 2010 +0100
+++ b/ChangeLog	Mon Jan 04 21:23:22 2010 +0100
@@ -1,5 +1,7 @@
 2010-01-04  Torbjorn Granlund  <tege at gmplib.org>
 
+	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up.
+
 	* mpn/generic/mul.c: Simplify rational expression.
 
 	* gmp-impl.h: Cleanup threshold variables; remove obsolete ones and
diff -r f4ed09601598 -r dfe7965fe2ea tune/speed.h
--- a/tune/speed.h	Mon Jan 04 15:49:38 2010 +0100
+++ b/tune/speed.h	Mon Jan 04 21:23:22 2010 +0100
@@ -1055,27 +1055,28 @@
     mp_ptr    wp, tp;							\
     unsigned  i;							\
     double    t;							\
-    mp_size_t size;							\
+    mp_size_t size, itch;						\
     TMP_DECL;								\
 									\
     SPEED_RESTRICT_COND (s->size >= 1);					\
 									\
     size = mpn_mulmod_bnm1_next_size (s->size);				\
+    itch = mpn_mulmod_bnm1_itch (size);					\
 									\
     TMP_MARK;								\
-    SPEED_TMP_ALLOC_LIMBS (wp, 2*size, s->align_wp); /* FIXME 2* */	\
-    SPEED_TMP_ALLOC_LIMBS (tp, 3 * size + 100, s->align_wp2);		\
+    SPEED_TMP_ALLOC_LIMBS (wp, size, s->align_wp);			\
+    SPEED_TMP_ALLOC_LIMBS (tp, itch, s->align_wp2);			\
 									\
     speed_operand_src (s, s->xp, s->size);				\
     speed_operand_src (s, s->yp, s->size);				\
-    speed_operand_dst (s, wp, 2 * size);				\
-    speed_operand_dst (s, tp, 3 * size + 100); /* FIXME: Use itch function */ \
+    speed_operand_dst (s, wp, size);					\
+    speed_operand_dst (s, tp, itch);					\
     speed_cache_fill (s);						\
 									\
     speed_starttime ();							\
     i = s->reps;							\
     do									\
-      function (wp, size, s->xp, s->size, s->yp, s->size, tp);	\
+      function (wp, size, s->xp, s->size, s->yp, s->size, tp);		\
     while (--i != 0);							\
     t = speed_endtime ();						\
 									\


More information about the gmp-commit mailing list