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

mercurial at gmplib.org mercurial at gmplib.org
Tue Jan 5 02:23:07 CET 2010


details:   /home/hgfiles/gmp/rev/95b4238c0c58
changeset: 13320:95b4238c0c58
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Jan 04 23:46:34 2010 +0100
description:
Separate tuning of modf and full products.

details:   /home/hgfiles/gmp/rev/41f1cb7dc5e2
changeset: 13321:41f1cb7dc5e2
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Tue Jan 05 02:23:03 2010 +0100
description:
Retune for corrected FFT tuning code.

diffstat:

 ChangeLog                             |   6 ++
 mpn/alpha/ev6/gmp-mparam.h            |  10 ++--
 mpn/arm/gmp-mparam.h                  |  16 +++---
 mpn/ia64/gmp-mparam.h                 |   6 +-
 mpn/pa32/hppa2_0/gmp-mparam.h         |   6 +-
 mpn/pa64/gmp-mparam.h                 |   6 +-
 mpn/powerpc32/750/gmp-mparam.h        |   6 +-
 mpn/powerpc32/gmp-mparam.h            |   6 +-
 mpn/powerpc64/mode64/p3/gmp-mparam.h  |   6 +-
 mpn/powerpc64/mode64/p4/gmp-mparam.h  |   6 +-
 mpn/powerpc64/mode64/p5/gmp-mparam.h  |   6 +-
 mpn/sparc32/v9/gmp-mparam.h           |  16 +++---
 mpn/sparc64/gmp-mparam.h              |  26 +++++-----
 mpn/sparc64/ultrasparc34/gmp-mparam.h |   6 +-
 mpn/x86/k6/gmp-mparam.h               |  10 ++--
 mpn/x86/k7/gmp-mparam.h               |   6 +-
 mpn/x86/p6/mmx/gmp-mparam.h           |   6 +-
 mpn/x86/p6/sse2/gmp-mparam.h          |   6 +-
 mpn/x86/pentium/mmx/gmp-mparam.h      |  14 +++---
 mpn/x86/pentium4/sse2/gmp-mparam.h    |   6 +-
 mpn/x86_64/atom/gmp-mparam.h          |   6 +-
 mpn/x86_64/core2/gmp-mparam.h         |   6 +-
 mpn/x86_64/corei/gmp-mparam.h         |   6 +-
 mpn/x86_64/gmp-mparam.h               |   6 +-
 mpn/x86_64/nano/gmp-mparam.h          |   6 +-
 tune/common.c                         |  12 +++++
 tune/speed.h                          |   2 +
 tune/tuneup.c                         |  80 ++++++++++++++++++++++------------
 28 files changed, 172 insertions(+), 128 deletions(-)

diffs (truncated from 849 to 300 lines):

diff -r 5a9cc22e310a -r 41f1cb7dc5e2 ChangeLog
--- a/ChangeLog	Mon Jan 04 21:24:09 2010 +0100
+++ b/ChangeLog	Tue Jan 05 02:23:03 2010 +0100
@@ -1,5 +1,11 @@
 2010-01-04  Torbjorn Granlund  <tege at gmplib.org>
 
+	* tune/tuneup.c (fft): Separate tuning of modf and full products.
+	(struct fft_param_t): New field, mul_modf_function.
+	(tune_fft_sqr): Fix typo.
+	(tune_fft_mul, tune_fft_sqr): Initialise mul_modf_function field.
+	* tune/common.c (speed_mpn_fft_mul, speed_mpn_fft_sqr): New functions.
+
 	* tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up.
 
 	* mpn/generic/mul.c: Simplify rational expression.
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/alpha/ev6/gmp-mparam.h
--- a/mpn/alpha/ev6/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/alpha/ev6/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -63,24 +63,24 @@
 
 #define MUL_FFT_TABLE  { 368, 864, 1984, 3840, 9216, 20480, 81920, 327680, 0 }
 #define MUL_FFT_MODF_THRESHOLD             464
-#define MUL_FFT_THRESHOLD                14336
+#define MUL_FFT_THRESHOLD                 7808
 
 #define SQR_FFT_TABLE  { 432, 864, 1856, 4864, 9216, 20480, 81920, 327680, 0 }
 #define SQR_FFT_MODF_THRESHOLD             408
-#define SQR_FFT_THRESHOLD                 9728
+#define SQR_FFT_THRESHOLD                 4736
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                 130
-#define MULLO_MUL_N_THRESHOLD            26736
+#define MULLO_MUL_N_THRESHOLD            15604
 
 #define DC_DIV_QR_THRESHOLD                119
 #define DC_DIVAPPR_Q_THRESHOLD             390
 #define DC_BDIV_QR_THRESHOLD               110
 #define DC_BDIV_Q_THRESHOLD                318
 
