[Gmp-commit] /home/hgfiles/gmp: Correct ASSERTs related to toom6h.

mercurial at gmplib.org mercurial at gmplib.org
Wed Dec 23 03:19:33 CET 2009


details:   /home/hgfiles/gmp/rev/19764e519630
changeset: 13191:19764e519630
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Wed Dec 23 03:19:18 2009 +0100
description:
Correct ASSERTs related to toom6h.

diffstat:

 ChangeLog                      |  5 +++++
 mpn/generic/toom6h_mul.c       |  4 ++--
 mpn/generic/toom_eval_pm2exp.c |  4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)

diffs (48 lines):

diff -r 751e47e8eff1 -r 19764e519630 ChangeLog
--- a/ChangeLog	Tue Dec 22 23:05:31 2009 +0100
+++ b/ChangeLog	Wed Dec 23 03:19:18 2009 +0100
@@ -1,3 +1,8 @@
+2009-12-23  Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpn/generic/toom_eval_pm2exp.c: Assert support for degree 3.
+	* mpn/generic/toom6h_mul.c: Do not use obsolete _itch function any more.
+
 2009-12-22  Torbjorn Granlund  <tege at gmplib.org>
 
 	* tests/mpn/t-div.c: New file.
diff -r 751e47e8eff1 -r 19764e519630 mpn/generic/toom6h_mul.c
--- a/mpn/generic/toom6h_mul.c	Tue Dec 22 23:05:31 2009 +0100
+++ b/mpn/generic/toom6h_mul.c	Wed Dec 23 03:19:18 2009 +0100
@@ -158,9 +158,9 @@
   /* Alloc also 3n+1 limbs for wsi... toom_interpolate_12pts may
      need all of them  */
 /*   if (scratch == NULL) */
-/*     scratch = TMP_SALLOC_LIMBS(mpn_toom6h_mul_n_itch(n * 6)); */
+/*     scratch = TMP_SALLOC_LIMBS(mpn_toom6_sqr_itch(n * 6)); */
   ASSERT (12 * n + 6 <= mpn_toom6h_mul_itch(an,bn));
-  ASSERT (12 * n + 6 <= mpn_toom6h_mul_n_itch(n * 6));
+  ASSERT (12 * n + 6 <= mpn_toom6_sqr_itch(n * 6));
 
   /********************** evaluation and recursive calls *********************/
   /* $\pm1/2$ */
diff -r 751e47e8eff1 -r 19764e519630 mpn/generic/toom_eval_pm2exp.c
--- a/mpn/generic/toom_eval_pm2exp.c	Tue Dec 22 23:05:31 2009 +0100
+++ b/mpn/generic/toom_eval_pm2exp.c	Wed Dec 23 03:19:18 2009 +0100
@@ -27,7 +27,7 @@
 #include "gmp.h"
 #include "gmp-impl.h"
 
-/* Evaluates a polynomial of degree k > 3, in the points +2 and -2. */
+/* Evaluates a polynomial of degree k > 2, in the points +2^shift and -2^shift. */
 int
 mpn_toom_eval_pm2exp (mp_ptr xp2, mp_ptr xm2, unsigned k,
 		      mp_srcptr xp, mp_size_t n, mp_size_t hn, unsigned shift,
@@ -39,7 +39,7 @@
   mp_limb_t cy;
 #endif
 
-  ASSERT (k >= 4);
+  ASSERT (k >= 3);
 
   ASSERT (hn > 0);
   ASSERT (hn <= n);


More information about the gmp-commit mailing list