[Gmp-commit] /home/hgfiles/gmp: Prefix name with mpn_.

mercurial at gmplib.org mercurial at gmplib.org
Mon Dec 28 16:53:19 CET 2009


details:   /home/hgfiles/gmp/rev/92ee2d0d1857
changeset: 13249:92ee2d0d1857
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Dec 28 16:53:17 2009 +0100
description:
Prefix name with mpn_.

diffstat:

 ChangeLog                          |   8 ++++++++
 gmp-impl.h                         |   2 +-
 mpn/generic/toom63_mul.c           |   6 +++---
 mpn/generic/toom6_sqr.c            |  10 +++++-----
 mpn/generic/toom6h_mul.c           |  10 +++++-----
 mpn/generic/toom8_sqr.c            |  14 +++++++-------
 mpn/generic/toom8h_mul.c           |  14 +++++++-------
 mpn/generic/toom_couple_handling.c |   4 ++--
 8 files changed, 38 insertions(+), 30 deletions(-)

diffs (273 lines):

diff -r 4aaca500e158 -r 92ee2d0d1857 ChangeLog
--- a/ChangeLog	Mon Dec 28 16:33:49 2009 +0100
+++ b/ChangeLog	Mon Dec 28 16:53:17 2009 +0100
@@ -1,5 +1,13 @@
 2009-12-28  Torbjorn Granlund  <tege at gmplib.org>
 
+	* mpn/generic/toom_couple_handling.c: Prefix name with mpn_.
+	* gmp-impl.h: Likewise.
+	* mpn/generic/toom63_mul.c: Likewise.
+	* mpn/generic/toom6_sqr.c: Likewise.
+	* mpn/generic/toom6h_mul.c: Likewise.
+	* mpn/generic/toom8_sqr.c: Likewise.
+	* mpn/generic/toom8h_mul.c: Likewise.
+
 	* configure.in (gmp_mpn_functions_optional) Move "com" from here...
 	(gmp_mpn_functions): ...to here.
 	* mpn/generic/com.c: New file.
diff -r 4aaca500e158 -r 92ee2d0d1857 gmp-impl.h
--- a/gmp-impl.h	Mon Dec 28 16:33:49 2009 +0100
+++ b/gmp-impl.h	Mon Dec 28 16:53:17 2009 +0100
@@ -1077,7 +1077,7 @@
 __GMP_DECLSPEC void      mpn_toom_interpolate_16pts __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_size_t, int, mp_ptr));
 
 #define   mpn_toom_couple_handling __MPN(toom_couple_handling)
-__GMP_DECLSPEC void      toom_couple_handling __GMP_PROTO ((mp_ptr, mp_size_t, mp_ptr, int, mp_size_t, int, int));
+__GMP_DECLSPEC void mpn_toom_couple_handling __GMP_PROTO ((mp_ptr, mp_size_t, mp_ptr, int, mp_size_t, int, int));
 
 #define   mpn_toom_eval_dgr3_pm1 __MPN(toom_eval_dgr3_pm1)
 __GMP_DECLSPEC int mpn_toom_eval_dgr3_pm1 __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_size_t, mp_ptr));
diff -r 4aaca500e158 -r 92ee2d0d1857 mpn/generic/toom63_mul.c
--- a/mpn/generic/toom63_mul.c	Mon Dec 28 16:33:49 2009 +0100
+++ b/mpn/generic/toom63_mul.c	Mon Dec 28 16:53:17 2009 +0100
@@ -139,7 +139,7 @@
   sign ^= abs_sub_add_n (v1, v3, pp, n + 1);
   TOOM_63_MUL_N_REC(pp, v0, v1, n + 1, ws); /* A(-4)*B(-4) */
   TOOM_63_MUL_N_REC(r3, v2, v3, n + 1, ws); /* A(+4)*B(+4) */
-  toom_couple_handling (r3, 2*n+1, pp, sign, n, 2, 4);
+  mpn_toom_couple_handling (r3, 2*n+1, pp, sign, n, 2, 4);
 
   /* $\pm1$ */
   sign = mpn_toom_eval_pm1 (v2, v0, 5, ap, n, s,    pp);
