[Gmp-commit] /var/hg/gmp: ChangeLog
mercurial at gmplib.org
mercurial at gmplib.org
Wed Apr 25 05:38:21 UTC 2018
details: /var/hg/gmp/rev/765c2c27523b
changeset: 17601:765c2c27523b
user: Marco Bodrato <bodrato at mail.dm.unipi.it>
date: Wed Apr 25 07:38:14 2018 +0200
description:
ChangeLog
diffstat:
ChangeLog | 5 +++++
mpn/generic/toom22_mul.c | 2 +-
mpn/generic/toom2_sqr.c | 2 +-
mpn/generic/toom32_mul.c | 2 +-
4 files changed, 8 insertions(+), 3 deletions(-)
diffs (48 lines):
diff -r 02a2ec6e1bce -r 765c2c27523b ChangeLog
--- a/ChangeLog Mon Apr 23 18:12:05 2018 +0200
+++ b/ChangeLog Wed Apr 25 07:38:14 2018 +0200
@@ -1,3 +1,8 @@
+2018-04-23 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+ * mpn/generic/toom2_sqr.c: Handle the cy=-1 branch slightly faster.
+ * mpn/generic/toom22_mul.c: Likewise. (Thanks Paul and Raphaël!)
+
2018-04-22 Niels Möller <nisse at lysator.liu.se>
From Martin Storsjö:
diff -r 02a2ec6e1bce -r 765c2c27523b mpn/generic/toom22_mul.c
--- a/mpn/generic/toom22_mul.c Mon Apr 23 18:12:05 2018 +0200
+++ b/mpn/generic/toom22_mul.c Wed Apr 25 07:38:14 2018 +0200
@@ -202,7 +202,7 @@
#if WANT_ASSERT
/* The borrow in cy stops the propagation of the carry cy2, */
ASSERT (cy2 == 1);
- cy += mpn_add_1 (pp + 2 * n, pp + 2 * n, n, 1);
+ cy += mpn_add_1 (pp + 2 * n, pp + 2 * n, n, cy2);
ASSERT (cy == 0);
#else
/* we simply fill the area with zeros. */
diff -r 02a2ec6e1bce -r 765c2c27523b mpn/generic/toom2_sqr.c
--- a/mpn/generic/toom2_sqr.c Mon Apr 23 18:12:05 2018 +0200
+++ b/mpn/generic/toom2_sqr.c Wed Apr 25 07:38:14 2018 +0200
@@ -145,7 +145,7 @@
#if WANT_ASSERT
/* The borrow in cy stops the propagation of the carry cy2, */
ASSERT (cy2 == 1);
- cy += mpn_add_1 (pp + 2 * n, pp + 2 * n, n, 1);
+ cy += mpn_add_1 (pp + 2 * n, pp + 2 * n, n, cy2);
ASSERT (cy == 0);
#else
/* we simply fill the area with zeros. */
diff -r 02a2ec6e1bce -r 765c2c27523b mpn/generic/toom32_mul.c
--- a/mpn/generic/toom32_mul.c Mon Apr 23 18:12:05 2018 +0200
+++ b/mpn/generic/toom32_mul.c Wed Apr 25 07:38:14 2018 +0200
@@ -104,7 +104,7 @@
/* FIXME: Keep v1[2*n] and vm1[2*n] in scalar variables? */
- /* Compute ap1 = a0 + a1 + a3, am1 = a0 - a1 + a3 */
+ /* Compute ap1 = a0 + a1 + a2, am1 = a0 - a1 + a2 */
ap1_hi = mpn_add (ap1, a0, n, a2, s);
#if HAVE_NATIVE_mpn_add_n_sub_n
if (ap1_hi == 0 && mpn_cmp (ap1, a1, n) < 0)
More information about the gmp-commit
mailing list