diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tune/common.c | 5 | ||||
-rw-r--r-- | tune/speed.c | 1 | ||||
-rw-r--r-- | tune/speed.h | 5 |
4 files changed, 16 insertions, 0 deletions
@@ -1,5 +1,10 @@ 2019-08-06 Niels Möller <nisse@lysator.liu.se> + * tune/common.c (speed_mpn_gcd_11): New function. + * tune/speed.h (speed_mpn_gcd_11): Declare it. + (SPEED_ROUTINE_MPN_GCD_11): New macro. + * tune/speed.c (routine): Add mpn_gcd_11. + * configure.ac (gmp_mpn_functions): Added gcd_11. Also add HAVE_NATIVE_mpn_gcd_11. * mpn/generic/gcd_11.c (mpn_gcd_11): New file and function, diff --git a/tune/common.c b/tune/common.c index 9fefb0d36..1291f5dc9 100644 --- a/tune/common.c +++ b/tune/common.c @@ -1717,6 +1717,11 @@ speed_mpn_gcd_1 (struct speed_params *s) SPEED_ROUTINE_MPN_GCD_1 (mpn_gcd_1); } double +speed_mpn_gcd_11 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_GCD_11 (mpn_gcd_11); +} +double speed_mpn_gcd_1N (struct speed_params *s) { SPEED_ROUTINE_MPN_GCD_1N (mpn_gcd_1); diff --git a/tune/speed.c b/tune/speed.c index 82e9c1ac3..f9261227b 100644 --- a/tune/speed.c +++ b/tune/speed.c @@ -295,6 +295,7 @@ const struct routine_t { { "mpn_hgcd_reduce_2", speed_mpn_hgcd_reduce_2 }, { "mpn_gcd_1", speed_mpn_gcd_1, FLAG_R_OPTIONAL }, + { "mpn_gcd_11", speed_mpn_gcd_11, FLAG_R_OPTIONAL }, { "mpn_gcd_1N", speed_mpn_gcd_1N, FLAG_R_OPTIONAL }, { "mpn_gcd", speed_mpn_gcd }, diff --git a/tune/speed.h b/tune/speed.h index 6ea000b4c..41df4c675 100644 --- a/tune/speed.h +++ b/tune/speed.h @@ -223,6 +223,7 @@ double speed_mpn_hgcd_reduce_1 (struct speed_params *); double speed_mpn_hgcd_reduce_2 (struct speed_params *); double speed_mpn_gcd (struct speed_params *); double speed_mpn_gcd_1 (struct speed_params *); +double speed_mpn_gcd_11 (struct speed_params *); double speed_mpn_gcd_1N (struct speed_params *); double speed_mpn_gcdext (struct speed_params *); double speed_mpn_gcdext_double (struct speed_params *); @@ -2820,6 +2821,10 @@ int speed_routine_count_zeros_setup (struct speed_params *, mp_ptr, int, int); #define SPEED_ROUTINE_MPN_GCD_1(function) \ SPEED_ROUTINE_MPN_GCD_1_CALL( , function (&px[j-1], 1, py[j-1])) +#define SPEED_ROUTINE_MPN_GCD_11(function) \ + SPEED_ROUTINE_MPN_GCD_1_CALL((px[i] |= 1, py[i] |= 1), \ + function (px[j-1], py[j-1])) + #define SPEED_ROUTINE_MPN_JACBASE(function) \ SPEED_ROUTINE_MPN_GCD_1_CALL \ ({ \ |