StandardHash

Undocumented in source.

Members

Static functions

fnv1a
hash_t fnv1a(void[] data, hash_t hash)

Calculates the FNV1a hash value from data.

fnv1aT
hash_t fnv1aT(T x, hash_t hash)

Calculates the FNV1a hash value from the raw data of x using an unrolled loop to improve efficiency.

toHash
hash_t toHash(K key)

Calculates the hash value from key.

Static variables

fnv1a_init
enum hash_t fnv1a_init;

FNV1 magic constants.

fnv1a_init
enum hash_t fnv1a_init;
Undocumented in source.
fnv1a_prime
enum hash_t fnv1a_prime;

FNV1 magic constants.

fnv1a_prime
enum hash_t fnv1a_prime;
Undocumented in source.

Templates

IsPrimitiveValueType
template IsPrimitiveValueType(T)

Evaluates to true if T is a primitive value type; that is, a numeric (integer, floating point, complex) or character type.

fnv1aCode
template fnv1aCode(istring hashvar, istring var, size_t n)

Evaluates to D code that implements the calculation of FNV1a of a variable named var with n bytes of size, storing the result in a variable named hashvar. The initial value of hashvar should be fnv1a_init or a previously calculated FNV1a hash.

minus1
template minus1(size_t n)

Evaluates to n - 1.

Meta