53 #ifndef HAVOQGT_DETAIL_HASH_HPP_INCLUDED
54 #define HAVOQGT_DETAIL_HASH_HPP_INCLUDED
67 a = (a+0x7ed55d16) + (a<<12);
68 a = (a^0xc761c23c) ^ (a>>19);
69 a = (a+0x165667b1) + (a<<5);
70 a = (a+0xd3a2646c) ^ (a<<9);
71 a = (a+0xfd7046c5) + (a<<3);
72 a = (a^0xb55a4f09) ^ (a>>16);
78 a = (a+0x5d16) + (a<<6);
79 a = (a^0xc23c) ^ (a>>9);
80 a = (a+0x67b1) + (a<<5);
81 a = (a+0x646c) ^ (a<<7);
82 a = (a+0x46c5) + (a<<3);
83 a = (a^0x4f09) ^ (a>>8);
88 uint64_t to_hash = input >> n;
89 uint64_t mask = 0xFFFFFFFF;
102 uint64_t to_hash = input >> n;
103 uint64_t mask = 0xFFFF;
105 to_hash =
hash16(to_hash);
122 for(
int i=0; i<=n; ++i) {
125 for(
int i=n; i>=0; --i) {
130 assert(n>16 &&
"Hashing less than 16bits is not supported");
132 for(
int i=0; i<=n; ++i) {
135 for(
int i=n; i>=0; --i) {
uint64_t shifted_n_hash16(uint64_t input, int n)
uint64_t hash_nbits(uint64_t input, int n)
uint16_t hash16(uint16_t a)
uint32_t hash32(uint32_t a)
uint64_t shifted_n_hash32(uint64_t input, int n)