+
+
+INT16_PRIMES |
+primesieve |
+Generate primes of int16_t type |
+
+
+INT32_PRIMES |
+primesieve |
+Generate primes of int32_t type |
+
+
+INT64_PRIMES |
+primesieve |
+Generate primes of int64_t type |
+
+
+INT_PRIMES |
+primesieve |
+Generate primes of int type |
+
+
+load_libprimesieve |
+primesieve |
+Loads primesieve library. |
+
+
+LONGLONG_PRIMES |
+primesieve |
+Generate primes of long long type |
+
+
+LONG_PRIMES |
+primesieve |
+Generate primes of long type |
+
+
+primesieve_count_primes |
+primesieve |
+Count the primes within the interval [start, stop]. By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads.
+
+ Note that each call to primesieve_count_primes() incurs an initialization overhead of O(sqrt(stop)) even if the interval [start, stop] is tiny. Hence if you have written an algorithm that makes many calls to primesieve_count_primes() it may be preferable to use a primesieve::iterator which needs to be initialized only once. |
+
+
+primesieve_count_quadruplets |
+primesieve |
+Count the prime quadruplets within the interval [start, stop].
+
+ By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads. |
+
+
+primesieve_count_quintuplets |
+primesieve |
+Count the prime quintuplets within the interval [start, stop].
+
+ By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads. |
+
+
+primesieve_count_sextuplets |
+primesieve |
+Count the prime sextuplets within the interval [start, stop].
+
+ By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads. |
+
+
+primesieve_count_triplets |
+primesieve |
+Count the prime triplets within the interval [start, stop].
+
+ By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads. |
+
+
+primesieve_count_twins |
+primesieve |
+Count the twin primes within the interval [start, stop]. By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads. |
+
+
+primesieve_free |
+primesieve |
+Deallocate a primes array created using the primesieve_generate_primes() or primesieve_generate_n_primes() functions. |
+
+
+primesieve_free_iterator |
+primesieve |
+Free all memory |
+
+
+primesieve_generate_n_primes |
+primesieve |
+Get an array with the first n primes >= start.
+
+ ptype - The type of the primes to generate, e.g. INT_PRIMES.
|
+
+
+primesieve_generate_primes |
+primesieve |
+Get an array with the primes inside the interval [start, stop].
+
+ size - The size of the returned primes array. ptype - The type of the primes to generate, e.g. INT_PRIMES.
|
+
+
+primesieve_get_max_stop |
+primesieve |
+Returns the largest valid stop number for primesieve.
+
+
+
+2ˆ64-1 (UINT64_MAX)
+
+ |
+
+
+primesieve_get_num_threads |
+primesieve |
+Get the current set number of threads |
+
+
+primesieve_get_sieve_size |
+primesieve |
+Get the current set sieve size in KiB |
+
+
+primesieve_init |
+primesieve |
+Initialize the primesieve iterator before first using it |
+
+
+primesieve_iterator |
+primesieve |
+ |
+
+
+primesieve_next_prime |
+primesieve |
+Get the next prime.
+
+ Returns UINT64_MAX if next prime > 2ˆ64. |
+
+
+primesieve_nth_prime |
+primesieve |
+Find the nth prime. By default all CPU cores are used, use primesieve_set_num_threads(int threads) to change the number of threads.
+
+ Note that each call to primesieve_nth_prime(n, start) incurs an initialization overhead of O(sqrt(start)) even if n is tiny. Hence it is not a good idea to use primesieve_nth_prime() repeatedly in a loop to get the next (or previous) prime. For this use case it is better to use a primesieve::iterator which needs to be initialized only once.
+
+ if n = 0 finds the 1st prime >= start, if n > 0 finds the nth prime > start, if n < 0 finds the nth prime < start (backwards). |
+
+
+primesieve_prev_prime |
+primesieve |
+Get the previous prime.
+
+ primesieve_prev_prime(n) returns 0 for n <= 2. Note that primesieve_next_prime() runs up to 2x faster than primesieve_prev_prime(). Hence if the same algorithm can be written using either primesieve_prev_prime() or primesieve_next_prime() it is preferable to use primesieve_next_prime(). |
+
+
+primesieve_print_primes |
+primesieve |
+Print the primes within the interval [start, stop] to the standard output. |
+
+
+primesieve_print_quadruplets |
+primesieve |
+Print the prime quadruplets within the interval [start, stop] to the standard output. |
+
+
+primesieve_print_quintuplets |
+primesieve |
+Print the prime quintuplets within the interval [start, stop] to the standard output. |
+
+
+primesieve_print_sextuplets |
+primesieve |
+Print the prime sextuplets within the interval [start, stop] to the standard output. |
+
+
+primesieve_print_triplets |
+primesieve |
+Print the prime triplets within the interval [start, stop] to the standard output. |
+
+
+primesieve_print_twins |
+primesieve |
+Print the twin primes within the interval [start, stop] to the standard output. |
+
+
+primesieve_set_num_threads |
+primesieve |
+Set the number of threads for use in primesieve_count_*() and primesieve_nth_prime(). By default all CPU cores are used. |
+
+
+primesieve_set_sieve_size |
+primesieve |
+Set the sieve size in KiB (kibibyte). The best sieving performance is achieved with a sieve size of your CPU's L1 or L2 cache size (per core).
+
+sieve_size >= 8 && <= 4096
+
+ |
+
+
+primesieve_skipto |
+primesieve |
+Reset the primesieve iterator to start.
+
+ start - Generate primes > start (or < start).
+
+
stop_hint - Stop number optimization hint. E.g. if you want to generate the primes below 1000 use stop_hint = 1000, if you don't know use primesieve_get_max_stop().
|
+
+
+primesieve_version |
+primesieve |
+Get the primesieve version number, in the form “i.j” |
+
+
+SHORT_PRIMES |
+primesieve |
+Generate primes of short type |
+
+
+UINT16_PRIMES |
+primesieve |
+Generate primes of uint16_t type |
+
+
+UINT32_PRIMES |
+primesieve |
+Generate primes of uint32_t type |
+
+
+UINT64_PRIMES |
+primesieve |
+Generate primes of uint64_t type |
+
+
+UINT_PRIMES |
+primesieve |
+Generate primes of unsigned int type |
+
+
+ULONGLONG_PRIMES |
+primesieve |
+Generate primes of unsigned long long type |
+
+
+ULONG_PRIMES |
+primesieve |
+Generate primes of unsigned long type |
+
+
+unload_libprimesieve |
+primesieve |
+Unoads primesieve library. |
+
+
+USHORT_PRIMES |
+primesieve |
+Generate primes of unsigned short type |
+
+
+_PRIMESIEVE_ERROR |
+primesieve |
+primesieve functions return PRIMESIEVE_ERROR (UINT64_MAX) if any error occurs. |
+
+
+_PRIMESIEVE_PAS_VERSION |
+primesieve |
+ |
+
+
+_PRIMESIEVE_VERSION |
+primesieve |
+ |
+
+
+_PRIMESIEVE_VERSION_MAJOR |
+primesieve |
+ |
+
+
+_PRIMESIEVE_VERSION_MINOR |
+primesieve |
+ |
+
+
+