[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Fri Feb 1 13:40:39 CET 2013
details: /var/hg/gmp/rev/88029623ec89
changeset: 15369:88029623ec89
user: Torbjorn Granlund <tege at gmplib.org>
date: Fri Feb 01 13:40:14 2013 +0100
description:
(refmpn_mul): Use toom6h instead of toom44 for the largest operands.
details: /var/hg/gmp/rev/525ee21f3b73
changeset: 15370:525ee21f3b73
user: Torbjorn Granlund <tege at gmplib.org>
date: Fri Feb 01 13:40:27 2013 +0100
description:
ChangeLog
diffstat:
ChangeLog | 5 +++++
tests/refmpn.c | 23 +++++++++++++++--------
2 files changed, 20 insertions(+), 8 deletions(-)
diffs (80 lines):
diff -r 0e196cd5dead -r 525ee21f3b73 ChangeLog
--- a/ChangeLog Thu Jan 31 16:15:18 2013 +0100
+++ b/ChangeLog Fri Feb 01 13:40:27 2013 +0100
@@ -1,3 +1,8 @@
+2013-02-01 Torbjorn Granlund <tege at gmplib.org>
+
+ * tests/refmpn.c (refmpn_mul): Use toom6h instead of toom44 for the
+ largest operands.
+
2013-01-31 Torbjorn Granlund <tege at gmplib.org>
* mpn/generic/toom44_mul.c: Revert last change in favour of a simple
diff -r 0e196cd5dead -r 525ee21f3b73 tests/refmpn.c
--- a/tests/refmpn.c Thu Jan 31 16:15:18 2013 +0100
+++ b/tests/refmpn.c Fri Feb 01 13:40:27 2013 +0100
@@ -2,7 +2,7 @@
of the normal gmp code. Speed isn't a consideration.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+2007, 2008, 2009, 2011, 2012, 2013 Free Software Foundation, Inc.
This file is part of the GNU MP Library test suite.
@@ -1854,6 +1854,7 @@
#define TOOM3_THRESHOLD (MAX (MUL_TOOM33_THRESHOLD, SQR_TOOM3_THRESHOLD))
#define TOOM4_THRESHOLD (MAX (MUL_TOOM44_THRESHOLD, SQR_TOOM4_THRESHOLD))
+#define TOOM6_THRESHOLD (MAX (MUL_TOOM6H_THRESHOLD, SQR_TOOM6_THRESHOLD))
#if WANT_FFT
#define FFT_THRESHOLD (MAX (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD))
#else
@@ -1868,8 +1869,7 @@
if (vn < TOOM3_THRESHOLD)
{
- /* In the mpn_mul_basecase and mpn_kara_mul_n range, use our own
- mul_basecase. */
+ /* In the mpn_mul_basecase and toom2 range, use our own mul_basecase. */
if (vn != 0)
refmpn_mul_basecase (wp, up, un, vp, vn);
else
@@ -1879,25 +1879,32 @@
if (vn < TOOM4_THRESHOLD)
{
- /* In the mpn_toom33_mul range, use mpn_toom22_mul. */
+ /* In the toom3 range, use mpn_toom22_mul. */
tn = 2 * vn + mpn_toom22_mul_itch (vn, vn);
tp = refmpn_malloc_limbs (tn);
mpn_toom22_mul (tp, up, vn, vp, vn, tp + 2 * vn);
}
- else if (vn < FFT_THRESHOLD)
+ else if (vn < TOOM6_THRESHOLD)
{
- /* In the mpn_toom44_mul range, use mpn_toom33_mul. */
+ /* In the toom4 range, use mpn_toom33_mul. */
tn = 2 * vn + mpn_toom33_mul_itch (vn, vn);
tp = refmpn_malloc_limbs (tn);
mpn_toom33_mul (tp, up, vn, vp, vn, tp + 2 * vn);
}
- else
+ else if (vn < FFT_THRESHOLD)
{
- /* Finally, for the largest operands, use mpn_toom44_mul. */
+ /* In the toom6 range, use mpn_toom44_mul. */
tn = 2 * vn + mpn_toom44_mul_itch (vn, vn);
tp = refmpn_malloc_limbs (tn);
mpn_toom44_mul (tp, up, vn, vp, vn, tp + 2 * vn);
}
+ else
+ {
+ /* Finally, for the largest operands, use mpn_toom6h_mul. */
+ tn = 2 * vn + mpn_toom6h_mul_itch (vn, vn);
+ tp = refmpn_malloc_limbs (tn);
+ mpn_toom6h_mul (tp, up, vn, vp, vn, tp + 2 * vn);
+ }
if (un != vn)
{
More information about the gmp-commit
mailing list