[Gmp-commit] /home/hgfiles/gmp: (INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOL...

mercurial at gmplib.org mercurial at gmplib.org
Sun Jan 3 02:32:46 CET 2010


details:   /home/hgfiles/gmp/rev/f4f1d573513b
changeset: 13305:f4f1d573513b
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Sun Jan 03 02:32:43 2010 +0100
description:
(INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOLD): Default in gmp-impl.h.

diffstat:

 ChangeLog                |  4 ++++
 gmp-impl.h               |  8 ++++++++
 mpn/generic/invert.c     |  4 ----
 mpn/generic/invertappr.c |  4 ----
 4 files changed, 12 insertions(+), 8 deletions(-)

diffs (59 lines):

diff -r edfe946a4af6 -r f4f1d573513b ChangeLog
--- a/ChangeLog	Sun Jan 03 00:53:53 2010 +0100
+++ b/ChangeLog	Sun Jan 03 02:32:43 2010 +0100
@@ -1,5 +1,9 @@
 2010-01-03  Torbjorn Granlund  <tege at gmplib.org>
 
+	* gmp-impl.h (INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOLD): Default
+	here...
+	* mpn/generic/invert.c, mpn/generic/invertappr.c: ...not here.
+
 	* tests/mpn/t-div.c: Rewrite operand generation code.
 
 2010-01-02  Torbjorn Granlund  <tege at gmplib.org>
diff -r edfe946a4af6 -r f4f1d573513b gmp-impl.h
--- a/gmp-impl.h	Sun Jan 03 00:53:53 2010 +0100
+++ b/gmp-impl.h	Sun Jan 03 02:32:43 2010 +0100
@@ -1782,6 +1782,14 @@
 #define DIVEXACT_JEB_THRESHOLD           25
 #endif
 
+#ifndef INV_MULMOD_BNM1_THRESHOLD
+#define INV_MULMOD_BNM1_THRESHOLD  (5*MULMOD_BNM1_THRESHOLD)
+#endif
+
+#ifndef INV_APPR_THRESHOLD
+#define INV_APPR_THRESHOLD         INV_NEWTON_THRESHOLD
+#endif
+
 #ifndef INV_NEWTON_THRESHOLD
 #define INV_NEWTON_THRESHOLD            200
 #endif
diff -r edfe946a4af6 -r f4f1d573513b mpn/generic/invert.c
--- a/mpn/generic/invert.c	Sun Jan 03 00:53:53 2010 +0100
+++ b/mpn/generic/invert.c	Sun Jan 03 02:32:43 2010 +0100
@@ -31,10 +31,6 @@
 #include "gmp-impl.h"
 #include "longlong.h"
 
-#ifndef INV_APPR_THRESHOLD
-#define INV_APPR_THRESHOLD INV_NEWTON_THRESHOLD
-#endif
-
 void
 mpn_invert (mp_ptr ip, mp_srcptr dp, mp_size_t n, mp_ptr scratch)
 {
diff -r edfe946a4af6 -r f4f1d573513b mpn/generic/invertappr.c
--- a/mpn/generic/invertappr.c	Sun Jan 03 00:53:53 2010 +0100
+++ b/mpn/generic/invertappr.c	Sun Jan 03 02:32:43 2010 +0100
@@ -37,10 +37,6 @@
 #include "gmp-impl.h"
 #include "longlong.h"
 
-#ifndef INV_MULMOD_BNM1_THRESHOLD
-#define INV_MULMOD_BNM1_THRESHOLD (5*MULMOD_BNM1_THRESHOLD)
-#endif
-
 /* FIXME: The iterative version splits the operand in two slighty unbalanced
    parts, the use of log_2 (or counting the bits) underestimate the maximum
    number of iterations.  */


More information about the gmp-commit mailing list