[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Mon Feb 17 21:13:28 UTC 2014


details:   /var/hg/gmp/rev/56eeb2b201fb
changeset: 16306:56eeb2b201fb
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Mon Feb 17 22:04:45 2014 +0100
description:
Ensure DIV_QR_1_NORM_THRESHOLD, DIV_QR_1_UNNORM_THRESHOLD >= 1.

details:   /var/hg/gmp/rev/fbc681680129
changeset: 16307:fbc681680129
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Mon Feb 17 22:08:47 2014 +0100
description:
Up DIV_QR_1_NORM_THRESHOLD to 1.

details:   /var/hg/gmp/rev/4560d88e082a
changeset: 16308:4560d88e082a
user:      Niels M?ller <nisse at lysator.liu.se>
date:      Mon Feb 17 22:13:07 2014 +0100
description:
Revert fix for handling DIV_QR_1_NORM_THRESHOLD == 0.

diffstat:

 ChangeLog                    |  11 +++++++++++
 mpn/generic/div_qr_1.c       |   3 +--
 mpn/s390_64/gmp-mparam.h     |   2 +-
 mpn/s390_64/z10/gmp-mparam.h |   2 +-
 tune/tuneup.c                |   4 ++++
 5 files changed, 18 insertions(+), 4 deletions(-)

diffs (83 lines):

diff -r df5e57333079 -r 4560d88e082a ChangeLog
--- a/ChangeLog	Sun Feb 16 07:08:24 2014 +0100
+++ b/ChangeLog	Mon Feb 17 22:13:07 2014 +0100
@@ -1,3 +1,14 @@
+2014-02-17  Niels Möller  <nisse at lysator.liu.se>
+
+	* mpn/generic/div_qr_1.c (mpn_div_qr_1): Revert yesterday's fix.
+	Hopefully no longer needed.
+
+	* mpn/s390_64/gmp-mparam.h (DIV_QR_1_NORM_THRESHOLD): Up to 1.
+	* mpn/s390_64/z10/gmp-mparam.h (DIV_QR_1_NORM_THRESHOLD): Up to 1.
+
+	* tune/tuneup.c (tune_div_qr_1): Ensure DIV_QR_1_NORM_THRESHOLD,
+	DIV_QR_1_UNNORM_THRESHOLD >= 1.
+
 2014-02-16 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpn/generic/div_qr_1.c: Disallow DIV_QR_1_NORM_THRESHOLD==0.
diff -r df5e57333079 -r 4560d88e082a mpn/generic/div_qr_1.c
--- a/mpn/generic/div_qr_1.c	Sun Feb 16 07:08:24 2014 +0100
+++ b/mpn/generic/div_qr_1.c	Mon Feb 17 22:13:07 2014 +0100
@@ -35,7 +35,6 @@
 #include "gmp-impl.h"
 #include "longlong.h"
 
-/* FIXME: Add proper tuning */
 #ifndef DIV_QR_1_NORM_THRESHOLD
 #define DIV_QR_1_NORM_THRESHOLD 3
 #endif
@@ -70,7 +69,7 @@
       *qh = q;
       uh -= (-q) & d;
 
-      if (BELOW_THRESHOLD (n, DIV_QR_1_NORM_THRESHOLD | (DIV_QR_1_NORM_THRESHOLD==0)))
+      if (BELOW_THRESHOLD (n, DIV_QR_1_NORM_THRESHOLD))
 	{
 	  cnt = 0;
 	plain:
diff -r df5e57333079 -r 4560d88e082a mpn/s390_64/gmp-mparam.h
--- a/mpn/s390_64/gmp-mparam.h	Sun Feb 16 07:08:24 2014 +0100
+++ b/mpn/s390_64/gmp-mparam.h	Mon Feb 17 22:13:07 2014 +0100
@@ -45,7 +45,7 @@
 #define PREINV_MOD_1_TO_MOD_1_THRESHOLD     17
 #define USE_PREINV_DIVREM_1                  1
 #define DIV_QR_1N_PI1_METHOD                 1
-#define DIV_QR_1_NORM_THRESHOLD              0  /* always */
+#define DIV_QR_1_NORM_THRESHOLD              1
 #define DIV_QR_1_UNNORM_THRESHOLD        MP_SIZE_T_MAX  /* never */
 #define DIV_QR_2_PI2_THRESHOLD           MP_SIZE_T_MAX  /* never */
 #define DIVEXACT_1_THRESHOLD                 0  /* always */
diff -r df5e57333079 -r 4560d88e082a mpn/s390_64/z10/gmp-mparam.h
--- a/mpn/s390_64/z10/gmp-mparam.h	Sun Feb 16 07:08:24 2014 +0100
+++ b/mpn/s390_64/z10/gmp-mparam.h	Mon Feb 17 22:13:07 2014 +0100
@@ -43,7 +43,7 @@
 #define PREINV_MOD_1_TO_MOD_1_THRESHOLD     29
 #define USE_PREINV_DIVREM_1                  1
 #define DIV_QR_1N_PI1_METHOD                 1
-#define DIV_QR_1_NORM_THRESHOLD              0  /* always */
+#define DIV_QR_1_NORM_THRESHOLD              1
 #define DIV_QR_1_UNNORM_THRESHOLD        MP_SIZE_T_MAX  /* never */
 #define DIV_QR_2_PI2_THRESHOLD           MP_SIZE_T_MAX  /* never */
 #define DIVEXACT_1_THRESHOLD                 0  /* always */
diff -r df5e57333079 -r 4560d88e082a tune/tuneup.c
--- a/tune/tuneup.c	Sun Feb 16 07:08:24 2014 +0100
+++ b/tune/tuneup.c	Mon Feb 17 22:13:07 2014 +0100
@@ -2083,6 +2083,8 @@
     static struct param_t  param;
     param.name = "DIV_QR_1_NORM_THRESHOLD";
     DIV_1_PARAMS;
+    param.min_size = 1;
+    param.min_is_always = 0;
     s.r = randlimb_norm ();
     param.function = speed_mpn_div_qr_1_tune;
     one (&div_qr_1_norm_threshold, &param);
@@ -2091,6 +2093,8 @@
     static struct param_t  param;
     param.name = "DIV_QR_1_UNNORM_THRESHOLD";
     DIV_1_PARAMS;
+    param.min_size = 1;
+    param.min_is_always = 0;
     s.r = randlimb_half();
     param.function = speed_mpn_div_qr_1_tune;
     one (&div_qr_1_unnorm_threshold, &param);


More information about the gmp-commit mailing list