[Gmp-commit] /var/hg/gmp: mpz/primorial_ui.c: Disable unused primesieve funct...

mercurial at gmplib.org mercurial at gmplib.org
Fri May 18 12:52:18 CEST 2012


details:   /var/hg/gmp/rev/c894673fe97a
changeset: 14984:c894673fe97a
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri May 18 12:29:07 2012 +0200
description:
mpz/primorial_ui.c: Disable unused primesieve functions

diffstat:

 mpz/primorial_ui.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (25 lines):

diff -r 190215d0c5db -r c894673fe97a mpz/primorial_ui.c
--- a/mpz/primorial_ui.c	Fri May 18 11:34:38 2012 +0200
+++ b/mpz/primorial_ui.c	Fri May 18 12:29:07 2012 +0200
@@ -72,8 +72,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
@@ -83,8 +85,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 primorial: implementation                     */


More information about the gmp-commit mailing list