@@ -176,7 +176,7 @@
 #endif
   TOOM_63_MUL_N_REC(pp, v0, v1, n + 1, ws); /* A(-1)*B(-1) */
   TOOM_63_MUL_N_REC(r7, v2, v3, n + 1, ws); /* A(1)*B(1) */
-  toom_couple_handling (r7, 2*n+1, pp, sign, n, 0, 0);
+  mpn_toom_couple_handling (r7, 2*n+1, pp, sign, n, 0, 0);
 
   /* $\pm2$ */
   sign = mpn_toom_eval_pm2 (v2, v0, 5, ap, n, s, pp);
@@ -190,7 +190,7 @@
   sign ^= abs_sub_add_n (v1, v3, pp, n + 1);
   TOOM_63_MUL_N_REC(pp, v0, v1, n + 1, ws); /* A(-2)*B(-2) */
   TOOM_63_MUL_N_REC(r5, v2, v3, n + 1, ws); /* A(+2)*B(+2) */
-  toom_couple_handling (r5, 2*n+1, pp, sign, n, 1, 2);
+  mpn_toom_couple_handling (r5, 2*n+1, pp, sign, n, 1, 2);
 
   /* A(0)*B(0) */
   TOOM_63_MUL_N_REC(pp, ap, bp, n, ws);
diff -r 4aaca500e158 -r 92ee2d0d1857 mpn/generic/toom6_sqr.c
--- a/mpn/generic/toom6_sqr.c	Mon Dec 28 16:33:49 2009 +0100
+++ b/mpn/generic/toom6_sqr.c	Mon Dec 28 16:53:17 2009 +0100
@@ -117,31 +117,31 @@
   mpn_toom_eval_pm2rexp (v2, v0, 5, ap, n, s, 1, pp);
   TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */
   TOOM6_SQR_REC(r5, v2, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */
-  toom_couple_handling(r5, 2 * n + 1, pp, 0, n, 1, 0);
+  mpn_toom_couple_handling (r5, 2 * n + 1, pp, 0, n, 1, 0);
 
   /* $\pm1$ */
   mpn_toom_eval_pm1 (v2, v0, 5, ap, n, s,    pp);
   TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-1)*B(-1) */
   TOOM6_SQR_REC(r3, v2, n + 1, wse); /* A(1)*B(1) */
-  toom_couple_handling(r3, 2 * n + 1, pp, 0, n, 0, 0);
+  mpn_toom_couple_handling (r3, 2 * n + 1, pp, 0, n, 0, 0);
 
   /* $\pm4$ */
   mpn_toom_eval_pm2exp (v2, v0, 5, ap, n, s, 2, pp);
   TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-4)*B(-4) */
   TOOM6_SQR_REC(r1, v2, n + 1, wse); /* A(+4)*B(+4) */
-  toom_couple_handling(r1, 2 * n + 1, pp, 0, n, 2, 4);
+  mpn_toom_couple_handling (r1, 2 * n + 1, pp, 0, n, 2, 4);
 
   /* $\pm1/4$ */
   mpn_toom_eval_pm2rexp (v2, v0, 5, ap, n, s, 2, pp);
   TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */
   TOOM6_SQR_REC(r4, v2, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */
-  toom_couple_handling(r4, 2 * n + 1, pp, 0, n, 2, 0);
+  mpn_toom_couple_handling (r4, 2 * n + 1, pp, 0, n, 2, 0);
 
   /* $\pm2$ */
   mpn_toom_eval_pm2 (v2, v0, 5, ap, n, s, pp);
   TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-2)*B(-2) */
   TOOM6_SQR_REC(r2, v2, n + 1, wse); /* A(+2)*B(+2) */
-  toom_couple_handling(r2, 2 * n + 1, pp, 0, n, 1, 2);
+  mpn_toom_couple_handling (r2, 2 * n + 1, pp, 0, n, 1, 2);
 
 #undef v0
 #undef v2
