[Gmp-commit] /home/hgfiles/gmp: 35 new changesets
mercurial at gmplib.org
mercurial at gmplib.org
Tue Apr 27 22:26:55 CEST 2010
details: /home/hgfiles/gmp/rev/85d202f23171
changeset: 13542:85d202f23171
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 15:41:19 2010 +0200
description:
Bring comments up-to-date with code.
details: /home/hgfiles/gmp/rev/35860b16bcb4
changeset: 13543:35860b16bcb4
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 15:44:35 2010 +0200
description:
Bring comments up-to-date with code.
details: /home/hgfiles/gmp/rev/d1299e23f58b
changeset: 13544:d1299e23f58b
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 16:24:51 2010 +0200
description:
Update comments.
details: /home/hgfiles/gmp/rev/a885c1c3a315
changeset: 13545:a885c1c3a315
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 16:32:43 2010 +0200
description:
Fix a comment.
details: /home/hgfiles/gmp/rev/d55bf8e8d263
changeset: 13546:d55bf8e8d263
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 16:33:09 2010 +0200
description:
Fix a comment.
details: /home/hgfiles/gmp/rev/3bc5e32d55ab
changeset: 13547:3bc5e32d55ab
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 17:02:42 2010 +0200
description:
New file pentium4/rsh1aors_n.asm.
details: /home/hgfiles/gmp/rev/2a665803905a
changeset: 13548:2a665803905a
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 17:05:04 2010 +0200
description:
Let non-nc code fall into nc code.
details: /home/hgfiles/gmp/rev/91de61670a82
changeset: 13549:91de61670a82
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 17:09:12 2010 +0200
description:
Amend cycle table.
details: /home/hgfiles/gmp/rev/0b0375519205
changeset: 13550:0b0375519205
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 17:37:20 2010 +0200
description:
Use operand-less shift-by-1 insn form.
details: /home/hgfiles/gmp/rev/a08c28da79a6
changeset: 13551:a08c28da79a6
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 17:38:59 2010 +0200
description:
Work around Solaris assembler bug.
details: /home/hgfiles/gmp/rev/e2783acd675f
changeset: 13552:e2783acd675f
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:10:51 2010 +0200
description:
Work around Solaris assembler bug.
details: /home/hgfiles/gmp/rev/096ad348e35b
changeset: 13553:096ad348e35b
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:11:49 2010 +0200
description:
Use operand-less shift-by-1 insn form.
details: /home/hgfiles/gmp/rev/44ad09caf2ce
changeset: 13554:44ad09caf2ce
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:17:38 2010 +0200
description:
Update disabling of slow P4 routines.
details: /home/hgfiles/gmp/rev/c380649122fc
changeset: 13555:c380649122fc
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:21:37 2010 +0200
description:
Add itanium lshiftc support.
details: /home/hgfiles/gmp/rev/dacaba446aea
changeset: 13556:dacaba446aea
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:23:44 2010 +0200
description:
Retune.
details: /home/hgfiles/gmp/rev/25305628dc20
changeset: 13557:25305628dc20
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:27:06 2010 +0200
description:
Misc cleanups. Add slotting comments.
details: /home/hgfiles/gmp/rev/a4322947edf2
changeset: 13558:a4322947edf2
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:29:36 2010 +0200
description:
Rewrite Itanium addition code.
details: /home/hgfiles/gmp/rev/fee68088b48f
changeset: 13559:fee68088b48f
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:31:12 2010 +0200
description:
Adapt to new aorslsh1_n.
details: /home/hgfiles/gmp/rev/cd30947d5cc5
changeset: 13560:cd30947d5cc5
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:35:02 2010 +0200
description:
Rewrite feed-in and wind-down code.
details: /home/hgfiles/gmp/rev/8d931b52fec4
changeset: 13561:8d931b52fec4
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 10 18:49:30 2010 +0200
description:
Give credits to file authors.
details: /home/hgfiles/gmp/rev/d0596377c6b8
changeset: 13562:d0596377c6b8
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Apr 12 10:43:38 2010 +0200
description:
Define SIZE_LOG to avoid division-by-0 in toom tests.
details: /home/hgfiles/gmp/rev/ad5b52854d30
changeset: 13563:ad5b52854d30
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Apr 19 19:38:57 2010 +0200
description:
Trivial merge.
details: /home/hgfiles/gmp/rev/5063c30464ad
changeset: 13564:5063c30464ad
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Apr 19 22:48:08 2010 +0200
description:
Trivial merge.
details: /home/hgfiles/gmp/rev/e98b7850e5f9
changeset: 13565:e98b7850e5f9
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Apr 20 14:15:19 2010 +0200
description:
Retune.
details: /home/hgfiles/gmp/rev/faa25bd74fbc
changeset: 13566:faa25bd74fbc
user: Torbjorn Granlund <tege at gmplib.org>
date: Wed Apr 21 18:23:38 2010 +0200
description:
Swap ldx operands as a temporary workaround for POWER6 pipeline glitch.
details: /home/hgfiles/gmp/rev/a05f67c5d527
changeset: 13567:a05f67c5d527
user: Torbjorn Granlund <tege at gmplib.org>
date: Wed Apr 21 18:52:23 2010 +0200
description:
Swap multiply insns to make them consecutive, for the benefit of POWER6.
details: /home/hgfiles/gmp/rev/1204d0c5b386
changeset: 13568:1204d0c5b386
user: Torbjorn Granlund <tege at gmplib.org>
date: Wed Apr 21 21:02:30 2010 +0200
description:
Swap multiply insns to make them consecutive, for the benefit of POWER6.
details: /home/hgfiles/gmp/rev/1a30573ed419
changeset: 13569:1a30573ed419
user: Torbjorn Granlund <tege at gmplib.org>
date: Wed Apr 21 21:02:49 2010 +0200
description:
Swap multiply insns to make them consecutive, for the benefit of POWER6.
details: /home/hgfiles/gmp/rev/fe061e903729
changeset: 13570:fe061e903729
user: Torbjorn Granlund <tege at gmplib.org>
date: Thu Apr 22 19:25:24 2010 +0200
description:
New file.
details: /home/hgfiles/gmp/rev/9cda7677453c
changeset: 13571:9cda7677453c
user: Torbjorn Granlund <tege at gmplib.org>
date: Thu Apr 22 20:25:29 2010 +0200
description:
Swap multiply insns to make them consecutive, for the benefit of POWER6.
details: /home/hgfiles/gmp/rev/b7a9365ff172
changeset: 13572:b7a9365ff172
user: Torbjorn Granlund <tege at gmplib.org>
date: Sat Apr 24 07:44:00 2010 +0200
description:
Trivial merge.
details: /home/hgfiles/gmp/rev/13422f5803ad
changeset: 13573:13422f5803ad
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Apr 26 19:10:00 2010 +0200
description:
Retune.
details: /home/hgfiles/gmp/rev/ca18982cbe96
changeset: 13574:ca18982cbe96
user: Torbjorn Granlund <tege at gmplib.org>
date: Mon Apr 26 19:14:40 2010 +0200
description:
Retune.
details: /home/hgfiles/gmp/rev/b7042021b46e
changeset: 13575:b7042021b46e
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Apr 27 09:00:38 2010 +0200
description:
Retune.
details: /home/hgfiles/gmp/rev/b2dff0640748
changeset: 13576:b2dff0640748
user: Torbjorn Granlund <tege at gmplib.org>
date: Tue Apr 27 22:26:47 2010 +0200
description:
New file for Power 6 multiply.
diffstat:
ChangeLog | 106 ++
configure.in | 7 +-
gmp-impl.h | 77 +-
mpf/div.c | 2 +-
mpf/reldiff.c | 4 +-
mpf/set_str.c | 8 +-
mpn/Makefile.am | 4 +-
mpn/generic/divis.c | 16 +-
mpn/generic/divrem.c | 3 +-
mpn/generic/gcd.c | 147 +++-
mpn/generic/gcd_lehmer.c | 164 ---
mpn/generic/gcdext_lehmer.c | 2 +-
mpn/generic/hgcd.c | 2 +-
mpn/generic/hgcd2.c | 28 -
mpn/generic/jacbase.c | 12 +-
mpn/generic/jacobi_lehmer.c | 926 ++++++++++++++++++++
mpn/generic/matrix22_mul1_inverse_vector.c | 54 +
mpn/ia64/add_n_sub_n.asm | 382 ++++----
mpn/ia64/addmul_1.asm | 2 +
mpn/ia64/addmul_2.asm | 2 +
mpn/ia64/aors_n.asm | 1242 ++++++++++++++++-----------
mpn/ia64/aorslsh1_n.asm | 7 +-
mpn/ia64/aorslsh2_n.asm | 7 +-
mpn/ia64/aorslshC_n.asm | 491 ++++++----
mpn/ia64/bdiv_dbm1c.asm | 2 +
mpn/ia64/copyd.asm | 2 +
mpn/ia64/copyi.asm | 2 +
mpn/ia64/dive_1.asm | 2 +
mpn/ia64/divrem_1.asm | 2 +
mpn/ia64/divrem_2.asm | 2 +
mpn/ia64/gcd_1.asm | 2 +
mpn/ia64/gmp-mparam.h | 50 +-
mpn/ia64/hamdist.asm | 4 +-
mpn/ia64/invert_limb.asm | 2 +
mpn/ia64/logops_n.asm | 2 +
mpn/ia64/lorrshift.asm | 434 ++++----
mpn/ia64/lshiftc.asm | 451 ++++++++++
mpn/ia64/mod_34lsub1.asm | 12 +-
mpn/ia64/mode1o.asm | 2 +
mpn/ia64/mul_1.asm | 2 +
mpn/ia64/mul_2.asm | 2 +
mpn/ia64/popcount.asm | 2 +
mpn/ia64/rsh1aors_n.asm | 2 +
mpn/ia64/sqr_diagonal.asm | 2 +
mpn/ia64/submul_1.asm | 2 +
mpn/powerpc64/mode64/aorslshC_n.asm | 14 +-
mpn/powerpc64/mode64/aorsmul_1.asm | 23 +-
mpn/powerpc64/mode64/bdiv_dbm1c.asm | 38 +-
mpn/powerpc64/mode64/dive_1.asm | 28 +-
mpn/powerpc64/mode64/divrem_1.asm | 8 +-
mpn/powerpc64/mode64/divrem_2.asm | 12 +-
mpn/powerpc64/mode64/mul_1.asm | 24 +-
mpn/powerpc64/mode64/p6/gmp-mparam.h | 134 +++
mpn/powerpc64/mode64/p6/mul_basecase.asm | 579 +++++++++++++
mpn/x86/aors_n.asm | 4 +-
mpn/x86/divrem_2.asm | 4 +-
mpn/x86/pentium/aors_n.asm | 4 +-
mpn/x86_64/divrem_2.asm | 4 +-
mpn/x86_64/invert_limb.asm | 6 +-
mpn/x86_64/nano/gmp-mparam.h | 80 +-
mpn/x86_64/pentium4/aors_n.asm | 13 +-
mpn/x86_64/pentium4/aorslsh1_n.asm | 12 +-
mpn/x86_64/pentium4/gmp-mparam.h | 9 +-
mpn/x86_64/pentium4/rsh1aors_n.asm | 316 +++++++
mpz/jacobi.c | 155 +++-
tests/mpn/t-toom6h.c | 2 +
tests/mpn/t-toom8h.c | 2 +
tests/mpz/t-jac.c | 4 +-
68 files changed, 4587 insertions(+), 1566 deletions(-)
diffs (truncated from 7598 to 300 lines):
diff -r da5903b6e386 -r b2dff0640748 ChangeLog
--- a/ChangeLog Fri Mar 26 10:23:46 2010 +0100
+++ b/ChangeLog Tue Apr 27 22:26:47 2010 +0200
@@ -1,3 +1,109 @@
+2010-04-27 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/powerpc64/mode64/p6/mul_basecase.asm: New file.
+
+2010-04-23 Niels Möller <nisse at lysator.liu.se>
+
+ * gmp-impl.h (MPN_GCD_LEHMER_N_ITCH): Deleted.
+ (mpn_gcd_lehmer_n): Deleted declaration.
+
+ * mpn/generic/gcd.c (gcd_2): Moved from gcd_lehmer.c.
+ (mpn_gcd): Inlined the code from mpn_gcd_lehmer_n. Also use
+ MPN_GCD_SUBDIV_STEP_ITCH rather than MPN_GCD_LEHMER_N_ITCH.
+
+2010-04-22 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/powerpc64/mode64/bdiv_dbm1c.asm: Swap multiply insns to make them
+ consecutive, for the benefit of POWER6.
+
+ * mpn/powerpc64/mode64/p6/gmp-mparam.h: New file.
+
+2010-04-21 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/generic/gcd_lehmer.c: Deleted file.
+
+ * mpn/powerpc64/mode64/divrem_1.asm: Swap multiply insns to make them
+ consecutive, for the benefit of POWER6.
+ * mpn/powerpc64/mode64/dive_1.asm: Likewise.
+ * mpn/powerpc64/mode64/divrem_2.asm: Likewise.
+ * mpn/powerpc64/mode64/mul_1.asm: Likewise.
+ * mpn/powerpc64/mode64/aorsmul_1.asm: Likewise.
+
+ * mpn/powerpc64/mode64/aorslshC_n.asm: Swap ldx operands as a temporary
+ workaround for POWER6 pipeline glitch.
+
+2010-04-19 Niels Möller <nisse at lysator.liu.se>
+
+ * mpz/jacobi.c (mpz_jacobi): New implementation using
+ mpn_jacobi_lehmer. Currently #if:ed out.
+
+ * mpn/generic/jacbase.c (mpn_jacobi_base)
+ [JACOBI_BASE_METHOD < 4]: Support inputs with a >= b.
+
+ * gmp-impl.h (mpn_jacobi_lehmer): Added prototype.
+ (jacobi_table): Declare.
+ (mpn_jacobi_init): New inline function.
+ (mpn_jacobi_finish): Likewise.
+ (mpn_jacobi_update): Likewise.
+
+ * mpn/generic/jacobi_lehmer.c (mpn_jacobi_lehmer): New file, new
+ function.
+
+ * configure.in (gmp_mpn_functions): Added jacobi_lehmer.
+
+2010-04-14 Niels Möller <nisse at lysator.liu.se>
+
+ * configure.in (gmp_mpn_functions): Added
+ matrix22_mul1_inverse_vector.
+ * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Added
+ matrix22_mul1_inverse_vector.c.
+
+ * gmp-impl.h (mpn_matrix22_mul1_inverse_vector): Updated for
+ rename of mpn_matrix22_mul1_inverse_vector.
+ * mpn/generic/gcd_lehmer.c (mpn_gcd_lehmer_n): Likewise.
+ * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Likewise.
+ * mpn/generic/hgcd.c (hgcd_step): Likewise.
+
+ * mpn/generic/matrix22_mul1_inverse_vector.c
+ (mpn_matrix22_mul1_inverse_vector): New file, function moved and
+ renamed...
+ * mpn/generic/hgcd2.c (mpn_hgcd_mul_matrix1_inverse_vector):
+ ...from here.
+
+2010-04-12 Torbjorn Granlund <tege at gmplib.org>
+
+ * tests/mpn/t-toom6h.c (SIZE_LOG): Define.
+ * tests/mpn/t-toom8h.c (SIZE_LOG): Likewise.
+
+2010-04-10 Torbjorn Granlund <tege at gmplib.org>
+
+ * mpn/ia64/lorrshift.asm: Rewrite feed-in and wind-down code.
+
+ * mpn/ia64/aorslsh1_n.asm: Adapt to new aorslsh1_n.
+ * mpn/ia64/aorslsh1_n.asm: Likewise.
+
+ * mpn/ia64/aors_n.asm: Complete rewrite.
+ * mpn/ia64/aorslsh1_n.asm: Likewise.
+
+ * mpn/ia64/add_n_sub_n.asm: Misc cleanups. Add slotting comments.
+
+ * mpn/ia64/lshiftc.asm: New file.
+
+ * mpn/x86_64/pentium4/gmp-mparam.h: No longer disable rsh1add_n and
+ rsh1sub_n; instead disable rsblsh1_n, addlsh2_n, rsblsh2_n.
+
+ * mpn/x86/divrem_2.asm: Use "orb" instead of "or" to work around
+ Solaris assembler bug.
+ * mpn/x86_64/mpn/x86_64/divrem_2.asm: Likewise.
+
+ * mpn/x86/aors_n.asm: Use operand-less shift-by-1 insn form.
+ * mpn/x86/pentium/aors_n.asm: Likewise.
+ * mpn/x86_64/invert_limb.asm: Likewise.
+
+ * mpn/x86_64/pentium4/aors_n.asm: Let non-nc code fall into nc code.
+
+ * mpn/x86_64/pentium4/rsh1aors_n.asm: New file.
+
2010-03-25 Torbjorn Granlund <tege at gmplib.org>
* mpn/ia64/add_n_sub_n.asm: New file.
diff -r da5903b6e386 -r b2dff0640748 configure.in
--- a/configure.in Fri Mar 26 10:23:46 2010 +0100
+++ b/configure.in Tue Apr 27 22:26:47 2010 +0200
@@ -2513,10 +2513,11 @@
random random2 pow_1 \
rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \
perfsqr perfpow \
- gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \
+ gcd_1 gcd gcdext_1 gcdext gcd_subdiv_step \
gcdext_lehmer gcdext_subdiv_step \
- div_q tdiv_qr jacbase get_d \
- matrix22_mul hgcd2 hgcd mullo_n mullo_basecase \
+ div_q tdiv_qr jacbase jacobi_lehmer get_d \
+ matrix22_mul matrix22_mul1_inverse_vector \
+ hgcd2 hgcd mullo_n mullo_basecase \
toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \
toom33_mul toom43_mul toom53_mul toom63_mul \
toom44_mul \
diff -r da5903b6e386 -r b2dff0640748 gmp-impl.h
--- a/gmp-impl.h Fri Mar 26 10:23:46 2010 +0100
+++ b/gmp-impl.h Tue Apr 27 22:26:47 2010 +0200
@@ -876,6 +876,9 @@
#define mpn_jacobi_base __MPN(jacobi_base)
__GMP_DECLSPEC int mpn_jacobi_base __GMP_PROTO ((mp_limb_t, mp_limb_t, int)) ATTRIBUTE_CONST;
+#define mpn_jacobi_lehmer __MPN(jacobi_lehmer)
+__GMP_DECLSPEC int mpn_jacobi_lehmer __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, unsigned, mp_ptr));
+
#define mpn_mod_1c __MPN(mod_1c)
__GMP_DECLSPEC mp_limb_t mpn_mod_1c __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE;
@@ -3570,6 +3573,7 @@
#endif
+/* FIXME: Macros for old jacobi code, review what's still needed. */
/* BIT1 means a result value in bit 1 (second least significant bit), with a
zero bit representing +1 and a one bit representing -1. Bits other than
@@ -3715,6 +3719,70 @@
} \
} while (0)
+/* For new jacobi code. */
+#define jacobi_table __gmp_jacobi_table
+__GMP_DECLSPEC extern const unsigned char jacobi_table[208];
+
+/* Bit layout for the initial state. b must be odd.
+
+ 3 2 1 0
+ +--+--+--+--+
+ |a1|a0|b1| s|
+ +--+--+--+--+
+
+ */
+static inline unsigned
+mpn_jacobi_init (unsigned a, unsigned b, unsigned s)
+{
+ ASSERT (b & 1);
+ ASSERT (s <= 1);
+ return ((a & 3) << 2) + (b & 2) + s;
+}
+
+static inline int
+mpn_jacobi_finish (unsigned bits)
+{
+ /* (a, b) = (1,0) or (0,1) */
+ ASSERT ( (bits & 14) == 0);
+
+ return 1-2*(bits & 1);
+}
+
+static inline unsigned
+mpn_jacobi_update (unsigned bits, unsigned denominator, unsigned q)
+{
+ /* FIXME: Could halve table size by not including the e bit in the
+ * index, and instead xor when updating. Then the lookup would be
+ * like
+ *
+ * bits ^= table[((bits & 30) << 2) + (denominator << 2) + q];
+ */
+
+ ASSERT (bits < 26);
+ ASSERT (denominator < 2);
+ ASSERT (q < 4);
+
+ /* For almost all calls, denominator is constant and quite often q
+ is constant too. So use addition rather than or, so the compiler
+ can put the constant part can into the offset of an indexed
+ addressing instruction.
+
+ With constant denominator, the below table lookup is compiled to
+
+ C Constant q = 1, constant denominator = 1
+ movzbl table+5(%eax,8), %eax
+
+ or
+
+ C q in %edx, constant denominator = 1
+ movzbl table+4(%edx,%eax,8), %eax
+
+ One could maintain the state preshifted 3 bits, to save a shift
+ here, but at least on x86, that's no real saving.
+ */
+ return bits = jacobi_table[(bits << 3) + (denominator << 2) + q];
+}
+
/* Matrix multiplication */
#define mpn_matrix22_mul __MPN(matrix22_mul)
__GMP_DECLSPEC void mpn_matrix22_mul __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr));
@@ -3764,8 +3832,8 @@
#define mpn_hgcd_mul_matrix1_vector __MPN (hgcd_mul_matrix1_vector)
__GMP_DECLSPEC mp_size_t mpn_hgcd_mul_matrix1_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t));
-#define mpn_hgcd_mul_matrix1_inverse_vector __MPN (hgcd_mul_matrix1_inverse_vector)
-__GMP_DECLSPEC mp_size_t mpn_hgcd_mul_matrix1_inverse_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t));
+#define mpn_matrix22_mul1_inverse_vector __MPN (matrix22_mul1_inverse_vector)
+__GMP_DECLSPEC mp_size_t mpn_matrix22_mul1_inverse_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t));
struct hgcd_matrix
{
@@ -3797,11 +3865,6 @@
#define mpn_gcd_subdiv_step __MPN(gcd_subdiv_step)
__GMP_DECLSPEC mp_size_t mpn_gcd_subdiv_step __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr));
-#define MPN_GCD_LEHMER_N_ITCH(n) (n)
-
-#define mpn_gcd_lehmer_n __MPN(gcd_lehmer_n)
-__GMP_DECLSPEC mp_size_t mpn_gcd_lehmer_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_ptr));
-
#define mpn_gcdext_subdiv_step __MPN(gcdext_subdiv_step)
__GMP_DECLSPEC mp_size_t mpn_gcdext_subdiv_step __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_ptr));
diff -r da5903b6e386 -r b2dff0640748 mpf/div.c
--- a/mpf/div.c Fri Mar 26 10:23:46 2010 +0100
+++ b/mpf/div.c Tue Apr 27 22:26:47 2010 +0200
@@ -37,7 +37,7 @@
to save one limb in the division.
If r==u but the size is enough bigger than prec that there won't be an
- overlap between quotient and dividend in mpn_tdiv_qr, then we can avoid
+ overlap between quotient and dividend in mpn_div_q, then we can avoid
copying up,usize. This would only arise from a prec reduced with
mpf_set_prec_raw and will be pretty unusual, but might be worthwhile if
it could be worked into the copy_u decision cleanly. */
diff -r da5903b6e386 -r b2dff0640748 mpf/reldiff.c
--- a/mpf/reldiff.c Fri Mar 26 10:23:46 2010 +0100
+++ b/mpf/reldiff.c Tue Apr 27 22:26:47 2010 +0200
@@ -22,8 +22,8 @@
/* The precision we use for d = x-y is based on what mpf_div will want from
- the dividend. It calls mpn_tdiv_qr to produce a quotient of rprec+1
- limbs. So rprec+1 == dsize - xsize + 1, hence dprec = rprec+xsize. */
+ the dividend. It calls mpn_div_q to produce a quotient of rprec+1 limbs.
+ So rprec+1 == dsize - xsize + 1, hence dprec = rprec+xsize. */
void
mpf_reldiff (mpf_t rdiff, mpf_srcptr x, mpf_srcptr y)
diff -r da5903b6e386 -r b2dff0640748 mpf/set_str.c
--- a/mpf/set_str.c Fri Mar 26 10:23:46 2010 +0100
+++ b/mpf/set_str.c Tue Apr 27 22:26:47 2010 +0200
@@ -24,7 +24,7 @@
This still needs work, as suggested by some FIXME comments.
1. Don't depend on superfluous mantissa digits.
2. Allocate temp space more cleverly.
- 3. Use mpn_tdiv_qr instead of mpn_lshift+mpn_divrem.
+ 3. Use mpn_div_q instead of mpn_lshift+mpn_divrem.
*/
#define _GNU_SOURCE /* for DECIMAL_POINT in langinfo.h */
@@ -323,8 +323,10 @@
if (divflag)
{
#if 0
- /* FIXME: Should use mpn_tdiv here. */
- mpn_tdiv_qr (qp, mp, 0L, mp, mn, rp, rn);
+ /* FIXME: Should use mpn_div_q here. */
+ ...
+ mpn_div_q (tp, mp, mn, rp, rn, scratch);
+ ...
#else
mp_ptr qp;
mp_limb_t qlimb;
diff -r da5903b6e386 -r b2dff0640748 mpn/Makefile.am
--- a/mpn/Makefile.am Fri Mar 26 10:23:46 2010 +0100
+++ b/mpn/Makefile.am Tue Apr 27 22:26:47 2010 +0200
More information about the gmp-commit
mailing list