nxt.prime_modulo

Optimized prime modulo calculations.

Used for fast prime modulo calculations when using simple hash-functions to index in hash tables (associative arrays).

Members

Functions

ceilingPrime
size_t ceilingPrime(size_t value, PrimeIndex primeIndex)
moduloPrimeIndex
size_t moduloPrimeIndex(size_t value, PrimeIndex primeIndex)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

PrimeIndex
struct PrimeIndex

Type-safe index into prime number constants primeConstants.

See Also

Meta