46 #define UINT32_ALIGN_MASK (sizeof(uint32) - 1)
48 #define rot(x,k) pg_rotate_left32(x, k)
84 a -= c; a ^= rot(c, 4); c += b; \
85 b -= a; b ^= rot(a, 6); a += c; \
86 c -= b; c ^= rot(b, 8); b += a; \
87 a -= c; a ^= rot(c,16); c += b; \
88 b -= a; b ^= rot(a,19); a += c; \
89 c -= b; c ^= rot(b, 4); b += a; \
116 #define final(a,b,c) \
118 c ^= b; c -= rot(b,14); \
119 a ^= c; a -= rot(c,11); \
120 b ^= a; b -= rot(a,25); \
121 c ^= b; c -= rot(b,16); \
122 a ^= c; a -= rot(c, 4); \
123 b ^= a; b -= rot(a,14); \
124 c ^= b; c -= rot(b,24); \
155 a =
b =
c = 0x9e3779b9 +
len + 3923095;
175 k = (
const unsigned char *) ka;
176 #ifdef WORDS_BIGENDIAN
263 #ifdef WORDS_BIGENDIAN
278 #ifdef WORDS_BIGENDIAN
381 a =
b =
c = 0x9e3779b9 +
len + 3923095;
414 k = (
const unsigned char *) ka;
415 #ifdef WORDS_BIGENDIAN
502 #ifdef WORDS_BIGENDIAN
517 #ifdef WORDS_BIGENDIAN
599 return ((uint64)
b << 32) |
c;
651 return ((uint64)
b << 32) |
c;
667 Size s_len = strlen((
const char *)
key);
669 s_len =
Min(s_len, keysize - 1);
679 return hash_bytes((
const unsigned char *)
key, (
int) keysize);
#define Assert(condition)
uint32 hash_bytes_uint32(uint32 k)
uint64 hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed)
uint32 hash_bytes(const unsigned char *k, int keylen)
uint32 tag_hash(const void *key, Size keysize)
uint64 hash_bytes_uint32_extended(uint32 k, uint64 seed)
#define UINT32_ALIGN_MASK
uint32 uint32_hash(const void *key, Size keysize)
uint32 string_hash(const void *key, Size keysize)