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

mercurial at gmplib.org mercurial at gmplib.org
Sun Mar 20 20:27:01 CET 2022


details:   /var/hg/gmp/rev/9046e507bff5
changeset: 18336:9046e507bff5
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Mar 20 20:15:17 2022 +0100
description:
mpn/generic/mulmod_bknp1.c: Remove non-english comment

details:   /var/hg/gmp/rev/27c014307e66
changeset: 18337:27c014307e66
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Mar 20 20:15:49 2022 +0100
description:
ChangeLog

diffstat:

 ChangeLog                  |  41 +++++++++++++++++++++++++++++++++++++++++
 mini-gmp/ChangeLog         |   4 ++++
 mpn/generic/mulmod_bknp1.c |  16 ----------------
 3 files changed, 45 insertions(+), 16 deletions(-)

diffs (92 lines):

diff -r 6062e24c6ecd -r 27c014307e66 ChangeLog
--- a/ChangeLog	Sat Mar 19 10:02:18 2022 +0100
+++ b/ChangeLog	Sun Mar 20 20:15:49 2022 +0100
@@ -1,3 +1,42 @@
+2022-03-18 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* tests/mpz/t-lucm.c: Remove an unused var.
+	* tests/mpq/io.c: Use a random size.
+	* tests/mpz/t-gcd.c: Do not assume a limb fits for _ui functions.
+
+2022-03-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpn/generic/mul_fft.c: Use _bknp1. Not when tuning, to avoid "noise".
+
+2022-03-08 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpn/generic/mulmod_bnm1.c: Use mulmod_bknp1, on the bnp1 side.
+	* mpn/generic/sqrmod_bnm1.c: Likewise.
+
+	* mpn/generic/mul_fft.c: Remove a branch and improve carry propagation.
+
+2022-02-15 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpn/generic/strongfibo.c: Correct condition in #if.
+
+	* mpn/generic/mulmod_bknp1.c: New file, with mpn_{mul,sqr}mod_bknp1.
+	* configure.ac (gmp_mpn_functions): Add new file.
+	* gmp-impl.h: Declare new functions.
+	* gmp-impl.h (MPN_{MUL,SQR}MOD_BKNP1_USABLE): Support new functions.
+
+	* tests/mpn/t-{mul,sqr}mod_bknp1.c: New tests for mpn_{mul,sqr}mod_bknp1.
+	* tests/mpn/Makefile.am: Add new tests.
+
+	* tune/speed.c: Recognise new functions: mpn_{mul,sqr}mod_bknp1.
+	* tune/speed.h: Declare new speed_ functions to measure them.
+	* tune/common.c: Implement speed_ functions.
+
+2022-02-01 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mpz/aorsmul_i.c: Use MPZ_NEWALLOC when the operand is overwritten.
+	* mpz/import.c: Reorder branches.
+	* mpz/{init2.c,realloc.c,realloc2.c}: Remove unneeded #includes.
+
 2022-01-20  Marc Glisse  <marc.glisse at inria.fr>
 
 	* doc/gmp.texi: Clarify C++ includes and library.
@@ -7,6 +46,8 @@
 	* gen-sieve.c: Generate masks depending on bit size.
 	* primesieve.c: Remove fixed size (32 and 64 only) masks.
 
+	* tune/speed.c: Add FLAG_NODATA for gmp_primesieve.
+
 2021-12-11 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mpn/generic/toom3_sqr.c: Use a shorter mul when it's simple.
diff -r 6062e24c6ecd -r 27c014307e66 mini-gmp/ChangeLog
--- a/mini-gmp/ChangeLog	Sat Mar 19 10:02:18 2022 +0100
+++ b/mini-gmp/ChangeLog	Sun Mar 20 20:15:49 2022 +0100
@@ -1,3 +1,7 @@
+2022-03-19 Marco Bodrato <bodrato at mail.dm.unipi.it>
+
+	* mini-gmp.c (mpz_swap): Use MPN_PTR_SWAP, tx Paul Eggert.
+
 2021-10-01 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mini-gmp.c: Add asserts (removed at compile time) on limb size.
diff -r 6062e24c6ecd -r 27c014307e66 mpn/generic/mulmod_bknp1.c
--- a/mpn/generic/mulmod_bknp1.c	Sat Mar 19 10:02:18 2022 +0100
+++ b/mpn/generic/mulmod_bknp1.c	Sun Mar 20 20:15:49 2022 +0100
@@ -273,22 +273,6 @@
   if (mpn_sub_n (tp, bp, tp, n + 1))
     _mpn_modbnp1_neg_ip (tp, n, tp[n]);
 
-  /*
-    Oni komence havis A = {ap, k*n+1},
-    kaj X = {bp, n+1} mod (B^n+1),
-
-    Do oni prenas T = X-A mod (B^n+1) ,
-    kaj ni kalkulas
-    R = T/k * (B^(k*n)+1)/(B^n+1) + A.
-
-    Kompreneble, R = A mod ((B^(k*n)+1)/(B^n+1)) .
-    Plue, cxar k estas ne para
-    (B^(k*n)+1)/(B^n+1) = k mod (B^n+1) ;
-    do R = T/k*k + A = X-A+A = X mod (B^n+1) .
-
-    Kiel oni kalkulas T/k, se T ne estas oblo de k?
-    Oni povas selekti T + m (B^n+1) = 0 mod (k) ;
-  */
 #if MOD_BKNP1_USE11
   if (UNLIKELY (k == 11))
     {


More information about the gmp-commit mailing list