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

mercurial at gmplib.org mercurial at gmplib.org
Wed Mar 7 19:57:00 CET 2012


details:   /var/hg/gmp/rev/73dd17c8aec2
changeset: 14733:73dd17c8aec2
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 07 19:43:14 2012 +0100
description:
Remove parameter names from prototypes.

details:   /var/hg/gmp/rev/d2e9ad6a7aaa
changeset: 14734:d2e9ad6a7aaa
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 07 19:52:35 2012 +0100
description:
Better handle situation where redc_2 is never faster.

details:   /var/hg/gmp/rev/da659f29cea2
changeset: 14735:da659f29cea2
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 07 19:56:58 2012 +0100
description:
Handle AMD 11h correctly.

diffstat:

 ChangeLog     |   7 +++++++
 config.guess  |   4 ++--
 tests/tests.h |  14 +++++++-------
 tune/tuneup.c |  26 +++++++++++++++++---------
 4 files changed, 33 insertions(+), 18 deletions(-)

diffs (111 lines):

diff -r 2bd67045652a -r da659f29cea2 ChangeLog
--- a/ChangeLog	Tue Mar 06 23:35:44 2012 +0100
+++ b/ChangeLog	Wed Mar 07 19:56:58 2012 +0100
@@ -1,3 +1,10 @@
+2012-03-07  Torbjorn Granlund  <tege at gmplib.org>
+
+	* config.guess: Handle AMD 11h correctly.
+
+	* tune/tuneup.c (tune_redc): Better handle situation where redc_2 is
+	never faster.
+
 2012-03-06  Torbjorn Granlund  <tege at gmplib.org>
 
 	* mpn/x86_64/bobcat/mul_basecase.asm: New file.
diff -r 2bd67045652a -r da659f29cea2 config.guess
--- a/config.guess	Tue Mar 06 23:35:44 2012 +0100
+++ b/config.guess	Wed Mar 07 19:56:58 2012 +0100
@@ -808,8 +808,8 @@
 	case 16:		/* K10 */
 	  cpu_64bit = 1, modelstr = "k10";
 	  break;
-	case 17:		/* AMD Internal, assume future K10 */
-	  cpu_64bit = 1, modelstr = "k10";
+	case 17:		/* Hybrid k8/k10, claim k8 */
+	  cpu_64bit = 1, modelstr = "k8";
 	  break;
 	case 18:		/* Llano, uses K10 core */
 	  cpu_64bit = 1, modelstr = "k10";
diff -r 2bd67045652a -r da659f29cea2 tests/tests.h
--- a/tests/tests.h	Tue Mar 06 23:35:44 2012 +0100
+++ b/tests/tests.h	Wed Mar 07 19:56:58 2012 +0100
@@ -43,11 +43,11 @@
 
 void tests_memory_start (void);
 void tests_memory_end (void);
-void *tests_allocate (size_t size);
-void *tests_reallocate (void *ptr, size_t old_size, size_t new_size);
-void tests_free (void *ptr, size_t size);
-void tests_free_nosize (void *ptr);
-int tests_memory_valid (void *ptr);
+void *tests_allocate (size_t);
+void *tests_reallocate (void *, size_t, size_t);
+void tests_free (void *, size_t);
+void tests_free_nosize (void *);
+int tests_memory_valid (void *);
 
 void tests_rand_start (void);
 void tests_rand_end (void);
@@ -94,7 +94,7 @@
 
 extern int mp_trace_base;
 void mp_limb_trace (const char *, mp_limb_t);
-void mpn_trace (const char *name, mp_srcptr ptr, mp_size_t size);
+void mpn_trace (const char *, mp_srcptr, mp_size_t);
 void mpn_tracea (const char *, const mp_ptr *, int, mp_size_t);
 void mpn_tracen (const char *, int, mp_srcptr, mp_size_t);
 void mpn_trace_file (const char *, mp_srcptr, mp_size_t);
@@ -152,7 +152,7 @@
 
 
 void refmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr);
-void refmpf_add_ulp (mpf_ptr f);
+void refmpf_add_ulp (mpf_ptr );
 void refmpf_fill (mpf_ptr, mp_size_t, mp_limb_t);
 void refmpf_normalize (mpf_ptr);
 void refmpf_set_prec_limbs (mpf_ptr, unsigned long);
diff -r 2bd67045652a -r da659f29cea2 tune/tuneup.c
--- a/tune/tuneup.c	Tue Mar 06 23:35:44 2012 +0100
+++ b/tune/tuneup.c	Wed Mar 07 19:56:58 2012 +0100
@@ -1715,6 +1715,7 @@
     param.min_is_always = 1;
     param.max_size = TUNE_REDC_2_MAX;
     param.noprint = 1;
+    param.stop_factor = 1.5;
     one (&redc_1_to_redc_2_threshold, &param);
   }
   {
@@ -1726,17 +1727,24 @@
     param.noprint = 1;
     one (&redc_2_to_redc_n_threshold, &param);
   }
-  if (redc_1_to_redc_2_threshold >= TUNE_REDC_2_MAX - 1)
+  if (redc_1_to_redc_2_threshold >= redc_2_to_redc_n_threshold)
     {
-      /* Disable REDC_2.  This is not supposed to happen.  */
-      print_define ("REDC_1_TO_REDC_2_THRESHOLD", REDC_2_TO_REDC_N_THRESHOLD);
-      print_define_remark ("REDC_2_TO_REDC_N_THRESHOLD", 0, "anomaly: never REDC_2");
+      redc_2_to_redc_n_threshold = 0;	/* disable redc_2 */
+
+      /* Never use redc2, measure redc_1 -> redc_n cutoff, store result as
+	 REDC_1_TO_REDC_2_THRESHOLD.  */
+      {
+	static struct param_t  param;
+	param.name = "REDC_1_TO_REDC_2_THRESHOLD";
+	param.function = speed_mpn_redc_1;
+	param.function2 = speed_mpn_redc_n;
+	param.min_size = 16;
+	param.noprint = 1;
+	one (&redc_1_to_redc_2_threshold, &param);
+      }
     }
-  else
-    {
-      print_define ("REDC_1_TO_REDC_2_THRESHOLD", REDC_1_TO_REDC_2_THRESHOLD);
-      print_define ("REDC_2_TO_REDC_N_THRESHOLD", REDC_2_TO_REDC_N_THRESHOLD);
-    }
+  print_define ("REDC_1_TO_REDC_2_THRESHOLD", REDC_1_TO_REDC_2_THRESHOLD);
+  print_define ("REDC_2_TO_REDC_N_THRESHOLD", REDC_2_TO_REDC_N_THRESHOLD);
 #else
   {
     static struct param_t  param;


More information about the gmp-commit mailing list