[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Fri Jun 6 17:55:16 UTC 2014


details:   /var/hg/gmp/rev/d12ce72ff2ce
changeset: 16416:d12ce72ff2ce
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 06 19:46:23 2014 +0200
description:
Swap some TMP_SALLOC_LIMB for TMP_ALLOC_LIMB and some TMP_ALLOC_LIMB for TMP_SALLOC_LIMB.

details:   /var/hg/gmp/rev/d26585c0851f
changeset: 16417:d26585c0851f
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 06 19:54:10 2014 +0200
description:
ChangeLog

details:   /var/hg/gmp/rev/8d9bd666f15a
changeset: 16418:8d9bd666f15a
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Fri Jun 06 19:55:13 2014 +0200
description:
Trivial merge.

diffstat:

 ChangeLog         |   5 +++++
 mpn/generic/mul.c |  16 ++++++++--------
 tests/mpf/t-sub.c |   2 +-
 3 files changed, 14 insertions(+), 9 deletions(-)

diffs (83 lines):

diff -r 059ac27848dd -r 8d9bd666f15a ChangeLog
--- a/ChangeLog	Mon Jun 02 08:42:21 2014 +0200
+++ b/ChangeLog	Fri Jun 06 19:55:13 2014 +0200
@@ -1,3 +1,8 @@
+2014-06-06  Torbjörn Granlund  <tege at gmplib.org>
+
+	* mpn/generic/mul.c: Swap some TMP_SALLOC_LIMB for TMP_ALLOC_LIMB
+	and some TMP_ALLOC_LIMB for TMP_SALLOC_LIMB.
+
 2014-05-31 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpf/ui_sub.c: Remove buggy code, use a wrapper to mpf_sub.
diff -r 059ac27848dd -r 8d9bd666f15a mpn/generic/mul.c
--- a/mpn/generic/mul.c	Mon Jun 02 08:42:21 2014 +0200
+++ b/mpn/generic/mul.c	Fri Jun 06 19:55:13 2014 +0200
@@ -2,8 +2,8 @@
 
    Contributed to the GNU project by Torbjorn Granlund.
 
-Copyright 1991, 1993, 1994, 1996, 1997, 1999-2003, 2005-2007, 2009, 2010, 2012
-Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 1997, 1999-2003, 2005-2007, 2009, 2010, 2012,
+2014 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -274,9 +274,9 @@
 	{
 	  /* Use ToomX3 variants */
 	  mp_ptr scratch;
-	  TMP_SDECL; TMP_SMARK;
+	  TMP_DECL; TMP_MARK;
 
-	  scratch = TMP_SALLOC_LIMBS (ITCH);
+	  scratch = TMP_ALLOC_LIMBS (ITCH);
 
 	  if (2 * un >= 5 * vn)
 	    {
@@ -284,7 +284,7 @@
 	      mp_ptr ws;
 
 	      /* The maximum ws usage is for the mpn_mul result.  */
-	      ws = TMP_SALLOC_LIMBS (7 * vn >> 1);
+	      ws = TMP_ALLOC_LIMBS (7 * vn >> 1);
 
 	      if (BELOW_THRESHOLD (vn, MUL_TOOM42_TO_TOOM63_THRESHOLD))
 		mpn_toom42_mul (prodp, up, 2 * vn, vp, vn, scratch);
@@ -355,7 +355,7 @@
 		    mpn_toom63_mul (prodp, up, un, vp, vn, scratch);
 		}
 	    }
-	  TMP_SFREE;
+	  TMP_FREE;
 	}
       else
 	{
@@ -364,12 +364,12 @@
 
 	  if (BELOW_THRESHOLD (vn, MUL_TOOM6H_THRESHOLD))
 	    {
-	      scratch = TMP_ALLOC_LIMBS (mpn_toom44_mul_itch (un, vn));
+	      scratch = TMP_SALLOC_LIMBS (mpn_toom44_mul_itch (un, vn));
 	      mpn_toom44_mul (prodp, up, un, vp, vn, scratch);
 	    }
 	  else if (BELOW_THRESHOLD (vn, MUL_TOOM8H_THRESHOLD))
 	    {
-	      scratch = TMP_ALLOC_LIMBS (mpn_toom6h_mul_itch (un, vn));
+	      scratch = TMP_SALLOC_LIMBS (mpn_toom6h_mul_itch (un, vn));
 	      mpn_toom6h_mul (prodp, up, un, vp, vn, scratch);
 	    }
 	  else
diff -r 059ac27848dd -r 8d9bd666f15a tests/mpf/t-sub.c
--- a/tests/mpf/t-sub.c	Mon Jun 02 08:42:21 2014 +0200
+++ b/tests/mpf/t-sub.c	Fri Jun 06 19:55:13 2014 +0200
@@ -79,7 +79,7 @@
       refmpf_sub (wref, u, v);
 
       mpf_reldiff (rerr, w, wref);
-      if (! refmpf_validate ("check_rand mpf_sub", w, wref))
+      if (mpf_cmp (rerr, max_rerr) > 0)
 	{
 	  mpf_set (max_rerr, rerr);
 #if VERBOSE


More information about the gmp-commit mailing list