1 #pragma once 2 3 #include "Types.h" 4 5 #include "MurmurHash1.h" 6 #include "MurmurHash2.h" 7 #include "MurmurHash3.h" 8 9 //---------- 10 // These are _not_ hash functions (even though people tend to use crc32 as one...) 11 12 void sumhash ( const void * key, int len, uint32_t seed, void * out ); 13 void sumhash32 ( const void * key, int len, uint32_t seed, void * out ); 14 15 void DoNothingHash ( const void * key, int len, uint32_t seed, void * out ); 16 void crc32 ( const void * key, int len, uint32_t seed, void * out ); 17 18 void randhash_32 ( const void * key, int len, uint32_t seed, void * out ); 19 void randhash_64 ( const void * key, int len, uint32_t seed, void * out ); 20 void randhash_128 ( const void * key, int len, uint32_t seed, void * out ); 21 22 //---------- 23 // Cryptographic hashes 24 25 void md5_32 ( const void * key, int len, uint32_t seed, void * out ); 26 void sha1_32a ( const void * key, int len, uint32_t seed, void * out ); 27 28 //---------- 29 // General purpose hashes 30 31 void FNV ( const void * key, int len, uint32_t seed, void * out ); 32 void Bernstein ( const void * key, int len, uint32_t seed, void * out ); 33 void SuperFastHash ( const void * key, int len, uint32_t seed, void * out ); 34 void lookup3_test ( const void * key, int len, uint32_t seed, void * out ); 35 void MurmurOAAT_test ( const void * key, int len, uint32_t seed, void * out ); 36 void Crap8_test ( const void * key, int len, uint32_t seed, void * out ); 37 void CityHash128_test ( const void * key, int len, uint32_t seed, void * out ); 38 void CityHash64_test ( const void * key, int len, uint32_t seed, void * out ); 39 40 void SpookyHash32_test ( const void * key, int len, uint32_t seed, void * out ); 41 void SpookyHash64_test ( const void * key, int len, uint32_t seed, void * out ); 42 void SpookyHash128_test ( const void * key, int len, uint32_t seed, void * out ); 43 44 uint32_t MurmurOAAT ( const void * key, int len, uint32_t seed ); 45 46 //---------- 47 // MurmurHash2 48 49 void MurmurHash2_test ( const void * key, int len, uint32_t seed, void * out ); 50 void MurmurHash2A_test ( const void * key, int len, uint32_t seed, void * out ); 51 52 //----------------------------------------------------------------------------- 53 // Test harnesses for Murmur1/2 54 55 inline void MurmurHash1_test ( const void * key, int len, uint32_t seed, void * out ) 56 { 57 *(uint32_t*)out = MurmurHash1(key,len,seed); 58 } 59 60 inline void MurmurHash2_test ( const void * key, int len, uint32_t seed, void * out ) 61 { 62 *(uint32_t*)out = MurmurHash2(key,len,seed); 63 } 64 65 inline void MurmurHash2A_test ( const void * key, int len, uint32_t seed, void * out ) 66 { 67 *(uint32_t*)out = MurmurHash2A(key,len,seed); 68 } 69 70 inline void MurmurHash64A_test ( const void * key, int len, uint32_t seed, void * out ) 71 { 72 *(uint64_t*)out = MurmurHash64A(key,len,seed); 73 } 74 75 inline void MurmurHash64B_test ( const void * key, int len, uint32_t seed, void * out ) 76 { 77 *(uint64_t*)out = MurmurHash64B(key,len,seed); 78 } 79