[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Wed Mar 27 03:39:07 CET 2013


details:   /var/hg/gmp/rev/27576c16ac02
changeset: 15652:27576c16ac02
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 27 03:37:35 2013 +0100
description:
Make precomputed arg 'const'.

details:   /var/hg/gmp/rev/0cd85d84dc53
changeset: 15653:0cd85d84dc53
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 27 03:38:49 2013 +0100
description:
Make variables 'const' to match tables.

details:   /var/hg/gmp/rev/2b715570f537
changeset: 15654:2b715570f537
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Wed Mar 27 03:39:03 2013 +0100
description:
ChangeLog

diffstat:

 ChangeLog              |  8 ++++++++
 gmp-impl.h             |  8 ++++----
 mpn/generic/mod_1_1.c  |  2 +-
 mpn/generic/mod_1_2.c  |  2 +-
 mpn/generic/mod_1_3.c  |  2 +-
 mpn/generic/mod_1_4.c  |  2 +-
 mpn/generic/trialdiv.c |  4 ++--
 7 files changed, 18 insertions(+), 10 deletions(-)

diffs (118 lines):

diff -r 89f4015788ab -r 2b715570f537 ChangeLog
--- a/ChangeLog	Wed Mar 27 03:00:32 2013 +0100
+++ b/ChangeLog	Wed Mar 27 03:39:03 2013 +0100
@@ -1,5 +1,13 @@
 2013-03-27  Torbjorn Granlund  <tege at gmplib.org>
 
+	* mpn/generic/trialdiv.c: Make variables 'const' to match tables.
+
+	* mpn/generic/mod_1_1.c (mpn_mod_1s_4p): Make precomputed arg 'const'.
+	* mpn/generic/mod_1_2.c (mpn_mod_1s_3p): Likewise.
+	* mpn/generic/mod_1_3.c (mpn_mod_1s_2p): Likewise.
+	* mpn/generic/mod_1_4.c (mpn_mod_1_1p): Likewise.
+	* gmp-impl.h: Update prototypes.
+
 	* mpn/x86_64/mulx/aorsmul_1.asm: New file.
 	* mpn/x86_64/mulx/addmul_1.asm: Remove.
 
diff -r 89f4015788ab -r 2b715570f537 gmp-impl.h
--- a/gmp-impl.h	Wed Mar 27 03:00:32 2013 +0100
+++ b/gmp-impl.h	Wed Mar 27 03:39:03 2013 +0100
@@ -1131,7 +1131,7 @@
 #endif
 #ifndef mpn_mod_1_1p  /* if not done with cpuvec in a fat binary */
 #define mpn_mod_1_1p __MPN(mod_1_1p)
-__GMP_DECLSPEC mp_limb_t mpn_mod_1_1p (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [4]) __GMP_ATTRIBUTE_PURE;
+__GMP_DECLSPEC mp_limb_t mpn_mod_1_1p (mp_srcptr, mp_size_t, mp_limb_t, const mp_limb_t [4]) __GMP_ATTRIBUTE_PURE;
 #endif
 
 #ifndef mpn_mod_1s_2p_cps  /* if not done with cpuvec in a fat binary */
@@ -1140,7 +1140,7 @@
 #endif
 #ifndef mpn_mod_1s_2p  /* if not done with cpuvec in a fat binary */
 #define mpn_mod_1s_2p __MPN(mod_1s_2p)
-__GMP_DECLSPEC mp_limb_t mpn_mod_1s_2p (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [5]) __GMP_ATTRIBUTE_PURE;
+__GMP_DECLSPEC mp_limb_t mpn_mod_1s_2p (mp_srcptr, mp_size_t, mp_limb_t, const mp_limb_t [5]) __GMP_ATTRIBUTE_PURE;
 #endif
 
 #ifndef mpn_mod_1s_3p_cps  /* if not done with cpuvec in a fat binary */
@@ -1149,7 +1149,7 @@
 #endif
 #ifndef mpn_mod_1s_3p  /* if not done with cpuvec in a fat binary */
 #define mpn_mod_1s_3p __MPN(mod_1s_3p)
-__GMP_DECLSPEC mp_limb_t mpn_mod_1s_3p (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [6]) __GMP_ATTRIBUTE_PURE;
+__GMP_DECLSPEC mp_limb_t mpn_mod_1s_3p (mp_srcptr, mp_size_t, mp_limb_t, const mp_limb_t [6]) __GMP_ATTRIBUTE_PURE;
 #endif
 
 #ifndef mpn_mod_1s_4p_cps  /* if not done with cpuvec in a fat binary */
@@ -1158,7 +1158,7 @@
 #endif
 #ifndef mpn_mod_1s_4p  /* if not done with cpuvec in a fat binary */
 #define mpn_mod_1s_4p __MPN(mod_1s_4p)
-__GMP_DECLSPEC mp_limb_t mpn_mod_1s_4p (mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [7]) __GMP_ATTRIBUTE_PURE;
+__GMP_DECLSPEC mp_limb_t mpn_mod_1s_4p (mp_srcptr, mp_size_t, mp_limb_t, const mp_limb_t [7]) __GMP_ATTRIBUTE_PURE;
 #endif
 
 #define mpn_bc_mulmod_bnm1 __MPN(bc_mulmod_bnm1)
diff -r 89f4015788ab -r 2b715570f537 mpn/generic/mod_1_1.c
--- a/mpn/generic/mod_1_1.c	Wed Mar 27 03:00:32 2013 +0100
+++ b/mpn/generic/mod_1_1.c	Wed Mar 27 03:39:03 2013 +0100
@@ -239,7 +239,7 @@
 }
 
 mp_limb_t
