summaryrefslogtreecommitdiff
path: root/tune
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2015-08-25 20:05:04 +0200
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2015-08-25 20:05:04 +0200
commit19a1b94980b59e407c44628fcc019798622230dc (patch)
tree3de919815e78483a22b33c74202d5156abac3d83 /tune
parentb61347c97b9e1e1f59b0299378cc7bba02ba8482 (diff)
downloadgmp-19a1b94980b59e407c44628fcc019798622230dc.tar.gz
tune/tuneup.c (tune_mullo): Set MULLO_MUL_N_THRESHOLD to never
whenever the FFT threshold does not exist.
Diffstat (limited to 'tune')
-rw-r--r--tune/tuneup.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/tune/tuneup.c b/tune/tuneup.c
index 283e919eb..65f0fe08c 100644
--- a/tune/tuneup.c
+++ b/tune/tuneup.c
@@ -1379,17 +1379,18 @@ tune_mullo (void)
print_define ("MULLO_DC_THRESHOLD", mullo_dc_threshold);
}
-#if WANT_FFT
- param.name = "MULLO_MUL_N_THRESHOLD";
- param.min_size = mullo_dc_threshold;
- param.max_size = 2 * mul_fft_threshold;
- param.noprint = 0;
- param.step_factor = 0.03;
- one (&mullo_mul_n_threshold, &param);
-#else
- print_define_remark ("MULLO_MUL_N_THRESHOLD", MP_SIZE_T_MAX,
- "without FFT use mullo forever");
-#endif
+ if (WANT_FFT && mul_fft_threshold < MP_SIZE_T_MAX / 2)
+ {
+ param.name = "MULLO_MUL_N_THRESHOLD";
+ param.min_size = mullo_dc_threshold;
+ param.max_size = 2 * mul_fft_threshold;
+ param.noprint = 0;
+ param.step_factor = 0.03;
+ one (&mullo_mul_n_threshold, &param);
+ }
+ else
+ print_define_remark ("MULLO_MUL_N_THRESHOLD", MP_SIZE_T_MAX,
+ "without FFT use mullo forever");
}
void