[Gmp-commit] /home/hgfiles/gmp: Threshold variables updates.
mercurial at gmplib.org
mercurial at gmplib.org
Mon Jan 4 15:33:12 CET 2010
details: /home/hgfiles/gmp/rev/2d42e08c2a06
changeset: 13315:2d42e08c2a06
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Jan 04 15:33:10 2010 +0100
description:
Threshold variables updates.
diffstat:
ChangeLog | 7 +
gmp-impl.h | 502 ++++++++++++++++++++++++++++-----------------------------
tune/tuneup.c | 21 +-
3 files changed, 266 insertions(+), 264 deletions(-)
diffs (truncated from 616 to 300 lines):
diff -r bb05b07b0435 -r 2d42e08c2a06 ChangeLog
--- a/ChangeLog Sun Jan 03 13:57:29 2010 +0100
+++ b/ChangeLog Mon Jan 04 15:33:10 2010 +0100
@@ -1,3 +1,10 @@
+2010-01-04 Torbjorn Granlund <tege at gmplib.org>
+
+ * gmp-impl.h: Cleanup threshold variables; remove obsolete ones and
+ make all possibly needed definitions for existing ones.
+ * tune/tuneup.c (tune_mul): Write fractions-compensated values to
+ threshold variables.
+
2010-01-03 Marco Bodrato <bodrato at mail.dm.unipi.it>
* tune/common.c, tune/speed.c, tune/speed.h: Support measuring
diff -r bb05b07b0435 -r 2d42e08c2a06 gmp-impl.h
--- a/gmp-impl.h Sun Jan 03 13:57:29 2010 +0100
+++ b/gmp-impl.h Mon Jan 04 15:33:10 2010 +0100
@@ -574,15 +574,8 @@
/* Set various *_THRESHOLD values to be used for nails. Thus we avoid using
code that has not yet been qualified. */
-#undef DIV_SB_PREINV_THRESHOLD
-#undef DC_DIV_QR_THRESHOLD
-#undef POWM_THRESHOLD
-#define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX
+#undef DC_DIV_QR_THRESHOLD
#define DC_DIV_QR_THRESHOLD 50
-#define POWM_THRESHOLD 0
-
-#undef GCD_ACCEL_THRESHOLD
-#define GCD_ACCEL_THRESHOLD 3
#undef DIVREM_1_NORM_THRESHOLD
#undef DIVREM_1_UNNORM_THRESHOLD
@@ -1758,18 +1751,14 @@
#define SQR_TOOM3_THRESHOLD_LIMIT SQR_TOOM3_THRESHOLD
#endif
+#ifndef DC_DIV_QR_THRESHOLD
+#define DC_DIV_QR_THRESHOLD 50
+#endif
+
#ifndef DC_DIVAPPR_Q_THRESHOLD
#define DC_DIVAPPR_Q_THRESHOLD 200
#endif
-#ifndef DC_DIV_QR_THRESHOLD
-#define DC_DIV_QR_THRESHOLD 50
-#endif
-
-#ifndef DC_DIV_Q_THRESHOLD
-#define DC_DIV_Q_THRESHOLD 228
-#endif
-
#ifndef DC_BDIV_QR_THRESHOLD
#define DC_BDIV_QR_THRESHOLD 50
#endif
@@ -4200,253 +4189,254 @@
on #ifdef in the .c files. For some this is not so (the defaults are
instead established above), but all are done this way for consistency. */
-#undef MUL_TOOM22_THRESHOLD
-#define MUL_TOOM22_THRESHOLD mul_toom22_threshold
-extern mp_size_t mul_toom22_threshold;
-
-#undef MUL_TOOM33_THRESHOLD
-#define MUL_TOOM33_THRESHOLD mul_toom33_threshold
-extern mp_size_t mul_toom33_threshold;
-
-#undef MUL_TOOM44_THRESHOLD
-#define MUL_TOOM44_THRESHOLD mul_toom44_threshold
-extern mp_size_t mul_toom44_threshold;
-
-#undef MUL_TOOM6H_THRESHOLD
-#define MUL_TOOM6H_THRESHOLD mul_toom6h_threshold
-extern mp_size_t mul_toom6h_threshold;
-
-#undef MUL_TOOM8H_THRESHOLD
-#define MUL_TOOM8H_THRESHOLD mul_toom8h_threshold
-extern mp_size_t mul_toom8h_threshold;
-
-#undef MUL_TOOM32_TO_TOOM43_THRESHOLD
-#define MUL_TOOM32_TO_TOOM43_THRESHOLD mul_toom32_to_toom43_threshold
-extern mp_size_t mul_toom32_to_toom43_threshold;
-
-#undef MUL_TOOM32_TO_TOOM53_THRESHOLD
-#define MUL_TOOM32_TO_TOOM53_THRESHOLD mul_toom32_to_toom53_threshold
-extern mp_size_t mul_toom32_to_toom53_threshold;
-
-#undef MUL_TOOM42_TO_TOOM53_THRESHOLD
-#define MUL_TOOM42_TO_TOOM53_THRESHOLD mul_toom42_to_toom53_threshold
-extern mp_size_t mul_toom42_to_toom53_threshold;
-
-#undef MUL_TOOM42_TO_TOOM63_THRESHOLD
-#define MUL_TOOM42_TO_TOOM63_THRESHOLD mul_toom42_to_toom63_threshold
-extern mp_size_t mul_toom42_to_toom63_threshold;
-
-#undef MUL_FFT_THRESHOLD
-#define MUL_FFT_THRESHOLD mul_fft_threshold
-extern mp_size_t mul_fft_threshold;
-
-#undef MUL_FFT_MODF_THRESHOLD
-#define MUL_FFT_MODF_THRESHOLD mul_fft_modf_threshold
-extern mp_size_t mul_fft_modf_threshold;
-
-#undef MUL_FFT_TABLE
-#define MUL_FFT_TABLE { 0 }
+#undef MUL_TOOM22_THRESHOLD
+#define MUL_TOOM22_THRESHOLD mul_toom22_threshold
+extern mp_size_t mul_toom22_threshold;
+
+#undef MUL_TOOM33_THRESHOLD
+#define MUL_TOOM33_THRESHOLD mul_toom33_threshold
+extern mp_size_t mul_toom33_threshold;
+
+#undef MUL_TOOM44_THRESHOLD
+#define MUL_TOOM44_THRESHOLD mul_toom44_threshold
+extern mp_size_t mul_toom44_threshold;
+
+#undef MUL_TOOM6H_THRESHOLD
+#define MUL_TOOM6H_THRESHOLD mul_toom6h_threshold
+extern mp_size_t mul_toom6h_threshold;
+
+#undef MUL_TOOM8H_THRESHOLD
+#define MUL_TOOM8H_THRESHOLD mul_toom8h_threshold
+extern mp_size_t mul_toom8h_threshold;
+
+#undef MUL_TOOM32_TO_TOOM43_THRESHOLD
+#define MUL_TOOM32_TO_TOOM43_THRESHOLD mul_toom32_to_toom43_threshold
+extern mp_size_t mul_toom32_to_toom43_threshold;
+
+#undef MUL_TOOM32_TO_TOOM53_THRESHOLD
+#define MUL_TOOM32_TO_TOOM53_THRESHOLD mul_toom32_to_toom53_threshold
+extern mp_size_t mul_toom32_to_toom53_threshold;
+
+#undef MUL_TOOM42_TO_TOOM53_THRESHOLD
+#define MUL_TOOM42_TO_TOOM53_THRESHOLD mul_toom42_to_toom53_threshold
+extern mp_size_t mul_toom42_to_toom53_threshold;
+
+#undef MUL_TOOM42_TO_TOOM63_THRESHOLD
+#define MUL_TOOM42_TO_TOOM63_THRESHOLD mul_toom42_to_toom63_threshold
+extern mp_size_t mul_toom42_to_toom63_threshold;
+
+#undef MUL_FFT_THRESHOLD
+#define MUL_FFT_THRESHOLD mul_fft_threshold
+extern mp_size_t mul_fft_threshold;
+
+#undef MUL_FFT_MODF_THRESHOLD
+#define MUL_FFT_MODF_THRESHOLD mul_fft_modf_threshold
+extern mp_size_t mul_fft_modf_threshold;
+
+#undef MUL_FFT_TABLE
+#define MUL_FFT_TABLE { 0 }
/* A native mpn_sqr_basecase is not tuned and SQR_BASECASE_THRESHOLD should
remain as zero (always use it). */
#if ! HAVE_NATIVE_mpn_sqr_basecase
-#undef SQR_BASECASE_THRESHOLD
-#define SQR_BASECASE_THRESHOLD sqr_basecase_threshold
-extern mp_size_t sqr_basecase_threshold;
+#undef SQR_BASECASE_THRESHOLD
+#define SQR_BASECASE_THRESHOLD sqr_basecase_threshold
+extern mp_size_t sqr_basecase_threshold;
#endif
#if TUNE_PROGRAM_BUILD_SQR
-#undef SQR_TOOM2_THRESHOLD
-#define SQR_TOOM2_THRESHOLD SQR_TOOM2_MAX_GENERIC
+#undef SQR_TOOM2_THRESHOLD
+#define SQR_TOOM2_THRESHOLD SQR_TOOM2_MAX_GENERIC
#else
-#undef SQR_TOOM2_THRESHOLD
-#define SQR_TOOM2_THRESHOLD sqr_toom2_threshold
-extern mp_size_t sqr_toom2_threshold;
-#endif
-
-#undef SQR_TOOM3_THRESHOLD
-#define SQR_TOOM3_THRESHOLD sqr_toom3_threshold
-extern mp_size_t sqr_toom3_threshold;
-
-#undef SQR_TOOM4_THRESHOLD
-#define SQR_TOOM4_THRESHOLD sqr_toom4_threshold
-extern mp_size_t sqr_toom4_threshold;
-
-#undef SQR_TOOM6_THRESHOLD
-#define SQR_TOOM6_THRESHOLD sqr_toom6_threshold
-extern mp_size_t sqr_toom6_threshold;
-
-#undef SQR_TOOM8_THRESHOLD
-#define SQR_TOOM8_THRESHOLD sqr_toom8_threshold
-extern mp_size_t sqr_toom8_threshold;
-
-#undef SQR_FFT_THRESHOLD
-#define SQR_FFT_THRESHOLD sqr_fft_threshold
-extern mp_size_t sqr_fft_threshold;
-
-#undef SQR_FFT_MODF_THRESHOLD
-#define SQR_FFT_MODF_THRESHOLD sqr_fft_modf_threshold
-extern mp_size_t sqr_fft_modf_threshold;
-
-#undef SQR_FFT_TABLE
-#define SQR_FFT_TABLE { 0 }
-
-#undef MULLO_BASECASE_THRESHOLD
-#define MULLO_BASECASE_THRESHOLD mullo_basecase_threshold
-extern mp_size_t mullo_basecase_threshold;
-
-#undef MULLO_DC_THRESHOLD
-#define MULLO_DC_THRESHOLD mullo_dc_threshold
-extern mp_size_t mullo_dc_threshold;
-
-#undef MULLO_MUL_N_THRESHOLD
-#define MULLO_MUL_N_THRESHOLD mullo_mul_n_threshold
-extern mp_size_t mullo_mul_n_threshold;
-
+#undef SQR_TOOM2_THRESHOLD
+#define SQR_TOOM2_THRESHOLD sqr_toom2_threshold
+extern mp_size_t sqr_toom2_threshold;
+#endif
+
+#undef SQR_TOOM3_THRESHOLD
+#define SQR_TOOM3_THRESHOLD sqr_toom3_threshold
+extern mp_size_t sqr_toom3_threshold;
+
+#undef SQR_TOOM4_THRESHOLD
+#define SQR_TOOM4_THRESHOLD sqr_toom4_threshold
+extern mp_size_t sqr_toom4_threshold;
+
+#undef SQR_TOOM6_THRESHOLD
+#define SQR_TOOM6_THRESHOLD sqr_toom6_threshold
+extern mp_size_t sqr_toom6_threshold;
+
+#undef SQR_TOOM8_THRESHOLD
+#define SQR_TOOM8_THRESHOLD sqr_toom8_threshold
+extern mp_size_t sqr_toom8_threshold;
+
+#undef SQR_FFT_THRESHOLD
+#define SQR_FFT_THRESHOLD sqr_fft_threshold
+extern mp_size_t sqr_fft_threshold;
+
+#undef SQR_FFT_MODF_THRESHOLD
+#define SQR_FFT_MODF_THRESHOLD sqr_fft_modf_threshold
+extern mp_size_t sqr_fft_modf_threshold;
+
+#undef SQR_FFT_TABLE
+#define SQR_FFT_TABLE { 0 }
+
+#undef MULLO_BASECASE_THRESHOLD
+#define MULLO_BASECASE_THRESHOLD mullo_basecase_threshold
+extern mp_size_t mullo_basecase_threshold;
+
+#undef MULLO_DC_THRESHOLD
+#define MULLO_DC_THRESHOLD mullo_dc_threshold
+extern mp_size_t mullo_dc_threshold;
+
+#undef MULLO_MUL_N_THRESHOLD
+#define MULLO_MUL_N_THRESHOLD mullo_mul_n_threshold
+extern mp_size_t mullo_mul_n_threshold;
+
+#undef DC_DIV_QR_THRESHOLD
+#define DC_DIV_QR_THRESHOLD dc_div_qr_threshold
+extern mp_size_t dc_div_qr_threshold;
+
+#undef DC_DIVAPPR_Q_THRESHOLD
+#define DC_DIVAPPR_Q_THRESHOLD dc_divappr_q_threshold
+extern mp_size_t dc_divappr_q_threshold;
+
+#undef DC_BDIV_Q_THRESHOLD
+#define DC_BDIV_Q_THRESHOLD dc_bdiv_q_threshold
+extern mp_size_t dc_bdiv_q_threshold;
+
+#undef DC_BDIV_QR_THRESHOLD
+#define DC_BDIV_QR_THRESHOLD dc_bdiv_qr_threshold
+extern mp_size_t dc_bdiv_qr_threshold;
+
+#undef MU_DIV_QR_THRESHOLD
+#define MU_DIV_QR_THRESHOLD mu_div_qr_threshold
+extern mp_size_t mu_div_qr_threshold;
+
+#undef MU_DIVAPPR_Q_THRESHOLD
+#define MU_DIVAPPR_Q_THRESHOLD mu_divappr_q_threshold
+extern mp_size_t mu_divappr_q_threshold;
+
+#undef MUPI_DIV_QR_THRESHOLD
+#define MUPI_DIV_QR_THRESHOLD mupi_div_qr_threshold
+extern mp_size_t mupi_div_qr_threshold;
+
+#undef MU_BDIV_QR_THRESHOLD
+#define MU_BDIV_QR_THRESHOLD mu_bdiv_qr_threshold
+extern mp_size_t mu_bdiv_qr_threshold;
+
+#undef MU_BDIV_Q_THRESHOLD
+#define MU_BDIV_Q_THRESHOLD mu_bdiv_q_threshold
+extern mp_size_t mu_bdiv_q_threshold;
+
+#undef INV_MULMOD_BNM1_THRESHOLD
+#define INV_MULMOD_BNM1_THRESHOLD inv_mulmod_bnm1_threshold
+extern mp_size_t inv_mulmod_bnm1_threshold;
+
+#undef INV_NEWTON_THRESHOLD
More information about the gmp-commit
mailing list