diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-08-25 20:05:04 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2015-08-25 20:05:04 +0200 |
commit | 19a1b94980b59e407c44628fcc019798622230dc (patch) | |
tree | 3de919815e78483a22b33c74202d5156abac3d83 /tune/tuneup.c | |
parent | b61347c97b9e1e1f59b0299378cc7bba02ba8482 (diff) | |
download | gmp-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/tuneup.c')
-rw-r--r-- | tune/tuneup.c | 23 |
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, ¶m); -#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, ¶m); + } + else + print_define_remark ("MULLO_MUL_N_THRESHOLD", MP_SIZE_T_MAX, + "without FFT use mullo forever"); } void |