[Gmp-commit] /var/hg/gmp-5.0: Updates for stable MUPI_DIV_QR_THRESHOLD measur...
mercurial at gmplib.org
mercurial at gmplib.org
Sun May 1 19:52:29 CEST 2011
details: /var/hg/gmp-5.0/rev/c3347a7c2c02
changeset: 13468:c3347a7c2c02
user: Torbjorn Granlund <tege at gmplib.org>
date: Sun May 01 19:52:25 2011 +0200
description:
Updates for stable MUPI_DIV_QR_THRESHOLD measuring.
diffstat:
ChangeLog | 8 ++++++++
gmp-impl.h | 2 ++
mpn/generic/mu_div_qr.c | 9 +++++++++
tune/common.c | 2 +-
tune/speed.h | 2 +-
5 files changed, 21 insertions(+), 2 deletions(-)
diffs (70 lines):
diff -r a67fb988bbb2 -r c3347a7c2c02 ChangeLog
--- a/ChangeLog Sun May 01 15:51:49 2011 +0200
+++ b/ChangeLog Sun May 01 19:52:25 2011 +0200
@@ -75,6 +75,14 @@
touch it. Fixed the case that no assembler files are used, and
GMP_PROG_M4 is omitted.
+2010-05-24 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr_itch): New function.
+ * gmp-impl.h: Declare it.
+ * tune/common.c (speed_mpn_mupi_div_qr): Use new itch function.
+ * tune/speed.h (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Pass parameters right
+ for new itch function.
+
2010-05-14 Torbjorn Granlund <tege at gmplib.org>
* mpn/generic/redc_2.c: Use asm code just for GNU C.
diff -r a67fb988bbb2 -r c3347a7c2c02 gmp-impl.h
--- a/gmp-impl.h Sun May 01 15:51:49 2011 +0200
+++ b/gmp-impl.h Sun May 01 19:52:25 2011 +0200
@@ -1205,6 +1205,8 @@
#define mpn_preinv_mu_div_qr __MPN(preinv_mu_div_qr)
__GMP_DECLSPEC mp_limb_t mpn_preinv_mu_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr));
+#define mpn_preinv_mu_div_qr_itch __MPN(preinv_mu_div_qr_itch)
+__GMP_DECLSPEC mp_size_t mpn_preinv_mu_div_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t, mp_size_t));
#define mpn_mu_divappr_q __MPN(mu_divappr_q)
__GMP_DECLSPEC mp_limb_t mpn_mu_divappr_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr));
diff -r a67fb988bbb2 -r c3347a7c2c02 mpn/generic/mu_div_qr.c
--- a/mpn/generic/mu_div_qr.c Sun May 01 15:51:49 2011 +0200
+++ b/mpn/generic/mu_div_qr.c Sun May 01 19:52:25 2011 +0200
@@ -394,3 +394,12 @@
return in + itch_local + itch_out;
}
+
+mp_size_t
+mpn_preinv_mu_div_qr_itch (mp_size_t nn, mp_size_t dn, mp_size_t in)
+{
+ mp_size_t itch_local = mpn_mulmod_bnm1_next_size (dn + 1);
+ mp_size_t itch_out = mpn_mulmod_bnm1_itch (itch_local, dn, in);
+
+ return itch_local + itch_out;
+}
diff -r a67fb988bbb2 -r c3347a7c2c02 tune/common.c
--- a/tune/common.c Sun May 01 15:51:49 2011 +0200
+++ b/tune/common.c Sun May 01 19:52:25 2011 +0200
@@ -788,7 +788,7 @@
double
speed_mpn_mupi_div_qr (struct speed_params *s)
{
- SPEED_ROUTINE_MPN_MUPI_DIV_QR (mpn_preinv_mu_div_qr, mpn_mu_div_qr_itch);
+ SPEED_ROUTINE_MPN_MUPI_DIV_QR (mpn_preinv_mu_div_qr, mpn_preinv_mu_div_qr_itch);
}
double
diff -r a67fb988bbb2 -r c3347a7c2c02 tune/speed.h
--- a/tune/speed.h Sun May 01 15:51:49 2011 +0200
+++ b/tune/speed.h Sun May 01 19:52:25 2011 +0200
@@ -1616,7 +1616,7 @@
SPEED_RESTRICT_COND (s->size >= 2); \
SPEED_RESTRICT_COND (size1 >= s->size); \
\
- itch = itchfn (size1, s->size, 0); \
+ itch = itchfn (size1, s->size, s->size); \
TMP_MARK; \
SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \
SPEED_TMP_ALLOC_LIMBS (qp, size1 - s->size, s->align_wp); \
More information about the gmp-commit
mailing list