All Identifiers
Name | Unit | Description |
---|---|---|
INT16_PRIMES | primesieve | Generate primes of Int16 (c int16_t) type |
INT32_PRIMES | primesieve | Generate primes of Int32 (c int32_t) type |
INT64_PRIMES | primesieve | Generate primes of Int64 (c int64_t) type |
PInt64 | primesieve |
|
primesieve_count_primes | primesieve | Count the primes within the interval [start, stop]. By default all CPU cores are used, use primesieve_set_num_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 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 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 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 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 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 iterator memory. |
primesieve_generate_n_primes | primesieve | Get an array with the first n primes >= start. |
primesieve_generate_primes | primesieve | Get an array with the primes inside the interval [start, stop].
|
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_iterator allows to easily iterate over primes both forwards and backwards. Generating the first prime has a complexity of O(r log log r) operations with r = nˆ0.5, after that any additional prime is generated in amortized O(log n log log n) operations. The memory usage is about PrimePi(nˆ0.5) * 8 bytes. The primesieve_iterator.pas example shows how to use primesieve_iterator. If any error occurs primesieve_next_prime and primesieve_prev_prime return _PRIMESIEVE_ERROR. Furthermore primesieve_iterator.is_error is initialized to 0 and set to 1 if any error occurs. |
primesieve_next_prime | primesieve | Get the next prime. Returns UINT64_MAX if next prime prime > 2ˆ64. |
primesieve_nth_prime | primesieve | Find the nth prime. By default all CPU cores are used, use primesieve_set_num_threads to change the number of threads. Note that each call to primesieve_nth_prime 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. |
primesieve_prev_prime | primesieve | Get the previous prime. primesieve_prev_prime 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 >= 16 and <= 4096 |
primesieve_skipto | primesieve | Reset the primesieve iterator to start.
|
primesieve_version | primesieve | Get the primesieve version number, in the form “i.j” |
PUInt64 | primesieve |
|
tuplets_free | primesieve | Free all prime tuplets iterator memory. |
tuplets_init | primesieve | Initialize the prime tuplets iterator before first using it. |
tuplets_iterator | primesieve | tuplets_iterator allows to iterate over prime tuplets. Functions tuplets_next_twin, tuplets_next_triplet, ..., tuplets_next_sextuplet can be called in any order. Each successful call to tuplets_next_* stores prime tuplet sequence into array tuplets_iterator.tail and returns last element of tuplet. The printlets_it.pas example shows how to use tuplets_iterator. If any error occurs tuplets_next_* functions return _PRIMESIEVE_ERROR. Furthermore tuplets_iterator.iterator.is_error is initialized to 0 and set to 1 if any error occurs. |
tuplets_next_quadruplet | primesieve | Get next sequence of four primes of the form (p, p+2, p+6, p+8) |
tuplets_next_quintuplet | primesieve | Get next sequence of five primes of the form (p, p+2, p+6, p+8, p+12) or (p, p+4, p+6, p+10, p+12) |
tuplets_next_sextuplet | primesieve | Get next sequence of six primes of the form (p, p+4, p+6, p+10, p+12, p+16) |
tuplets_next_triplet | primesieve | Get next sequence of three primes of the form (p, p + 2, p + 6) or (p, p + 4, p + 6) |
tuplets_next_twin | primesieve | Get next sequence of two primes of the form (p, p+2) |
tuplets_skipto | primesieve | Reset the prime tuplets iterator to start. |
UINT16_PRIMES | primesieve | Generate primes of UInt16 (c uint16_t) type |
UINT32_PRIMES | primesieve | Generate primes of UInt32 (c uint32_t) type |
UINT64_PRIMES | primesieve | Generate primes of UInt64 (c uint64_t) type |
_PRIMESIEVE_ERROR | primesieve | primesieve functions return PRIMESIEVE_ERROR (UINT64_MAX) if any error occurs. |
_PRIMESIEVE_PAS_VERSION | primesieve | Pascal API version |
_PRIMESIEVE_PAS_VERSION_MAJOR | primesieve |
|
_PRIMESIEVE_PAS_VERSION_MINOR | primesieve |
|
_PRIMESIEVE_PAS_VERSION_PATCH | primesieve |
|
_PRIMESIEVE_VERSION | primesieve |
|
_PRIMESIEVE_VERSION_MAJOR | primesieve |
|
_PRIMESIEVE_VERSION_MINOR | primesieve |
|
Generated by PasDoc 0.16.0.