[Gmp-commit] /var/hg/gmp: 2 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Sun Jun 8 02:56:18 UTC 2014
details: /var/hg/gmp/rev/c619fc1fb9cb
changeset: 16419:c619fc1fb9cb
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Jun 08 04:52:37 2014 +0200
description:
mpn/generic/mul.c: Smaller scratch allocation in the Toom2X branch.
details: /var/hg/gmp/rev/bd72997f2dc4
changeset: 16420:bd72997f2dc4
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Sun Jun 08 04:55:54 2014 +0200
description:
ChangeLog
diffstat:
ChangeLog | 4 ++++
mpn/generic/mul.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 8d9bd666f15a -r bd72997f2dc4 ChangeLog
--- a/ChangeLog Fri Jun 06 19:55:13 2014 +0200
+++ b/ChangeLog Sun Jun 08 04:55:54 2014 +0200
@@ -1,3 +1,7 @@
+2014-06-08 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * mpn/generic/mul.c: Tighter allocation in the Toom2X branch.
+
2014-06-06 Torbjörn Granlund <tege at gmplib.org>
* mpn/generic/mul.c: Swap some TMP_SALLOC_LIMB for TMP_ALLOC_LIMB
diff -r 8d9bd666f15a -r bd72997f2dc4 mpn/generic/mul.c
--- a/mpn/generic/mul.c Fri Jun 06 19:55:13 2014 +0200
+++ b/mpn/generic/mul.c Sun Jun 08 04:55:54 2014 +0200
@@ -209,7 +209,13 @@
mp_ptr scratch;
TMP_SDECL; TMP_SMARK;
- scratch = TMP_SALLOC_LIMBS (ITCH);
+#define ITCH_TOOMX2 (9 * vn / 2 + GMP_NUMB_BITS * 2)
+ scratch = TMP_SALLOC_LIMBS (ITCH_TOOMX2);
+ ASSERT (mpn_toom42_mul_itch (2 * vn, vn) <= ITCH_TOOMX2);
+ ASSERT (mpn_toom22_mul_itch ((5*vn-1)/4, vn) <= ITCH_TOOMX2);
+ ASSERT (mpn_toom32_mul_itch ((7*vn-1)/4, vn) <= ITCH_TOOMX2);
+ ASSERT (mpn_toom42_mul_itch (3 * vn - 1, vn) <= ITCH_TOOMX2);
+#undef ITCH_TOOMX2
/* FIXME: This condition (repeated in the loop below) leaves from a vn*vn
square to a (3vn-1)*vn rectangle. Leaving such a rectangle is hardly
More information about the gmp-commit
mailing list