summaryrefslogtreecommitdiff
path: root/tune/speed.h
diff options
context:
space:
mode:
authorNiels M?ller <nisse@lysator.liu.se>2019-09-04 21:46:41 +0200
committerNiels M?ller <nisse@lysator.liu.se>2019-09-04 21:46:41 +0200
commit95d545683e958f411d896cc9ae55507c144a063a (patch)
tree394105f2853efc7b25dc90943651fb5a26644643 /tune/speed.h
parent74469d71e6792fccdfb17f2913aaabafb7094a89 (diff)
downloadgmp-95d545683e958f411d896cc9ae55507c144a063a.tar.gz
Tuneup support for HGCD2_METHOD, controlling div1 usage in mpn_hgcd2.
* mpn/generic/hgcd2.c (HGCD2_METHOD): New parameter. (DIV1): New macro, using either the div1 function or plain division, depending on the value of HGCD2_METHOD. (mpn_hgcd2): Use DIV1. * tune/speed.c, tune/speed.h, tune/common.c, tune/Makefile.am: Add measuring of mpn_hgcd2 methods. * tune/hgcd2-1.c, tune/hgcd2-2.c: New files. * tune/tuneup.c: Tune HGCD2_METHOD.
Diffstat (limited to 'tune/speed.h')
-rw-r--r--tune/speed.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tune/speed.h b/tune/speed.h
index 044bc9c2b..968bccac7 100644
--- a/tune/speed.h
+++ b/tune/speed.h
@@ -215,6 +215,8 @@ double speed_mpn_div_qr_2u (struct speed_params *);
double speed_mpn_fib2_ui (struct speed_params *);
double speed_mpn_matrix22_mul (struct speed_params *);
double speed_mpn_hgcd2 (struct speed_params *);
+double speed_mpn_hgcd2_1 (struct speed_params *);
+double speed_mpn_hgcd2_2 (struct speed_params *);
double speed_mpn_hgcd (struct speed_params *);
double speed_mpn_hgcd_lehmer (struct speed_params *);
double speed_mpn_hgcd_appr (struct speed_params *);
@@ -481,6 +483,11 @@ int mpn_jacobi_base_2 (mp_limb_t, mp_limb_t, int);
int mpn_jacobi_base_3 (mp_limb_t, mp_limb_t, int);
int mpn_jacobi_base_4 (mp_limb_t, mp_limb_t, int);
+int mpn_hgcd2_1 (mp_limb_t ah, mp_limb_t al, mp_limb_t bh, mp_limb_t bl,
+ struct hgcd_matrix1 *M);
+int mpn_hgcd2_2 (mp_limb_t ah, mp_limb_t al, mp_limb_t bh, mp_limb_t bl,
+ struct hgcd_matrix1 *M);
+
mp_limb_t mpn_mod_1_div (mp_srcptr, mp_size_t, mp_limb_t);
mp_limb_t mpn_mod_1_inv (mp_srcptr, mp_size_t, mp_limb_t);