-#define INV_MULMOD_BNM1_THRESHOLD           82
+#define INV_MULMOD_BNM1_THRESHOLD          109
 #define INV_NEWTON_THRESHOLD               390
-#define INV_APPR_THRESHOLD                  54
+#define INV_APPR_THRESHOLD                 372
 
 #define BINV_NEWTON_THRESHOLD              393
 #define REDC_1_TO_REDC_N_THRESHOLD         110
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/arm/gmp-mparam.h
--- a/mpn/arm/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/arm/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -60,15 +60,15 @@
 
 #define MUL_FFT_TABLE  { 400, 928, 1664, 4608, 14336, 40960, 163840, 655360, 0 }
 #define MUL_FFT_MODF_THRESHOLD             416
-#define MUL_FFT_THRESHOLD                17408
+#define MUL_FFT_THRESHOLD                 7808
 
 #define SQR_FFT_TABLE  { 432, 928, 1920, 4608, 10240, 40960, 163840, 655360, 0 }
-#define SQR_FFT_MODF_THRESHOLD             392
-#define SQR_FFT_THRESHOLD                 2816
+#define SQR_FFT_MODF_THRESHOLD             448
+#define SQR_FFT_THRESHOLD                 5760
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                 120
-#define MULLO_MUL_N_THRESHOLD            34763
+#define MULLO_MUL_N_THRESHOLD            15203
 
 #define DC_DIV_QR_THRESHOLD                134
 #define DC_DIVAPPR_Q_THRESHOLD             442
@@ -82,11 +82,11 @@
 #define BINV_NEWTON_THRESHOLD              987
 #define REDC_1_TO_REDC_N_THRESHOLD         116
 
-#define MU_DIV_QR_THRESHOLD               1078
-#define MU_DIVAPPR_Q_THRESHOLD            3547
+#define MU_DIV_QR_THRESHOLD               2914
+#define MU_DIVAPPR_Q_THRESHOLD            3091
 #define MUPI_DIV_QR_THRESHOLD              221
-#define MU_BDIV_QR_THRESHOLD              2541
-#define MU_BDIV_Q_THRESHOLD               2801
+#define MU_BDIV_QR_THRESHOLD              2259
+#define MU_BDIV_Q_THRESHOLD               1414
 
 #define MATRIX22_STRASSEN_THRESHOLD         17
 #define HGCD_THRESHOLD                     109
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/ia64/gmp-mparam.h
--- a/mpn/ia64/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/ia64/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -58,15 +58,15 @@
 
 #define MUL_FFT_TABLE  { 560, 1184, 1856, 3840, 11264, 28672, 114688, 327680, 0 }
 #define MUL_FFT_MODF_THRESHOLD             944
-#define MUL_FFT_THRESHOLD                26624
+#define MUL_FFT_THRESHOLD                 9856
 
 #define SQR_FFT_TABLE  { 592, 1248, 1856, 3840, 11264, 28672, 81920, 327680, 0 }
 #define SQR_FFT_MODF_THRESHOLD             752
-#define SQR_FFT_THRESHOLD                18432
+#define SQR_FFT_THRESHOLD                 7552
 
 #define MULLO_BASECASE_THRESHOLD            17
 #define MULLO_DC_THRESHOLD                  84
-#define MULLO_MUL_N_THRESHOLD            27116
+#define MULLO_MUL_N_THRESHOLD            19187
 
 #define DC_DIV_QR_THRESHOLD                 68
 #define DC_DIVAPPR_Q_THRESHOLD             252
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/pa32/hppa2_0/gmp-mparam.h
--- a/mpn/pa32/hppa2_0/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/pa32/hppa2_0/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -62,15 +62,15 @@
 
 #define MUL_FFT_TABLE  { 304, 672, 896, 2560, 10240, 24576, 98304, 0 }
 #define MUL_FFT_MODF_THRESHOLD             296
-#define MUL_FFT_THRESHOLD                 2816
+#define MUL_FFT_THRESHOLD                 2112
 
 #define SQR_FFT_TABLE  { 304, 672, 1152, 2560, 6144, 24576, 98304, 0 }
 #define SQR_FFT_MODF_THRESHOLD             232
