[Gmp-commit] /home/hgfiles/gmp: Add --enable-old-fft-full configure option, h...

mercurial at gmplib.org mercurial at gmplib.org
Mon Dec 21 11:32:19 CET 2009


details:   /home/hgfiles/gmp/rev/eb3bb81bfd31
changeset: 13152:eb3bb81bfd31
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 21 11:32:13 2009 +0100
description:
Add --enable-old-fft-full configure option, honour it in everywhere.

diffstat:

 ChangeLog             |  10 ++++++++++
 configure.in          |  14 ++++++++++++++
 mpn/generic/mul_fft.c |   2 +-
 tune/common.c         |   3 ++-
 tune/speed.c          |   3 ++-
 tune/speed.h          |   2 ++
 6 files changed, 31 insertions(+), 3 deletions(-)

diffs (102 lines):

diff -r 2f399c54d948 -r eb3bb81bfd31 ChangeLog
--- a/ChangeLog	Mon Dec 21 10:42:38 2009 +0100
+++ b/ChangeLog	Mon Dec 21 11:32:13 2009 +0100
@@ -1,3 +1,13 @@
+2009-12-21  Torbjorn Granlund  <tege at gmplib.org>
+
+	* configure.in: Add --enable-old-fft-full.
+	* tune/speed.c (routine): Conditionalise mpn_mul_fft_full references on
+	WANT_OLD_FFT_FULL.
+	* tune/common.c (speed_mpn_mul_fft_full)
+	(speed_mpn_mul_fft_full_sqr): Likewise.
+	* mpn/generic/mul_fft.c (mpn_mul_fft_full): Include iff
+	WANT_OLD_FFT_FULL.
+
 2009-12-21  Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1): Use ref_mul.
diff -r 2f399c54d948 -r eb3bb81bfd31 configure.in
--- a/configure.in	Mon Dec 21 10:42:38 2009 +0100
+++ b/configure.in	Mon Dec 21 11:32:13 2009 +0100
@@ -136,6 +136,20 @@
 fi
 
 
+AC_ARG_ENABLE(old-fft-full,
+AC_HELP_STRING([--enable-old-fft-full],[enable old mpn_mul_fft_full for multiplication [[default=no]]]),
+[case $enableval in
+yes|no) ;;
+*) AC_MSG_ERROR([bad value $enableval for --enable-old-fft-full, need yes or no]) ;;
+esac],
+[enable_old_fft_full=no])
+
+if test "$enable_old_fft_full" = "yes"; then
+  AC_DEFINE(WANT_OLD_FFT_FULL,1,
+  [Define to 1 to enable old mpn_mul_fft_full for multiplication, per --enable-old-fft-full])
+fi
+
+
 AC_ARG_ENABLE(mpbsd,
 AC_HELP_STRING([--enable-mpbsd],
                [build Berkeley MP compatibility library [[default=no]]]),
diff -r 2f399c54d948 -r eb3bb81bfd31 mpn/generic/mul_fft.c
--- a/mpn/generic/mul_fft.c	Mon Dec 21 10:42:38 2009 +0100
+++ b/mpn/generic/mul_fft.c	Mon Dec 21 11:32:13 2009 +0100
@@ -933,7 +933,7 @@
   return h;
 }
 
-#if 0
+#if WANT_OLD_FFT_FULL
 /* multiply {n, nl} by {m, ml}, and put the result in {op, nl+ml} */
 void
 mpn_mul_fft_full (mp_ptr op,
diff -r 2f399c54d948 -r eb3bb81bfd31 tune/common.c
--- a/tune/common.c	Mon Dec 21 10:42:38 2009 +0100
+++ b/tune/common.c	Mon Dec 21 11:32:13 2009 +0100
@@ -1083,6 +1083,7 @@
     (mpn_nussbaumer_mul (wp, s->xp, s->size, s->xp, s->size));
 }
 
+#if WANT_OLD_FFT_FULL
 double
 speed_mpn_mul_fft_full (struct speed_params *s)
 {
@@ -1095,7 +1096,7 @@
   SPEED_ROUTINE_MPN_SQR_CALL
     (mpn_mul_fft_full (wp, s->xp, s->size, s->xp, s->size));
 }
-
+#endif
 
 /* These are mod 2^N+1 multiplies and squares.  If s->r is supplied it's
    used as k, otherwise the best k for the size is used.  If s->size isn't a
diff -r 2f399c54d948 -r eb3bb81bfd31 tune/speed.c
--- a/tune/speed.c	Mon Dec 21 10:42:38 2009 +0100
+++ b/tune/speed.c	Mon Dec 21 11:32:13 2009 +0100
@@ -301,9 +301,10 @@
   { "mpn_toom42_mul",    speed_mpn_toom42_mul       },
   { "mpn_nussbaumer_mul",    speed_mpn_nussbaumer_mul    },
   { "mpn_nussbaumer_mul_sqr",speed_mpn_nussbaumer_mul_sqr},
+#if WANT_OLD_FFT_FULL
   { "mpn_mul_fft_full",      speed_mpn_mul_fft_full      },
   { "mpn_mul_fft_full_sqr",  speed_mpn_mul_fft_full_sqr  },
-
+#endif
   { "mpn_mul_fft",       speed_mpn_mul_fft,     FLAG_R_OPTIONAL },
   { "mpn_mul_fft_sqr",   speed_mpn_mul_fft_sqr, FLAG_R_OPTIONAL },
 
diff -r 2f399c54d948 -r eb3bb81bfd31 tune/speed.h
--- a/tune/speed.h	Mon Dec 21 10:42:38 2009 +0100
+++ b/tune/speed.h	Mon Dec 21 11:32:13 2009 +0100
@@ -221,8 +221,10 @@
 double speed_mpn_mul_basecase __GMP_PROTO ((struct speed_params *s));
 double speed_mpn_mul_fft __GMP_PROTO ((struct speed_params *s));
 double speed_mpn_mul_fft_sqr __GMP_PROTO ((struct speed_params *s));
+#if WANT_OLD_FFT_FULL
 double speed_mpn_mul_fft_full __GMP_PROTO ((struct speed_params *s));
 double speed_mpn_mul_fft_full_sqr __GMP_PROTO ((struct speed_params *s));
+#endif
 double speed_mpn_nussbaumer_mul __GMP_PROTO ((struct speed_params *s));
 double speed_mpn_nussbaumer_mul_sqr __GMP_PROTO ((struct speed_params *s));
 double speed_mpn_mul_n __GMP_PROTO ((struct speed_params *s));


More information about the gmp-commit mailing list