[Gmp-commit] /home/hgfiles/gmp: Remove TMP_ stuff from toom63, scratch must b...

mercurial at gmplib.org mercurial at gmplib.org
Mon Dec 21 16:49:20 CET 2009


details:   /home/hgfiles/gmp/rev/bf7dcecefbac
changeset: 13160:bf7dcecefbac
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Mon Dec 21 16:43:19 2009 +0100
description:
Remove TMP_ stuff from toom63, scratch must be allocated outside.

diffstat:

 ChangeLog                |  2 ++
 mpn/generic/toom63_mul.c |  9 +--------
 2 files changed, 3 insertions(+), 8 deletions(-)

diffs (57 lines):

diff -r 5da6791fb073 -r bf7dcecefbac ChangeLog
--- a/ChangeLog	Mon Dec 21 16:27:58 2009 +0100
+++ b/ChangeLog	Mon Dec 21 16:43:19 2009 +0100
@@ -21,6 +21,8 @@
 
 2009-12-21  Marco Bodrato <bodrato at mail.dm.unipi.it>
 
+	* mpn/generic/toom63_mul.c: Remove unused TMP_*.
+
 	* mpn/generic/toom_eval_pm2rexp.c: New file.
 	* gmp-impl.h: Provide corresponding declaration.
 	* configure.in (gmp_mpn_functions): List toom_eval_pm2rexp.
diff -r 5da6791fb073 -r bf7dcecefbac mpn/generic/toom63_mul.c
--- a/mpn/generic/toom63_mul.c	Mon Dec 21 16:27:58 2009 +0100
+++ b/mpn/generic/toom63_mul.c	Mon Dec 21 16:43:19 2009 +0100
@@ -23,10 +23,6 @@
 You should have received a copy of the GNU Lesser General Public License
 along with the GNU MP Library.  If not, see http://www.gnu.org/licenses/.  */
 
-/* FIXME: Write an _itch function, then remove NULL and TMP_*, as soon
-   as all the callers properly allocate and pass the scratch to the
-   function. */
-#include <stdlib.h>		/* for NULL */
 
 #include "gmp.h"
 #include "gmp-impl.h"
@@ -94,7 +90,6 @@
   mp_size_t n, s, t;
   mp_limb_t cy;
   int sign;
-  TMP_DECL;
 
   /***************************** decomposition *******************************/
 #define a5  (ap + 5 * n)
@@ -116,7 +111,6 @@
   /* WARNING! it assumes n>1 */
   ASSERT ( n > 2);
 
-  TMP_MARK;
 #define   r8    pp				/* 2n   */
 #define   r7    scratch				/* 3n+1 */
 #define   r5    (pp + 3*n)			/* 3n+1 */
@@ -130,7 +124,7 @@
 
   /* Alloc also 3n+1 limbs for ws... mpn_toom_interpolate_8pts may
      need all of them, when DO_mpn_sublsh_n usea a scratch  */
-  if (scratch == NULL) scratch = TMP_SALLOC_LIMBS (9 * n + 3);
+/*   if (scratch == NULL) scratch = TMP_SALLOC_LIMBS (9 * n + 3); */
 
   /********************** evaluation and recursive calls *********************/
   /* $\pm4$ */
@@ -224,5 +218,4 @@
 #undef r7
 #undef r8
 #undef ws
-  TMP_FREE;
 }


More information about the gmp-commit mailing list