-#define SQR_FFT_THRESHOLD                 2304
+#define SQR_FFT_THRESHOLD                 1728
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                  90
-#define MULLO_MUL_N_THRESHOLD             3215
+#define MULLO_MUL_N_THRESHOLD             3176
 
 #define DC_DIV_QR_THRESHOLD                100
 #define DC_DIVAPPR_Q_THRESHOLD             342
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/pa64/gmp-mparam.h
--- a/mpn/pa64/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/pa64/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -60,15 +60,15 @@
 
 #define MUL_FFT_TABLE  { 400, 800, 1600, 2816, 7168, 20480, 81920, 327680, 0 }
 #define MUL_FFT_MODF_THRESHOLD             360
-#define MUL_FFT_THRESHOLD                 4608
+#define MUL_FFT_THRESHOLD                 2752
 
 #define SQR_FFT_TABLE  { 368, 800, 1728, 3328, 7168, 20480, 81920, 327680, 0 }
 #define SQR_FFT_MODF_THRESHOLD             264
-#define SQR_FFT_THRESHOLD                 2432
+#define SQR_FFT_THRESHOLD                 1856
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                 113
-#define MULLO_MUL_N_THRESHOLD             8648
+#define MULLO_MUL_N_THRESHOLD             5397
 
 #define DC_DIV_QR_THRESHOLD                155
 #define DC_DIVAPPR_Q_THRESHOLD             442
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/powerpc32/750/gmp-mparam.h
--- a/mpn/powerpc32/750/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/powerpc32/750/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -62,15 +62,15 @@
 
 #define MUL_FFT_TABLE  { 240, 672, 896, 2560, 6144, 40960, 98304, 393216, 0 }
 #define MUL_FFT_MODF_THRESHOLD             256
-#define MUL_FFT_THRESHOLD                 9216
+#define MUL_FFT_THRESHOLD                 3456
 
 #define SQR_FFT_TABLE  { 240, 544, 896, 2560, 6144, 24576, 98304, 393216, 0 }
 #define SQR_FFT_MODF_THRESHOLD             256
-#define SQR_FFT_THRESHOLD                 7168
+#define SQR_FFT_THRESHOLD                 2688
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                  33
-#define MULLO_MUL_N_THRESHOLD            18087
+#define MULLO_MUL_N_THRESHOLD             6633
 
 #define DC_DIV_QR_THRESHOLD                 31
 #define DC_DIVAPPR_Q_THRESHOLD             108
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/powerpc32/gmp-mparam.h
--- a/mpn/powerpc32/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/powerpc32/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -68,15 +68,15 @@
 
 #define MUL_FFT_TABLE  { 304, 672, 896, 2560, 6144, 24576, 98304, 0 }
 #define MUL_FFT_MODF_THRESHOLD             320
-#define MUL_FFT_THRESHOLD                28672
+#define MUL_FFT_THRESHOLD                 3712
 
 #define SQR_FFT_TABLE  { 272, 672, 1152, 2560, 10240, 40960, 98304, 0 }
 #define SQR_FFT_MODF_THRESHOLD             288
-#define SQR_FFT_THRESHOLD                 7168
+#define SQR_FFT_THRESHOLD                 2688
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                  45
-#define MULLO_MUL_N_THRESHOLD            29013
+#define MULLO_MUL_N_THRESHOLD             6633
 
 #define DC_DIV_QR_THRESHOLD                 43
 #define DC_DIVAPPR_Q_THRESHOLD             154
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/powerpc64/mode64/p3/gmp-mparam.h
--- a/mpn/powerpc64/mode64/p3/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/powerpc64/mode64/p3/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -55,15 +55,15 @@
 
 #define MUL_FFT_TABLE  { 208, 416, 1088, 1792, 5120, 12288, 81920, 196608, 0 }
 #define MUL_FFT_MODF_THRESHOLD             224
-#define MUL_FFT_THRESHOLD                10240
+#define MUL_FFT_THRESHOLD                 2688
 
 #define SQR_FFT_TABLE  { 208, 416, 960, 1792, 5120, 12288, 49152, 196608, 0 }
 #define SQR_FFT_MODF_THRESHOLD             224
-#define SQR_FFT_THRESHOLD                 3584
+#define SQR_FFT_THRESHOLD                 2176
 
 #define MULLO_BASECASE_THRESHOLD             3
 #define MULLO_DC_THRESHOLD                  27
-#define MULLO_MUL_N_THRESHOLD            10323
+#define MULLO_MUL_N_THRESHOLD             4940
 
 #define DC_DIV_QR_THRESHOLD                 27
 #define DC_DIVAPPR_Q_THRESHOLD              95
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/powerpc64/mode64/p4/gmp-mparam.h
--- a/mpn/powerpc64/mode64/p4/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/powerpc64/mode64/p4/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -55,15 +55,15 @@
 
 #define MUL_FFT_TABLE  { 368, 544, 1856, 2816, 7168, 20480, 81920, 327680, 0 }
 #define MUL_FFT_MODF_THRESHOLD             384
