summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/benchmarks/eina/city.h14
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;
53typedef uint64_t uint64; 53typedef uint64_t uint64;
54typedef std::pair<uint64, uint64> uint128; 54typedef std::pair<uint64, uint64> uint128;
55 55
56// Hash function for a byte array.
57uint128 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.
61uint128 CityHash128WithSeed(const char *s, size_t len, uint128 seed);
62
56#ifdef __cplusplus 63#ifdef __cplusplus
57extern "C" { 64extern "C" {
58#endif 65#endif
@@ -71,13 +78,6 @@ uint64 CityHash64WithSeed(const char *buf, size_t len, uint64 seed);
71uint64 CityHash64WithSeeds(const char *buf, size_t len, 78uint64 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.
75uint128 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.
79uint128 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.
83inline uint64 Hash128to64(const uint128& x) { 83inline uint64 Hash128to64(const uint128& x) {