diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-09-01 13:10:03 +0200 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-09-01 14:12:31 +0200 |
commit | 9673ed6269c6286ffa4828a86a960143afaa7482 (patch) | |
tree | 8f5efb280f6efe2c57d0fc6fcb0d188c567d94f8 /src/benchmarks/eina/city.h | |
parent | c40c279308e8202236cae8aad2396f573397bcb3 (diff) |
benchmarks: specify this outside extern "C"
uint128 is defined as a c++ specific type.
Diffstat (limited to 'src/benchmarks/eina/city.h')
-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) { |