[Gmp-commit] /var/hg/gmp: Take toom6h and toom8h into account, using new macr...

mercurial at gmplib.org mercurial at gmplib.org
Wed Jan 30 02:08:54 CET 2013


details:   /var/hg/gmp/rev/73f1eb1f4fa8
changeset: 15367:73f1eb1f4fa8
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Jan 30 02:08:51 2013 +0100
description:
Take toom6h and toom8h into account, using new macro MUL_NEXTALG_THRESHOLD.

diffstat:

 ChangeLog                |   6 ++++++
 mpn/generic/toom44_mul.c |  11 +++++++++--
 mpn/generic/toom4_sqr.c  |  11 +++++++++--
 3 files changed, 24 insertions(+), 4 deletions(-)

diffs (79 lines):

diff -r 8ec61b8b6882 -r 73f1eb1f4fa8 ChangeLog
--- a/ChangeLog	Sat Jan 26 13:35:47 2013 +0100
+++ b/ChangeLog	Wed Jan 30 02:08:51 2013 +0100
@@ -1,3 +1,9 @@
+2013-01-30  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/generic/toom44_mul.c (MAYBE_mul_toom44): Take toom6h and toom8h
+	into account, using new macro MUL_NEXTALG_THRESHOLD.
+	* mpn/generic/toom4_sqr.c (MAYBE_sqr_toom4): Likewise.
+
 2013-01-26 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpz/remove.c: init+set=init_set, cast before shifting.
diff -r 8ec61b8b6882 -r 73f1eb1f4fa8 mpn/generic/toom44_mul.c
--- a/mpn/generic/toom44_mul.c	Sat Jan 26 13:35:47 2013 +0100
+++ b/mpn/generic/toom44_mul.c	Wed Jan 30 02:08:51 2013 +0100
@@ -7,7 +7,7 @@
    SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
    GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
 
-Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright 2006, 2007, 2008, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -50,12 +50,19 @@
 #define MAYBE_mul_toom22   1
 #define MAYBE_mul_toom44   1
 #else
+#if MUL_TOOM6H_THRESHOLD != 0
+#define MUL_NEXTALG_THRESHOLD MUL_TOOM6H_THRESHOLD
+#elif MUL_TOOM8H_THRESHOLD != 0
+#define MUL_NEXTALG_THRESHOLD MUL_TOOM8H_THRESHOLD
+#else
+#define MUL_NEXTALG_THRESHOLD MUL_FFT_THRESHOLD
+#endif
 #define MAYBE_mul_basecase						\
   (MUL_TOOM44_THRESHOLD < 4 * MUL_TOOM22_THRESHOLD)
 #define MAYBE_mul_toom22						\
   (MUL_TOOM44_THRESHOLD < 4 * MUL_TOOM33_THRESHOLD)
 #define MAYBE_mul_toom44						\
-  (MUL_FFT_THRESHOLD >= 4 * MUL_TOOM44_THRESHOLD)
+  (MUL_NEXTALG_THRESHOLD >= 4 * MUL_TOOM44_THRESHOLD)
 #endif
 
 #define TOOM44_MUL_N_REC(p, a, b, n, ws)				\
diff -r 8ec61b8b6882 -r 73f1eb1f4fa8 mpn/generic/toom4_sqr.c
--- a/mpn/generic/toom4_sqr.c	Sat Jan 26 13:35:47 2013 +0100
+++ b/mpn/generic/toom4_sqr.c	Wed Jan 30 02:08:51 2013 +0100
@@ -6,7 +6,7 @@
    SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
    GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
 
-Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+Copyright 2006, 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -47,12 +47,19 @@
 #define MAYBE_sqr_toom2   1
 #define MAYBE_sqr_toom4   1
 #else
+#if SQR_TOOM6H_THRESHOLD != 0
+#define SQR_NEXTALG_THRESHOLD SQR_TOOM6H_THRESHOLD
+#elif SQR_TOOM8H_THRESHOLD != 0
+#define SQR_NEXTALG_THRESHOLD SQR_TOOM8H_THRESHOLD
+#else
+#define SQR_NEXTALG_THRESHOLD SQR_FFT_THRESHOLD
+#endif
 #define MAYBE_sqr_basecase						\
   (SQR_TOOM4_THRESHOLD < 4 * SQR_TOOM2_THRESHOLD)
 #define MAYBE_sqr_toom2							\
   (SQR_TOOM4_THRESHOLD < 4 * SQR_TOOM3_THRESHOLD)
 #define MAYBE_sqr_toom4							\
-  (SQR_FFT_THRESHOLD >= 4 * SQR_TOOM4_THRESHOLD)
+  (SQR_NEXTALG_THRESHOLD >= 4 * SQR_TOOM4_THRESHOLD)
 #endif
 
 #define TOOM4_SQR_REC(p, a, n, ws)					\


More information about the gmp-commit mailing list