[Gmp-commit] /home/hgfiles/gmp: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Wed Dec 16 21:03:57 CET 2009


details:   /home/hgfiles/gmp/rev/eaee366d77ee
changeset: 13094:eaee366d77ee
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 16 20:59:59 2009 +0100
description:
Update minithres.

details:   /home/hgfiles/gmp/rev/44c0b483fff1
changeset: 13095:44c0b483fff1
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Dec 16 21:03:54 2009 +0100
description:
Call refmpn_mul instead of refmpn_mul_basecase.

diffstat:

 ChangeLog                  |  7 +++++++
 mpn/minithres/gmp-mparam.h |  7 +++++--
 tests/mpn/t-bdiv.c         |  6 +++---
 tests/mpn/toom-shared.h    |  2 +-
 tests/refmpn.c             |  8 ++++----
 5 files changed, 20 insertions(+), 10 deletions(-)

diffs (112 lines):

diff -r 2bcc9cdf29da -r 44c0b483fff1 ChangeLog
--- a/ChangeLog	Wed Dec 16 19:52:54 2009 +0100
+++ b/ChangeLog	Wed Dec 16 21:03:54 2009 +0100
@@ -1,5 +1,12 @@
 2009-12-16  Torbjorn Granlund  <tege at gmplib.org>
 
+	* tests/mpn/t-bdiv.c (bdiv_q_valid_p, bdiv_qr_valid_p): Call refmpn_mul
+	instead of refmpn_mul_basecase.
+	* tests/mpn/toom-shared.h: Likewise.
+	* tests/refmpn.c (refmpn_mullo_n,refmpn_sqr,refmpn_mul_any): Likewise.
+
+	* minithres/gmp-mparam.h: Add new thresholds, trim old values.
+
 	* mpn/generic/powm.c: Use mp_bitcnt_t for bit counts.
 	Handle REDC_1_TO_REDC_N_THRESHOLD < MUL_TOOM22_THRESHOLD in
 	non-WANT_REDC_2 INNERLOOP expansion code.
diff -r 2bcc9cdf29da -r 44c0b483fff1 mpn/minithres/gmp-mparam.h
--- a/mpn/minithres/gmp-mparam.h	Wed Dec 16 19:52:54 2009 +0100
+++ b/mpn/minithres/gmp-mparam.h	Wed Dec 16 21:03:54 2009 +0100
@@ -30,11 +30,11 @@
 #define SQR_TOOM3_THRESHOLD              20
 #define SQR_TOOM4_THRESHOLD              24
 
-#define MUL_FFT_TABLE  {64-1, 256-1, 1024-1, 4096-1, 8192-1, 65536-1, 0}
+#define MUL_FFT_TABLE  {64, 256, 1024, 4096, 8192, 65536, 0}
 #define MUL_FFT_MODF_THRESHOLD  65
 #define MUL_FFT_THRESHOLD      200
 
-#define SQR_FFT_TABLE  {64-1, 256-1, 1024-1, 4096-1, 8192-1, 65536-1, 0}
+#define SQR_FFT_TABLE  {64, 256, 1024, 4096, 8192, 65536, 0}
 #define SQR_FFT_MODF_THRESHOLD  65
 #define SQR_FFT_THRESHOLD      200
 
@@ -49,6 +49,9 @@
 #define DC_BDIV_QR_THRESHOLD              4
 #define DC_BDIV_Q_THRESHOLD               4
 #define BINV_NEWTON_THRESHOLD             6
+#define INV_MULMOD_BNM1_THRESHOLD         2
+#define INV_NEWTON_THRESHOLD              6
+#define INV_APPR_THRESHOLD                4
 #define REDC_1_TO_REDC_N_THRESHOLD        4
 
 #define MATRIX22_STRASSEN_THRESHOLD       2
diff -r 2bcc9cdf29da -r 44c0b483fff1 tests/mpn/t-bdiv.c
--- a/tests/mpn/t-bdiv.c	Wed Dec 16 19:52:54 2009 +0100
+++ b/tests/mpn/t-bdiv.c	Wed Dec 16 21:03:54 2009 +0100
@@ -34,7 +34,7 @@
 
   TMP_MARK;
   tp = TMP_ALLOC_LIMBS (dn + nn);
-  refmpn_mul_basecase (tp, qp, nn, dp, dn);
+  refmpn_mul (tp, qp, nn, dp, dn);
   MPN_CMP (c, tp, np, nn);
   TMP_FREE;
 
@@ -56,9 +56,9 @@
   tp = TMP_ALLOC_LIMBS (nn);
 
   if (qn >= dn)
-    refmpn_mul_basecase (tp, qp, qn, dp, dn);
+    refmpn_mul (tp, qp, qn, dp, dn);
   else
-    refmpn_mul_basecase (tp, dp, dn, qp, qn);
+    refmpn_mul (tp, dp, dn, qp, qn);
 
   MPN_CMP (c, tp, np, qn);
   if (c)
diff -r 2bcc9cdf29da -r 44c0b483fff1 tests/mpn/toom-shared.h
--- a/tests/mpn/toom-shared.h	Wed Dec 16 19:52:54 2009 +0100
+++ b/tests/mpn/toom-shared.h	Wed Dec 16 21:03:54 2009 +0100
@@ -116,7 +116,7 @@
       s_after = scratch[itch];
 
       mpn_toomMN_mul (pp, ap, an, bp, bn, scratch);
-      refmpn_mul_basecase (refp, ap, an, bp, bn);
+      refmpn_mul (refp, ap, an, bp, bn);
       if (pp[-1] != p_before || pp[an + bn] != p_after
 	  || scratch[-1] != s_before || scratch[itch] != s_after
 	  || mpn_cmp (refp, pp, an + bn) != 0)
diff -r 2bcc9cdf29da -r 44c0b483fff1 tests/refmpn.c
--- a/tests/refmpn.c	Wed Dec 16 19:52:54 2009 +0100
+++ b/tests/refmpn.c	Wed Dec 16 21:03:54 2009 +0100
@@ -1526,7 +1526,7 @@
 refmpn_mullo_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)
 {
   mp_ptr tp = refmpn_malloc_limbs (2*size);
-  refmpn_mul_basecase (tp, up, size, vp, size);
+  refmpn_mul (tp, up, size, vp, size);
   refmpn_copyi (prodp, tp, size);
   free (tp);
 }
@@ -1534,7 +1534,7 @@
 void
 refmpn_sqr (mp_ptr dst, mp_srcptr src, mp_size_t size)
 {
-  refmpn_mul_basecase (dst, src, size, src, size);
+  refmpn_mul (dst, src, size, src, size);
 }
 
 /* Allowing usize<vsize, usize==0 or vsize==0. */
@@ -1563,9 +1563,9 @@
     }
 
   if (usize >= vsize)
-    refmpn_mul_basecase (prodp, up, usize, vp, vsize);
+    refmpn_mul (prodp, up, usize, vp, vsize);
   else
-    refmpn_mul_basecase (prodp, vp, vsize, up, usize);
+    refmpn_mul (prodp, vp, vsize, up, usize);
 }
 
 


More information about the gmp-commit mailing list