diff -r 4aaca500e158 -r 92ee2d0d1857 mpn/generic/toom6h_mul.c
--- a/mpn/generic/toom6h_mul.c	Mon Dec 28 16:33:49 2009 +0100
+++ b/mpn/generic/toom6h_mul.c	Mon Dec 28 16:53:17 2009 +0100
@@ -162,7 +162,7 @@
 	 mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 1, pp);
   TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */
   TOOM6H_MUL_N_REC(r5, v2, v3, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */
-  toom_couple_handling(r5, 2 * n + 1, pp, sign, n, 1+half , half);
+  mpn_toom_couple_handling (r5, 2 * n + 1, pp, sign, n, 1+half , half);
 
   /* $\pm1$ */
   sign = mpn_toom_eval_pm1 (v2, v0, p, ap, n, s,    pp);
@@ -172,28 +172,28 @@
     sign ^= mpn_toom_eval_pm1 (v3, v1, q, bp, n, t,    pp);
   TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1)*B(-1) */
   TOOM6H_MUL_N_REC(r3, v2, v3, n + 1, wse); /* A(1)*B(1) */
-  toom_couple_handling(r3, 2 * n + 1, pp, sign, n, 0, 0);
+  mpn_toom_couple_handling (r3, 2 * n + 1, pp, sign, n, 0, 0);
 
   /* $\pm4$ */
   sign = mpn_toom_eval_pm2exp (v2, v0, p, ap, n, s, 2, pp) ^
 	 mpn_toom_eval_pm2exp (v3, v1, q, bp, n, t, 2, pp);
   TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-4)*B(-4) */
   TOOM6H_MUL_N_REC(r1, v2, v3, n + 1, wse); /* A(+4)*B(+4) */
-  toom_couple_handling(r1, 2 * n + 1, pp, sign, n, 2, 4);
+  mpn_toom_couple_handling (r1, 2 * n + 1, pp, sign, n, 2, 4);
 
   /* $\pm1/4$ */
   sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 2, pp) ^
 	 mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 2, pp);
   TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */
   TOOM6H_MUL_N_REC(r4, v2, v3, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */
-  toom_couple_handling(r4, 2 * n + 1, pp, sign, n, 2*(1+half), 2*(half));
+  mpn_toom_couple_handling (r4, 2 * n + 1, pp, sign, n, 2*(1+half), 2*(half));
 
   /* $\pm2$ */
   sign = mpn_toom_eval_pm2 (v2, v0, p, ap, n, s, pp) ^
 	 mpn_toom_eval_pm2 (v3, v1, q, bp, n, t, pp);
   TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-2)*B(-2) */
   TOOM6H_MUL_N_REC(r2, v2, v3, n + 1, wse); /* A(+2)*B(+2) */
-  toom_couple_handling(r2, 2 * n + 1, pp, sign, n, 1, 2);
+  mpn_toom_couple_handling (r2, 2 * n + 1, pp, sign, n, 1, 2);
 
 #undef v0
 #undef v1
diff -r 4aaca500e158 -r 92ee2d0d1857 mpn/generic/toom8_sqr.c
--- a/mpn/generic/toom8_sqr.c	Mon Dec 28 16:33:49 2009 +0100
+++ b/mpn/generic/toom8_sqr.c	Mon Dec 28 16:53:17 2009 +0100
@@ -139,43 +139,43 @@
   mpn_toom_eval_pm2rexp (v2, v0, 7, ap, n, s, 3, pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1/8)*B(-1/8)*8^. */
   TOOM8_SQR_REC(r7, v2, n + 1, wse); /* A(+1/8)*B(+1/8)*8^. */