-#define MUL_FFT_THRESHOLD                18432
+#define MUL_FFT_THRESHOLD                 9472
 
 #define SQR_FFT_TABLE  { 304, 672, 1600, 2816, 7168, 20480, 81920, 196608, 0 }
 #define SQR_FFT_MODF_THRESHOLD             320
-#define SQR_FFT_THRESHOLD                 7680
+#define SQR_FFT_THRESHOLD                 7424
 
 #define MULLO_BASECASE_THRESHOLD             5
 #define MULLO_DC_THRESHOLD                  34
-#define MULLO_MUL_N_THRESHOLD            26552
+#define MULLO_MUL_N_THRESHOLD            18629
 
 #define DC_DIV_QR_THRESHOLD                 30
 #define DC_DIVAPPR_Q_THRESHOLD             103
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/powerpc64/mode64/p5/gmp-mparam.h
--- a/mpn/powerpc64/mode64/p5/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/powerpc64/mode64/p5/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -57,15 +57,15 @@
 
 #define MUL_FFT_TABLE  { 336, 736, 1728, 2816, 7168, 20480, 81920, 196608, 0 }
 #define MUL_FFT_MODF_THRESHOLD             352
-#define MUL_FFT_THRESHOLD                 5632
+#define MUL_FFT_THRESHOLD                 3712
 
 #define SQR_FFT_TABLE  { 304, 608, 1472, 2816, 7168, 20480, 49152, 196608, 0 }
 #define SQR_FFT_MODF_THRESHOLD             320
-#define SQR_FFT_THRESHOLD                 4608
+#define SQR_FFT_THRESHOLD                 2752
 
 #define MULLO_BASECASE_THRESHOLD             2
 #define MULLO_DC_THRESHOLD                  31
-#define MULLO_MUL_N_THRESHOLD             8648
+#define MULLO_MUL_N_THRESHOLD             6633
 
 #define DC_DIV_QR_THRESHOLD                 29
 #define DC_DIVAPPR_Q_THRESHOLD             102
diff -r 5a9cc22e310a -r 41f1cb7dc5e2 mpn/sparc32/v9/gmp-mparam.h
--- a/mpn/sparc32/v9/gmp-mparam.h	Mon Jan 04 21:24:09 2010 +0100
+++ b/mpn/sparc32/v9/gmp-mparam.h	Tue Jan 05 02:23:03 2010 +0100
@@ -58,15 +58,15 @@
 
 #define MUL_FFT_TABLE  { 272, 736, 1152, 3584, 10240, 24576, 98304, 917504, 0 }
 #define MUL_FFT_MODF_THRESHOLD             248
-#define MUL_FFT_THRESHOLD                 3840
+#define MUL_FFT_THRESHOLD                 2112
 
 #define SQR_FFT_TABLE  { 336, 800, 1408, 3584, 10240, 24576, 98304, 393216, 0 }
 #define SQR_FFT_MODF_THRESHOLD             248
-#define SQR_FFT_THRESHOLD                 3328
+#define SQR_FFT_THRESHOLD                 2112
 
 #define MULLO_BASECASE_THRESHOLD             0  /* always */
 #define MULLO_DC_THRESHOLD                 106
-#define MULLO_MUL_N_THRESHOLD             6675
+#define MULLO_MUL_N_THRESHOLD             3493
 
 #define DC_DIV_QR_THRESHOLD                123
 #define DC_DIVAPPR_Q_THRESHOLD             396
@@ -80,11 +80,11 @@
 #define BINV_NEWTON_THRESHOLD              324
 #define REDC_1_TO_REDC_N_THRESHOLD          78
 
-#define MU_DIV_QR_THRESHOLD               1142
-#define MU_DIVAPPR_Q_THRESHOLD            1334
-#define MUPI_DIV_QR_THRESHOLD              130
-#define MU_BDIV_QR_THRESHOLD               855
-#define MU_BDIV_Q_THRESHOLD               1258
+#define MU_DIV_QR_THRESHOLD               1895
+#define MU_DIVAPPR_Q_THRESHOLD            1895
+#define MUPI_DIV_QR_THRESHOLD              122
+#define MU_BDIV_QR_THRESHOLD               872
+#define MU_BDIV_Q_THRESHOLD               2801
 


More information about the gmp-commit mailing list