75 typedef uint8_t uint8;
76 typedef uint16_t uint16;
77 typedef uint32_t uint32;
78 typedef uint64_t uint64;
86 #define Uint128Low64(x) (x).first 87 #define Uint128High64(x) (x).second 93 uint64_t CityHash64(
const char *buf,
size_t len);
97 uint64_t CityHash64WithSeed(
const char *buf,
size_t len, uint64_t seed);
101 uint64_t CityHash64WithSeeds(
const char *buf,
size_t len,
102 uint64_t seed0, uint64_t seed1);
105 uint128 CityHash128(
const char *s,
size_t len);
109 uint128 CityHash128WithSeed(
const char *s,
size_t len,
uint128 seed);
112 uint32 CityHash32(
const char *buf,
size_t len);
116 static inline uint64_t Hash128to64(
const uint128 x) {
118 const uint64_t kMul = 0x9ddfea08eb382d69ULL;
119 uint64_t a = (Uint128Low64(x) ^ Uint128High64(x)) * kMul;
121 uint64_t b = (Uint128High64(x) ^ a) * kMul;
127 #endif // CITY_HASH_H_