[Gmp-commit] /home/hgfiles/gmp: Nailify toom_interpolate_8pts.

mercurial at gmplib.org mercurial at gmplib.org
Sat Dec 19 15:19:58 CET 2009


details:   /home/hgfiles/gmp/rev/56803d9847d5
changeset: 13134:56803d9847d5
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sat Dec 19 15:19:52 2009 +0100
description:
Nailify toom_interpolate_8pts.

diffstat:

 ChangeLog                           |  4 ++++
 mpn/generic/toom_interpolate_8pts.c |  7 ++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diffs (41 lines):

diff -r 336b010057a5 -r 56803d9847d5 ChangeLog
--- a/ChangeLog	Sat Dec 19 10:46:38 2009 +0100
+++ b/ChangeLog	Sat Dec 19 15:19:52 2009 +0100
@@ -1,3 +1,7 @@
+2009-12-19  Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpn/generic/toom_interpolate_8pts.c: Nailify.
+
 2009-12-19  Torbjorn Granlund  <tege at gmplib.org>
 
 	* gmp-impl.h (mpn_rsh1add_nc, mpn_rsh1sub_nc): Declare.
diff -r 336b010057a5 -r 56803d9847d5 mpn/generic/toom_interpolate_8pts.c
--- a/mpn/generic/toom_interpolate_8pts.c	Sat Dec 19 10:46:38 2009 +0100
+++ b/mpn/generic/toom_interpolate_8pts.c	Sat Dec 19 15:19:52 2009 +0100
@@ -31,7 +31,7 @@
 #define BINVERT_15 \
   ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15)
 
-#define BINVERT_45 (BINVERT_15 * BINVERT_3)
+#define BINVERT_45 ((BINVERT_15 * BINVERT_3) & GMP_NUMB_MASK)
 
 #ifndef mpn_divexact_by3
 #if HAVE_NATIVE_mpn_bdiv_q_1_pi1
@@ -42,12 +42,17 @@
 #endif
 
 #ifndef mpn_divexact_by45
+#if GMP_NUMB_BITS % 12 == 0
+#define mpn_divexact_by45(dst,src,size) \
+  (63 & 19 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 45)))
+#else
 #if HAVE_NATIVE_mpn_bdiv_q_1_pi1
 #define mpn_divexact_by45(dst,src,size) mpn_bdiv_q_1_pi1(dst,src,size,45,BINVERT_45,0)
 #else
 #define mpn_divexact_by45(dst,src,size) mpn_divexact_1(dst,src,size,45)
 #endif
 #endif
+#endif
 
 #if HAVE_NATIVE_mpn_sublsh_n
 #define DO_mpn_sublsh_n(dst,src,n,s,ws) mpn_sublsh_n (dst,src,n,s)


More information about the gmp-commit mailing list