diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/benchmarks/eina/city.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/benchmarks/eina/city.h b/src/benchmarks/eina/city.h index 90849a1dc6..3a2b06e26a 100644 --- a/src/benchmarks/eina/city.h +++ b/src/benchmarks/eina/city.h | |||
@@ -53,6 +53,13 @@ typedef uint32_t uint32; | |||
53 | typedef uint64_t uint64; | 53 | typedef uint64_t uint64; |
54 | typedef std::pair<uint64, uint64> uint128; | 54 | typedef std::pair<uint64, uint64> uint128; |
55 | 55 | ||
56 | // Hash function for a byte array. | ||
57 | uint128 CityHash128(const char *s, size_t len); | ||
58 | |||
59 | // Hash function for a byte array. For convenience, a 128-bit seed is also | ||
60 | // hashed into the result. | ||
61 | uint128 CityHash128WithSeed(const char *s, size_t len, uint128 seed); | ||
62 | |||
56 | #ifdef __cplusplus | 63 | #ifdef __cplusplus |
57 | extern "C" { | 64 | extern "C" { |
58 | #endif | 65 | #endif |
@@ -71,13 +78,6 @@ uint64 CityHash64WithSeed(const char *buf, size_t len, uint64 seed); | |||
71 | uint64 CityHash64WithSeeds(const char *buf, size_t len, | 78 | uint64 CityHash64WithSeeds(const char *buf, size_t len, |
72 | uint64 seed0, uint64 seed1); | 79 | uint64 seed0, uint64 seed1); |
73 | 80 | ||
74 | // Hash function for a byte array. | ||
75 | uint128 CityHash128(const char *s, size_t len); | ||
76 | |||
77 | // Hash function for a byte array. For convenience, a 128-bit seed is also | ||
78 | // hashed into the result. | ||
79 | uint128 CityHash128WithSeed(const char *s, size_t len, uint128 seed); | ||
80 | |||
81 | // Hash 128 input bits down to 64 bits of output. | 81 | // Hash 128 input bits down to 64 bits of output. |
82 | // This is intended to be a reasonably good hash function. | 82 | // This is intended to be a reasonably good hash function. |
83 | inline uint64 Hash128to64(const uint128& x) { | 83 | inline uint64 Hash128to64(const uint128& x) { |