-  toom_couple_handling(r7, 2 * n + 1 + BIT_CORRECTION, pp, 0, n, 3, 0);
+  mpn_toom_couple_handling (r7, 2 * n + 1 + BIT_CORRECTION, pp, 0, n, 3, 0);
 
   /* $\pm1/4$ */
   mpn_toom_eval_pm2rexp (v2, v0, 7, ap, n, s, 2, pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */
   TOOM8_SQR_REC(r5, v2, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */
-  toom_couple_handling(r5, 2 * n + 1, pp, 0, n, 2, 0);
+  mpn_toom_couple_handling (r5, 2 * n + 1, pp, 0, n, 2, 0);
 
   /* $\pm2$ */
   mpn_toom_eval_pm2 (v2, v0, 7, ap, n, s, pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-2)*B(-2) */
   TOOM8_SQR_REC(r3, v2, n + 1, wse); /* A(+2)*B(+2) */
-  toom_couple_handling(r3, 2 * n + 1, pp, 0, n, 1, 2);
+  mpn_toom_couple_handling (r3, 2 * n + 1, pp, 0, n, 1, 2);
 
   /* $\pm8$ */
   mpn_toom_eval_pm2exp (v2, v0, 7, ap, n, s, 3, pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-8)*B(-8) */
   TOOM8_SQR_REC(r1, v2, n + 1, wse); /* A(+8)*B(+8) */
-  toom_couple_handling(r1, 2 * n + 1 + BIT_CORRECTION, pp, 0, n, 3, 6);
+  mpn_toom_couple_handling (r1, 2 * n + 1 + BIT_CORRECTION, pp, 0, n, 3, 6);
 
   /* $\pm1/2$ */
   mpn_toom_eval_pm2rexp (v2, v0, 7, ap, n, s, 1, pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */
   TOOM8_SQR_REC(r6, v2, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */
-  toom_couple_handling(r6, 2 * n + 1, pp, 0, n, 1, 0);
+  mpn_toom_couple_handling (r6, 2 * n + 1, pp, 0, n, 1, 0);
 
   /* $\pm1$ */
   mpn_toom_eval_pm1 (v2, v0, 7, ap, n, s,    pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1)*B(-1) */
   TOOM8_SQR_REC(r4, v2, n + 1, wse); /* A(1)*B(1) */
-  toom_couple_handling(r4, 2 * n + 1, pp, 0, n, 0, 0);
+  mpn_toom_couple_handling (r4, 2 * n + 1, pp, 0, n, 0, 0);
 
   /* $\pm4$ */
   mpn_toom_eval_pm2exp (v2, v0, 7, ap, n, s, 2, pp);
   TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-4)*B(-4) */
   TOOM8_SQR_REC(r2, v2, n + 1, wse); /* A(+4)*B(+4) */
-  toom_couple_handling(r2, 2 * n + 1, pp, 0, n, 2, 4);
+  mpn_toom_couple_handling (r2, 2 * n + 1, pp, 0, n, 2, 4);
 
 #undef v0
 #undef v2
diff -r 4aaca500e158 -r 92ee2d0d1857 mpn/generic/toom8h_mul.c
--- a/mpn/generic/toom8h_mul.c	Mon Dec 28 16:33:49 2009 +0100
+++ b/mpn/generic/toom8h_mul.c	Mon Dec 28 16:53:17 2009 +0100
@@ -201,35 +201,35 @@
 	 mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 3, pp);
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/8)*B(-1/8)*8^. */
   TOOM8H_MUL_N_REC(r7, v2, v3, n + 1, wse); /* A(+1/8)*B(+1/8)*8^. */
-  toom_couple_handling(r7, 2 * n + 1 + BIT_CORRECTION, pp, sign, n, 3*(1+half), 3*(half));
+  mpn_toom_couple_handling (r7, 2 * n + 1 + BIT_CORRECTION, pp, sign, n, 3*(1+half), 3*(half));
 
   /* $\pm1/4$ */
   sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 2, pp) ^
 	 mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 2, pp);
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */
   TOOM8H_MUL_N_REC(r5, v2, v3, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */
-  toom_couple_handling(r5, 2 * n + 1, pp, sign, n, 2*(1+half), 2*(half));
+  mpn_toom_couple_handling (r5, 2 * n + 1, pp, sign, n, 2*(1+half), 2*(half));
 
   /* $\pm2$ */
   sign = mpn_toom_eval_pm2 (v2, v0, p, ap, n, s, pp) ^
 	 mpn_toom_eval_pm2 (v3, v1, q, bp, n, t, pp);
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-2)*B(-2) */
   TOOM8H_MUL_N_REC(r3, v2, v3, n + 1, wse); /* A(+2)*B(+2) */
