[Gmp-commit] /home/hgfiles/gmp: Use refmpn_mul_basecase in the toom tests.
mercurial at gmplib.org
mercurial at gmplib.org
Sun Dec 13 10:11:09 CET 2009
details: /home/hgfiles/gmp/rev/cf75a831746a
changeset: 13051:cf75a831746a
user: Niels M?ller <nisse at lysator.liu.se>
date: Sun Dec 13 09:45:57 2009 +0100
description:
Use refmpn_mul_basecase in the toom tests.
diffstat:
ChangeLog | 6 ++++++
tests/mpn/t-toom33.c | 2 +-
tests/mpn/t-toom42.c | 2 --
tests/mpn/t-toom43.c | 2 --
tests/mpn/t-toom44.c | 2 +-
tests/mpn/toom-shared.h | 4 ++--
6 files changed, 10 insertions(+), 8 deletions(-)
diffs (76 lines):
diff -r 424d2d643665 -r cf75a831746a ChangeLog
--- a/ChangeLog Sun Dec 13 03:00:59 2009 +0100
+++ b/ChangeLog Sun Dec 13 09:45:57 2009 +0100
@@ -1,3 +1,9 @@
+2009-12-13 Niels Möller <nisse at lysator.liu.se>
+
+ * tests/mpn/toom-shared.h (main): Use refmpn_mul_basecase to check
+ results (slow!). Iteration counts of all toom tests reduced
+ considerably.
+
2009-12-12 Torbjorn Granlund <tege at gmplib.org>
* mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Rewrite.
diff -r 424d2d643665 -r cf75a831746a tests/mpn/t-toom33.c
--- a/tests/mpn/t-toom33.c Sun Dec 13 03:00:59 2009 +0100
+++ b/tests/mpn/t-toom33.c Sun Dec 13 09:45:57 2009 +0100
@@ -6,6 +6,6 @@
#define MIN_AN MUL_TOOM33_THRESHOLD
#define MIN_BN(an) (1 + 2*(((an)+2)/(size_t) 3))
-#define COUNT 3000
+#define COUNT 100
#include "toom-shared.h"
diff -r 424d2d643665 -r cf75a831746a tests/mpn/t-toom42.c
--- a/tests/mpn/t-toom42.c Sun Dec 13 03:00:59 2009 +0100
+++ b/tests/mpn/t-toom42.c Sun Dec 13 09:45:57 2009 +0100
@@ -5,6 +5,4 @@
#define MIN_BN(an) (((an) + 7) >> 2)
#define MAX_BN(an) ((2*(an)-5) / (size_t) 3)
-#define COUNT 2000
-
#include "toom-shared.h"
diff -r 424d2d643665 -r cf75a831746a tests/mpn/t-toom43.c
--- a/tests/mpn/t-toom43.c Sun Dec 13 03:00:59 2009 +0100
+++ b/tests/mpn/t-toom43.c Sun Dec 13 09:45:57 2009 +0100
@@ -5,6 +5,4 @@
#define MIN_BN(an) (1 + 2*(((an)+3) >> 2))
#define MAX_BN(an) ((an)-3)
-#define COUNT 2000
-
#include "toom-shared.h"
diff -r 424d2d643665 -r cf75a831746a tests/mpn/t-toom44.c
--- a/tests/mpn/t-toom44.c Sun Dec 13 03:00:59 2009 +0100
+++ b/tests/mpn/t-toom44.c Sun Dec 13 09:45:57 2009 +0100
@@ -4,6 +4,6 @@
#define MIN_AN MUL_TOOM44_THRESHOLD
#define MIN_BN(an) (1 + 3*(((an)+3)>>2))
-#define COUNT 2000
+#define COUNT 100
#include "toom-shared.h"
diff -r 424d2d643665 -r cf75a831746a tests/mpn/toom-shared.h
--- a/tests/mpn/toom-shared.h Sun Dec 13 03:00:59 2009 +0100
+++ b/tests/mpn/toom-shared.h Sun Dec 13 09:45:57 2009 +0100
@@ -35,7 +35,7 @@
#endif
#ifndef COUNT
-#define COUNT 5000
+#define COUNT 300
#endif
#define MAX_AN (1L << SIZE_LOG)
@@ -116,7 +116,7 @@
s_after = scratch[itch];
mpn_toomMN_mul (pp, ap, an, bp, bn, scratch);
- mpn_mul (refp, ap, an, bp, bn);
+ refmpn_mul_basecase (refp, ap, an, bp, bn);
if (pp[-1] != p_before || pp[an + bn] != p_after
|| scratch[-1] != s_before || scratch[itch] != s_after
|| mpn_cmp (refp, pp, an + bn) != 0)
More information about the gmp-commit
mailing list