[Gmp-commit] /var/hg/gmp: Disable unused primesieve functions.

mercurial at gmplib.org mercurial at gmplib.org
Fri May 18 11:34:46 CEST 2012


details:   /var/hg/gmp/rev/190215d0c5db
changeset: 14983:190215d0c5db
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri May 18 11:34:38 2012 +0200
description:
Disable unused primesieve functions.

diffstat:

 mpz/bin_uiui.c |  2 ++
 mpz/oddfac_1.c |  4 ++++
 primesieve.c   |  4 ++++
 3 files changed, 10 insertions(+), 0 deletions(-)

diffs (64 lines):

diff -r 456eabc04434 -r 190215d0c5db mpz/bin_uiui.c
--- a/mpz/bin_uiui.c	Fri May 18 10:23:00 2012 +0200
+++ b/mpz/bin_uiui.c	Fri May 18 11:34:38 2012 +0200
@@ -501,8 +501,10 @@
 /* Section sieve: sieving functions and tools for primes */
 /*********************************************************/
 
+#if WANT_ASSERT
 static mp_limb_t
 bit_to_n (mp_limb_t bit) { return (bit*3+4)|1; }
+#endif
 
 /* id_to_n (x) = bit_to_n (x-1) = (id*3+1)|1*/
 static mp_limb_t
diff -r 456eabc04434 -r 190215d0c5db mpz/oddfac_1.c
--- a/mpz/oddfac_1.c	Fri May 18 10:23:00 2012 +0200
+++ b/mpz/oddfac_1.c	Fri May 18 11:34:38 2012 +0200
@@ -85,8 +85,10 @@
 /* Section sieve: sieving functions and tools for primes */
 /*********************************************************/
 
+#if WANT_ASSERT
 static mp_limb_t
 bit_to_n (mp_limb_t bit) { return (bit*3+4)|1; }
+#endif
 
 /* id_to_n (x) = bit_to_n (x-1) = (id*3+1)|1*/
 static mp_limb_t
@@ -96,8 +98,10 @@
 static mp_limb_t
 n_to_bit (mp_limb_t n) { return ((n-5)|1)/3U; }
 
+#if WANT_ASSERT
 static mp_size_t
 primesieve_size (mp_limb_t n) { return n_to_bit(n) / GMP_LIMB_BITS + 1; }
+#endif
 
 /*********************************************************/
 /* Section mswing: 2-multiswing factorial                 */
diff -r 456eabc04434 -r 190215d0c5db primesieve.c
--- a/primesieve.c	Fri May 18 10:23:00 2012 +0200
+++ b/primesieve.c	Fri May 18 11:34:38 2012 +0200
@@ -65,8 +65,10 @@
 /* Section sieve: sieving functions and tools for primes */
 /*********************************************************/
 
+#if 0
 static mp_limb_t
 bit_to_n (mp_limb_t bit) { return (bit*3+4)|1; }
+#endif
 
 /* id_to_n (x) = bit_to_n (x-1) = (id*3+1)|1*/
 static mp_limb_t
@@ -76,8 +78,10 @@
 static mp_limb_t
 n_to_bit (mp_limb_t n) { return ((n-5)|1)/3U; }
 
+#if 0
 static mp_size_t
 primesieve_size (mp_limb_t n) { return n_to_bit(n) / GMP_LIMB_BITS + 1; }
+#endif
 
 #if GMP_LIMB_BITS > 61
 #define SIEVE_SEED CNST_LIMB(0x3294C9E069128480)


More information about the gmp-commit mailing list