2014-06-02 21:28:02 +04:00
|
|
|
#ifndef UTIL_MURMUR_HASH_H
|
|
|
|
#define UTIL_MURMUR_HASH_H
|
2010-09-15 01:33:11 +04:00
|
|
|
#include <cstddef>
|
2011-11-12 02:24:25 +04:00
|
|
|
#include <stdint.h>
|
2010-09-10 04:36:07 +04:00
|
|
|
|
2010-09-15 01:33:11 +04:00
|
|
|
namespace util {
|
2010-09-10 04:36:07 +04:00
|
|
|
|
2014-01-28 04:51:35 +04:00
|
|
|
// 64-bit machine version
|
2012-06-28 18:58:59 +04:00
|
|
|
uint64_t MurmurHash64A(const void * key, std::size_t len, uint64_t seed = 0);
|
2014-01-28 04:51:35 +04:00
|
|
|
// 32-bit machine version (not the same function as above)
|
2012-06-28 18:58:59 +04:00
|
|
|
uint64_t MurmurHash64B(const void * key, std::size_t len, uint64_t seed = 0);
|
2014-01-28 04:51:35 +04:00
|
|
|
// Use the version for this arch. Because the values differ across
|
|
|
|
// architectures, really only use it for in-memory structures.
|
2012-06-28 18:58:59 +04:00
|
|
|
uint64_t MurmurHashNative(const void * key, std::size_t len, uint64_t seed = 0);
|
2010-09-15 01:33:11 +04:00
|
|
|
|
|
|
|
} // namespace util
|
|
|
|
|
2014-06-02 21:28:02 +04:00
|
|
|
#endif // UTIL_MURMUR_HASH_H
|