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

mercurial at gmplib.org mercurial at gmplib.org
Fri Mar 11 09:34:25 CET 2022


details:   /var/hg/gmp/rev/18f5b295ad9a
changeset: 18324:18f5b295ad9a
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Mar 11 09:30:59 2022 +0100
description:
mpn/generic/sqrmod_bnm1.c: Use sqrmod_bknp1, on the bnp1 side

details:   /var/hg/gmp/rev/a5a75a44bb47
changeset: 18325:a5a75a44bb47
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Mar 11 09:34:15 2022 +0100
description:
Copyright years

diffstat:

 mpn/generic/mulmod_bnm1.c |   2 +-
 mpn/generic/sqrmod_bnm1.c |  14 +++++++++++++-
 mpn/generic/strongfibo.c  |   2 +-
 3 files changed, 15 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 72f950c9d01e -r a5a75a44bb47 mpn/generic/mulmod_bnm1.c
--- a/mpn/generic/mulmod_bnm1.c	Wed Mar 09 23:39:02 2022 +0100
+++ b/mpn/generic/mulmod_bnm1.c	Fri Mar 11 09:34:15 2022 +0100
@@ -7,7 +7,7 @@
    SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
    GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
 
-Copyright 2009, 2010, 2012, 2013, 2020 Free Software Foundation, Inc.
+Copyright 2009, 2010, 2012, 2013, 2020, 2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
diff -r 72f950c9d01e -r a5a75a44bb47 mpn/generic/sqrmod_bnm1.c
--- a/mpn/generic/sqrmod_bnm1.c	Wed Mar 09 23:39:02 2022 +0100
+++ b/mpn/generic/sqrmod_bnm1.c	Fri Mar 11 09:34:15 2022 +0100
@@ -7,7 +7,7 @@
    SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES.  IN FACT, IT IS ALMOST
    GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE.
 
-Copyright 2009, 2010, 2012, 2020 Free Software Foundation, Inc.
+Copyright 2009, 2010, 2012, 2020, 2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 
@@ -66,6 +66,7 @@
 mpn_bc_sqrmod_bnp1 (mp_ptr rp, mp_srcptr ap, mp_size_t rn, mp_ptr tp)
 {
   mp_limb_t cy;
+  unsigned k;
 
   ASSERT (0 < rn);
 
@@ -75,6 +76,17 @@
       MPN_FILL (rp + 1, rn, 0);
       return;
     }
+  else if (MPN_SQRMOD_BKNP1_USABLE (rn, k, MUL_FFT_MODF_THRESHOLD))
+    {
+      mp_size_t n_k = rn / k;
+      TMP_DECL;
+
+      TMP_MARK;
+      mpn_sqrmod_bknp1 (rp, ap, n_k, k,
+			TMP_ALLOC_LIMBS (mpn_sqrmod_bknp1_itch (rn)));
+      TMP_FREE;
+      return;
+    }
   mpn_sqr (tp, ap, rn);
   cy = mpn_sub_n (rp, tp, tp + rn, rn);
   rp[rn] = 0;
diff -r 72f950c9d01e -r a5a75a44bb47 mpn/generic/strongfibo.c
--- a/mpn/generic/strongfibo.c	Wed Mar 09 23:39:02 2022 +0100
+++ b/mpn/generic/strongfibo.c	Fri Mar 11 09:34:15 2022 +0100
@@ -6,7 +6,7 @@
    CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
    FUTURE GNU MP RELEASES.
 
-Copyright 2001, 2002, 2005, 2009, 2018 Free Software Foundation, Inc.
+Copyright 2001, 2002, 2005, 2009, 2018, 2022 Free Software Foundation, Inc.
 
 This file is part of the GNU MP Library.
 


More information about the gmp-commit mailing list