diff options
author | Torbjorn Granlund <tege@gmplib.org> | 2008-09-24 02:35:20 +0200 |
---|---|---|
committer | Torbjorn Granlund <tege@gmplib.org> | 2008-09-24 02:35:20 +0200 |
commit | af8987aec9b1ee9681cd99cf82e4c24b92342691 (patch) | |
tree | b7c388ff7074120af2a8ace4eb9b93938ed24372 | |
parent | 7f526a990910f116166aed74c1440f7c7a9ad906 (diff) | |
download | gmp-af8987aec9b1ee9681cd99cf82e4c24b92342691.tar.gz |
Handle --enable-minithres.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.in | 15 | ||||
-rw-r--r-- | mpn/minithres/gmp-mparam.h | 25 |
3 files changed, 34 insertions, 11 deletions
@@ -1,3 +1,8 @@ +2008-09-24 Torbjorn Granlund <tege@swox.com> + + * configure.in: Handle --enable-minithres. + * mpn/minithres/gmp-mparam.h: Update all values. + 2008-09-22 Torbjorn Granlund <tege@swox.com> * tune/speed.c (routine): New entry for mpn_mul. diff --git a/configure.in b/configure.in index fe0584285..21a820fc2 100644 --- a/configure.in +++ b/configure.in @@ -220,6 +220,16 @@ esac], [enable_fat=no]) +AC_ARG_ENABLE(minithres, +AC_HELP_STRING([--enable-minithres], + [choose minimal thresholds for testing [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-minithres, need yes or no]) ;; +esac], +[enable_minithres=no]) + + tmp_host=`echo $host_cpu | sed 's/\./_/'` AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_$tmp_host) @@ -3011,6 +3021,11 @@ if test "$gmp_asm_syntax_testing" != no; then esac fi +# For --enable-minithres, prepend "minithres" to path so that its special +# gmp-mparam.h will be used. +if test $enable_minithres = yes; then + path="minithres $path" +fi # Create link for gmp-mparam.h. gmp_mparam_source= diff --git a/mpn/minithres/gmp-mparam.h b/mpn/minithres/gmp-mparam.h index 7586b7a0f..a639ba8de 100644 --- a/mpn/minithres/gmp-mparam.h +++ b/mpn/minithres/gmp-mparam.h @@ -1,6 +1,6 @@ /* Minimal values gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 2000, 2006 Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 2000, 2006, 2008 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -17,13 +17,15 @@ License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ +/* The values in this file are not currently minimal. + Trimming them further would be good. */ -#define MUL_KARATSUBA_THRESHOLD 2 -#define MUL_TOOM3_THRESHOLD 17 +#define MUL_KARATSUBA_THRESHOLD 8 +#define MUL_TOOM3_THRESHOLD 20 #define SQR_BASECASE_THRESHOLD 0 -#define SQR_KARATSUBA_THRESHOLD 2 -#define SQR_TOOM3_THRESHOLD 17 +#define SQR_KARATSUBA_THRESHOLD 8 +#define SQR_TOOM3_THRESHOLD 20 #define MULLOW_BASECASE_THRESHOLD 0 #define MULLOW_DC_THRESHOLD 2 @@ -47,14 +49,15 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ #define DIVEXACT_1_THRESHOLD 0 /* always (native) */ #define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ -#define GET_STR_DC_THRESHOLD 2 -#define GET_STR_PRECOMPUTE_THRESHOLD 4 +#define GET_STR_DC_THRESHOLD 4 +#define GET_STR_PRECOMPUTE_THRESHOLD 10 #define SET_STR_THRESHOLD 64 +#define SET_STR_PRECOMPUTE_THRESHOLD 100 -#define MUL_FFT_TABLE { 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 0} +#define MUL_FFT_TABLE {256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 0} #define MUL_FFT_MODF_THRESHOLD 32 -#define MUL_FFT_THRESHOLD 128 +#define MUL_FFT_THRESHOLD 256 -#define SQR_FFT_TABLE { 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 0} +#define SQR_FFT_TABLE {256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 0} #define SQR_FFT_MODF_THRESHOLD 32 -#define SQR_FFT_THRESHOLD 128 +#define SQR_FFT_THRESHOLD 256 |