-  toom_couple_handling(r3, 2 * n + 1, pp, sign, n, 1, 2);
+  mpn_toom_couple_handling (r3, 2 * n + 1, pp, sign, n, 1, 2);
 
   /* $\pm8$ */
   sign = mpn_toom_eval_pm2exp (v2, v0, p, ap, n, s, 3, pp) ^
 	 mpn_toom_eval_pm2exp (v3, v1, q, bp, n, t, 3, pp);
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-8)*B(-8) */
   TOOM8H_MUL_N_REC(r1, v2, v3, n + 1, wse); /* A(+8)*B(+8) */
-  toom_couple_handling(r1, 2 * n + 1 + BIT_CORRECTION, pp, sign, n, 3, 6);
+  mpn_toom_couple_handling (r1, 2 * n + 1 + BIT_CORRECTION, pp, sign, n, 3, 6);
 
   /* $\pm1/2$ */
   sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 1, pp) ^
 	 mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 1, pp);
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */
   TOOM8H_MUL_N_REC(r6, v2, v3, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */
-  toom_couple_handling(r6, 2 * n + 1, pp, sign, n, 1+half, half);
+  mpn_toom_couple_handling (r6, 2 * n + 1, pp, sign, n, 1+half, half);
 
   /* $\pm1$ */
   sign = mpn_toom_eval_pm1 (v2, v0, p, ap, n, s,    pp);
@@ -239,14 +239,14 @@
     sign ^= mpn_toom_eval_pm1 (v3, v1, q, bp, n, t,    pp); 
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1)*B(-1) */
   TOOM8H_MUL_N_REC(r4, v2, v3, n + 1, wse); /* A(1)*B(1) */
-  toom_couple_handling(r4, 2 * n + 1, pp, sign, n, 0, 0);
+  mpn_toom_couple_handling (r4, 2 * n + 1, pp, sign, n, 0, 0);
 
   /* $\pm4$ */
   sign = mpn_toom_eval_pm2exp (v2, v0, p, ap, n, s, 2, pp) ^
 	 mpn_toom_eval_pm2exp (v3, v1, q, bp, n, t, 2, pp);
   TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-4)*B(-4) */
   TOOM8H_MUL_N_REC(r2, v2, v3, n + 1, wse); /* A(+4)*B(+4) */
-  toom_couple_handling(r2, 2 * n + 1, pp, sign, n, 2, 4);
+  mpn_toom_couple_handling (r2, 2 * n + 1, pp, sign, n, 2, 4);
 
 #undef v0
 #undef v1
diff -r 4aaca500e158 -r 92ee2d0d1857 mpn/generic/toom_couple_handling.c
--- a/mpn/generic/toom_couple_handling.c	Mon Dec 28 16:33:49 2009 +0100
+++ b/mpn/generic/toom_couple_handling.c	Mon Dec 28 16:53:17 2009 +0100
@@ -34,8 +34,8 @@
      {pp,n+off} <- {pp,n}+{np,n}*2^{off*GMP_NUMB_BITS}
 */
 void
-toom_couple_handling (mp_ptr pp, mp_size_t n, mp_ptr np,
-		      int nsign, mp_size_t off, int ps, int ns)
+mpn_toom_couple_handling (mp_ptr pp, mp_size_t n, mp_ptr np,
+			  int nsign, mp_size_t off, int ps, int ns)
 {
   if (nsign) {
 #ifdef HAVE_NATIVE_mpn_rsh1sub_n


More information about the gmp-commit mailing list