[Gmp-commit] /var/hg/gmp: tune/speed: Support mpz_primorial_ui.

mercurial at gmplib.org mercurial at gmplib.org
Sun Nov 22 09:18:49 UTC 2015


details:   /var/hg/gmp/rev/bd9580e00fe9
changeset: 16977:bd9580e00fe9
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Sun Nov 22 10:18:21 2015 +0100
description:
tune/speed: Support mpz_primorial_ui.

diffstat:

 ChangeLog     |  4 ++++
 tune/common.c |  6 ++++++
 tune/speed.c  |  1 +
 tune/speed.h  |  1 +
 4 files changed, 12 insertions(+), 0 deletions(-)

diffs (52 lines):

diff -r 1c1e187d843c -r bd9580e00fe9 ChangeLog
--- a/ChangeLog	Sun Nov 22 08:33:53 2015 +0100
+++ b/ChangeLog	Sun Nov 22 10:18:21 2015 +0100
@@ -5,6 +5,10 @@
 	* tests/mpn/t-toom22.c: Keep on testing small sizes.
 	* tests/mpz/t-primorial_ui.c: Test a single "large" number.
 
+	* tune/common.c (speed_mpz_primorial_ui): New functions.
+	* tune/speed.h: Declare it.
+	* tune/speed.c (routine): Add mpz_primorial_ui.
+
 2015-11-13 Marco Bodrato <bodrato at mail.dm.unipi.it>
 
 	* mini-gmp/mini-gmp.c: Lazy allocation for mpz_t.
diff -r 1c1e187d843c -r bd9580e00fe9 tune/common.c
--- a/tune/common.c	Sun Nov 22 08:33:53 2015 +0100
+++ b/tune/common.c	Sun Nov 22 10:18:21 2015 +0100
@@ -1785,6 +1785,12 @@
   SPEED_ROUTINE_MPZ_UI (mpz_2fac_ui);
 }
 
+double
+speed_mpz_primorial_ui (struct speed_params *s)
+{
+  SPEED_ROUTINE_MPZ_UI (mpz_primorial_ui);
+}
+
 
 double
 speed_mpn_fib2_ui (struct speed_params *s)
diff -r 1c1e187d843c -r bd9580e00fe9 tune/speed.c
--- a/tune/speed.c	Sun Nov 22 08:33:53 2015 +0100
+++ b/tune/speed.c	Sun Nov 22 10:18:21 2015 +0100
@@ -408,6 +408,7 @@
   { "mpz_bin_ui",        speed_mpz_bin_ui,   FLAG_NODATA | FLAG_R_OPTIONAL },
   { "mpz_fac_ui",        speed_mpz_fac_ui,   FLAG_NODATA   },
   { "mpz_2fac_ui",       speed_mpz_2fac_ui,  FLAG_NODATA   },
+  { "mpz_primorial_ui",  speed_mpz_primorial_ui, FLAG_NODATA },
   { "mpz_powm",          speed_mpz_powm             },
   { "mpz_powm_mod",      speed_mpz_powm_mod         },
   { "mpz_powm_redc",     speed_mpz_powm_redc        },
diff -r 1c1e187d843c -r bd9580e00fe9 tune/speed.h
--- a/tune/speed.h	Sun Nov 22 08:33:53 2015 +0100
+++ b/tune/speed.h	Sun Nov 22 10:18:21 2015 +0100
@@ -388,6 +388,7 @@
 double speed_mpz_bin_ui (struct speed_params *);
 double speed_mpz_fac_ui (struct speed_params *);
 double speed_mpz_2fac_ui (struct speed_params *);
+double speed_mpz_primorial_ui (struct speed_params *);
 double speed_mpz_fib_ui (struct speed_params *);
 double speed_mpz_fib2_ui (struct speed_params *);
 double speed_mpz_init_clear (struct speed_params *);


More information about the gmp-commit mailing list