-mpn_mod_1_1p (mp_srcptr ap, mp_size_t n, mp_limb_t b, mp_limb_t bmodb[4])
+mpn_mod_1_1p (mp_srcptr ap, mp_size_t n, mp_limb_t b, const mp_limb_t bmodb[4])
 {
   int cnt;
   mp_limb_t bi, B1modb;
diff -r 89f4015788ab -r 2b715570f537 mpn/generic/mod_1_2.c
--- a/mpn/generic/mod_1_2.c	Wed Mar 27 03:00:32 2013 +0100
+++ b/mpn/generic/mod_1_2.c	Wed Mar 27 03:39:03 2013 +0100
@@ -71,7 +71,7 @@
 }
 
 mp_limb_t
-mpn_mod_1s_2p (mp_srcptr ap, mp_size_t n, mp_limb_t b, mp_limb_t cps[5])
+mpn_mod_1s_2p (mp_srcptr ap, mp_size_t n, mp_limb_t b, const mp_limb_t cps[5])
 {
   mp_limb_t rh, rl, bi, ph, pl, ch, cl, r;
   mp_limb_t B1modb, B2modb, B3modb;
diff -r 89f4015788ab -r 2b715570f537 mpn/generic/mod_1_3.c
--- a/mpn/generic/mod_1_3.c	Wed Mar 27 03:00:32 2013 +0100
+++ b/mpn/generic/mod_1_3.c	Wed Mar 27 03:39:03 2013 +0100
@@ -74,7 +74,7 @@
 }
 
 mp_limb_t
-mpn_mod_1s_3p (mp_srcptr ap, mp_size_t n, mp_limb_t b, mp_limb_t cps[6])
+mpn_mod_1s_3p (mp_srcptr ap, mp_size_t n, mp_limb_t b, const mp_limb_t cps[6])
 {
   mp_limb_t rh, rl, bi, ph, pl, ch, cl, r;
   mp_limb_t B1modb, B2modb, B3modb, B4modb;
diff -r 89f4015788ab -r 2b715570f537 mpn/generic/mod_1_4.c
--- a/mpn/generic/mod_1_4.c	Wed Mar 27 03:00:32 2013 +0100
+++ b/mpn/generic/mod_1_4.c	Wed Mar 27 03:39:03 2013 +0100
@@ -77,7 +77,7 @@
 }
 
 mp_limb_t
-mpn_mod_1s_4p (mp_srcptr ap, mp_size_t n, mp_limb_t b, mp_limb_t cps[7])
+mpn_mod_1s_4p (mp_srcptr ap, mp_size_t n, mp_limb_t b, const mp_limb_t cps[7])
 {
   mp_limb_t rh, rl, bi, ph, pl, ch, cl, r;
   mp_limb_t B1modb, B2modb, B3modb, B4modb, B5modb;
diff -r 89f4015788ab -r 2b715570f537 mpn/generic/trialdiv.c
--- a/mpn/generic/trialdiv.c	Wed Mar 27 03:00:32 2013 +0100
+++ b/mpn/generic/trialdiv.c	Wed Mar 27 03:39:03 2013 +0100
@@ -84,8 +84,8 @@
 mpn_trialdiv (mp_srcptr tp, mp_size_t tn, mp_size_t nprimes, int *where)
 {
   mp_limb_t ppp;
-  mp_limb_t *cps;
-  struct gmp_primes_dtab *dp;
+  const mp_limb_t *cps;
+  const struct gmp_primes_dtab *dp;
   long i, j, idx, np;
   mp_limb_t r, q;
 


More information about the gmp-commit mailing list