Defines |
#define | HASH_LITTLE_ENDIAN 1 |
#define | HASH_BIG_ENDIAN 0 |
#define | hashsize(n) ((uint32_t)1<<(n)) |
#define | hashmask(n) (hashsize(n)-1) |
#define | rot(x, k) (((x)<<(k)) | ((x)>>(32-(k)))) |
#define | mix(a, b, c) |
#define | final(a, b, c) |
Functions |
uint32_t | hash_u32 (const uint32_t *k, size_t length, uint32_t initval) |
| hash_u32 - fast hash an array of 32-bit values for internal use : the array of uint32_t : the number of elements to hash : the base number to roll into the hash (usually 0)
|
uint64_t | hash64_stable_64 (const void *key, size_t n, uint64_t base) |
uint64_t | hash64_stable_32 (const void *key, size_t n, uint64_t base) |
uint64_t | hash64_stable_16 (const void *key, size_t n, uint64_t base) |
uint64_t | hash64_stable_8 (const void *key, size_t n, uint64_t base) |
uint32_t | hash_any (const void *key, size_t length, uint32_t base) |
uint32_t | hash_stable_64 (const void *key, size_t n, uint32_t base) |
uint32_t | hash_stable_32 (const void *key, size_t n, uint32_t base) |
uint32_t | hash_stable_16 (const void *key, size_t n, uint32_t base) |
uint32_t | hash_stable_8 (const void *key, size_t n, uint32_t base) |
uint64_t | hash64_any (const void *key, size_t length, uint64_t base) |
uint32_t hash_u32 |
( |
const uint32_t * |
key, |
|
|
size_t |
num, |
|
|
uint32_t |
base |
|
) |
| |
hash_u32 - fast hash an array of 32-bit values for internal use : the array of uint32_t : the number of elements to hash : the base number to roll into the hash (usually 0)
The array of uint32_t pointed to by is combined with the base to form a 32-bit hash. This is 2-3 times faster than hash() on small arrays, but the advantage vanishes over large hashes.
This hash will have different results on different machines, so is only useful for internal hashes (ie. not hashes sent across the network or saved to disk).