summaryrefslogtreecommitdiff
path: root/gmp-impl.h
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2014-06-09 14:46:00 +0200
committerTorbjorn Granlund <tege@gmplib.org>2014-06-09 14:46:00 +0200
commitc1b7f5bcca10cf3373f91356beec3dad886cf404 (patch)
treef87fc84aaddd77c3344231f406de2aebcd12d982 /gmp-impl.h
parentbf303e59fdcd0c5df7b82055bb82928b663794d4 (diff)
downloadgmp-c1b7f5bcca10cf3373f91356beec3dad886cf404.tar.gz
Move MULLO THRESHOLDs to gmp-impl.h.
Diffstat (limited to 'gmp-impl.h')
-rw-r--r--gmp-impl.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/gmp-impl.h b/gmp-impl.h
index b42dc477c..099eb31af 100644
--- a/gmp-impl.h
+++ b/gmp-impl.h
@@ -2069,7 +2069,7 @@ __GMP_DECLSPEC mp_limb_t gmp_primesieve (mp_ptr, mp_limb_t);
should be used, and that may be never. */
#ifndef SQR_BASECASE_THRESHOLD
-#define SQR_BASECASE_THRESHOLD 0
+#define SQR_BASECASE_THRESHOLD 0 /* never use mpn_mul_basecase */
#endif
#ifndef SQR_TOOM2_THRESHOLD
@@ -2093,8 +2093,20 @@ __GMP_DECLSPEC mp_limb_t gmp_primesieve (mp_ptr, mp_limb_t);
#define MULMID_TOOM42_THRESHOLD MUL_TOOM22_THRESHOLD
#endif
+#ifndef MULLO_BASECASE_THRESHOLD
+#define MULLO_BASECASE_THRESHOLD 0 /* never use mpn_mul_basecase */
+#endif
+
+#ifndef MULLO_DC_THRESHOLD
+#define MULLO_DC_THRESHOLD (2*MUL_TOOM22_THRESHOLD)
+#endif
+
+#ifndef MULLO_MUL_N_THRESHOLD
+#define MULLO_MUL_N_THRESHOLD (2*MUL_FFT_THRESHOLD)
+#endif
+
#ifndef DC_DIV_QR_THRESHOLD
-#define DC_DIV_QR_THRESHOLD 50
+#define DC_DIV_QR_THRESHOLD (2*MUL_TOOM22_THRESHOLD)
#endif
#ifndef DC_DIVAPPR_Q_THRESHOLD
@@ -2102,7 +2114,7 @@ __GMP_DECLSPEC mp_limb_t gmp_primesieve (mp_ptr, mp_limb_t);
#endif
#ifndef DC_BDIV_QR_THRESHOLD
-#define DC_BDIV_QR_THRESHOLD 50
+#define DC_BDIV_QR_THRESHOLD (2*MUL_TOOM22_THRESHOLD)
#endif
#ifndef DC_BDIV_Q_THRESHOLD
@@ -2114,7 +2126,7 @@ __GMP_DECLSPEC mp_limb_t gmp_primesieve (mp_ptr, mp_limb_t);
#endif
#ifndef INV_MULMOD_BNM1_THRESHOLD
-#define INV_MULMOD_BNM1_THRESHOLD (5*MULMOD_BNM1_THRESHOLD)
+#define INV_MULMOD_BNM1_THRESHOLD (4*MULMOD_BNM1_THRESHOLD)
#endif
#ifndef INV_APPR_THRESHOLD