1 #ifndef QUERYENGINE_MURMURHASH1INL_H
2 #define QUERYENGINE_MURMURHASH1INL_H
4 #include "../Shared/funcannotations.h"
9 const unsigned int m = 0xc6a4a793;
13 unsigned int h = seed ^ (len * m);
17 const unsigned char* data = (
const unsigned char*)key;
20 unsigned int k = *(
unsigned int*)data;
54 const uint64_t m = 0xc6a4a7935bd1e995LLU;
57 uint64_t h = seed ^ (len * m);
59 const uint64_t* data = (
const uint64_t*)key;
60 const uint64_t* end = data + (len / 8);
73 const unsigned char* data2 = (
const unsigned char*)data;
77 h ^= ((uint64_t)data2[6]) << 48;
79 h ^= ((uint64_t)data2[5]) << 40;
81 h ^= ((uint64_t)data2[4]) << 32;
83 h ^= ((uint64_t)data2[3]) << 24;
85 h ^= ((uint64_t)data2[2]) << 16;
87 h ^= ((uint64_t)data2[1]) << 8;
89 h ^= ((uint64_t)data2[0]);
100 #endif // QUERYENGINE_MURMURHASH1INL_H
FORCE_INLINE DEVICE uint32_t MurmurHash1Impl(const void *key, int len, const uint32_t seed)
FORCE_INLINE DEVICE uint64_t MurmurHash64AImpl(const void *key, int len, uint64_t seed)