diff options
author | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-05-18 12:29:07 +0200 |
---|---|---|
committer | Marco Bodrato <bodrato@mail.dm.unipi.it> | 2012-05-18 12:29:07 +0200 |
commit | 07dab5fd28d5507299aa58cc0cf6cdaaa755bdbc (patch) | |
tree | 8a07cc92d3fe313921039d0d6f97c5345607399e /mpz/primorial_ui.c | |
parent | 4cfc1688ca3424a63d3932f6a776ffd8a1ce80b2 (diff) | |
download | gmp-07dab5fd28d5507299aa58cc0cf6cdaaa755bdbc.tar.gz |
mpz/primorial_ui.c: Disable unused primesieve functions
Diffstat (limited to 'mpz/primorial_ui.c')
-rw-r--r-- | mpz/primorial_ui.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mpz/primorial_ui.c b/mpz/primorial_ui.c index 984086099..13c562f67 100644 --- a/mpz/primorial_ui.c +++ b/mpz/primorial_ui.c @@ -72,8 +72,10 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ /* 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 @@ id_to_n (mp_limb_t id) { return id*3+1+(id&1); } 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 */ |