File: constants.h

package info (click to toggle)
libmath-prime-util-perl 0.46-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,044 kB
  • ctags: 1,933
  • sloc: perl: 19,450; ansic: 6,379; python: 24; makefile: 11
file content (28 lines) | stat: -rw-r--r-- 895 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef MPU_CONSTANTS_H
#define MPU_CONSTANTS_H

#include "EXTERN.h"
#include "perl.h"

#if BITS_PER_WORD == 32
 #define MPU_MAX_PRIME      UVCONST(4294967291)
 #define MPU_MAX_PRIME_IDX  UVCONST(203280221)
 #define MPU_MAX_TWIN_PRIME UVCONST(4294965839)
 #define MPU_MAX_TWIN_PRIME_IDX UVCONST(12739574)
#else
 #define MPU_MAX_PRIME      UVCONST(18446744073709551557)
 #define MPU_MAX_PRIME_IDX  UVCONST(425656284035217743)
 #define MPU_MAX_TWIN_PRIME UVCONST(18446744073709550771)
 #define MPU_MAX_TWIN_PRIME_IDX UVCONST(12975810317986308)  /* Approx */
#endif


/****************************************************************************/
/* Configuration */

/* To avoid thrashing, sieve a little farther than needed */
#define _MPU_FILL_EXTRA_N (128*30)
/* The initial cache size.  30k primes per 1k of cache. */
#define _MPU_INITIAL_CACHE_SIZE ((4096-16)*30 - _MPU_FILL_EXTRA_N)

#endif