#include "city.h"
#include <string.h>
#include <algorithm>
make_pair;
pair;
#if defined(__clang__)
#define bswap_32(x) …
#define bswap_64(x) …
#elif _MSC_VER
#include <stdlib.h>
#define bswap_32 …
#define bswap_64 …
#elif defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#define bswap_32 …
#define bswap_64 …
#elif defined(__sun) || defined(sun)
#include <sys/byteorder.h>
#define bswap_32 …
#define bswap_64 …
#elif defined(__FreeBSD__)
#include <sys/endian.h>
#define bswap_32 …
#define bswap_64 …
#elif defined(__OpenBSD__)
#include <sys/types.h>
#define bswap_32 …
#define bswap_64 …
#elif defined(__NetBSD__)
#include <machine/bswap.h>
#include <sys/types.h>
#if defined(__BSWAP_RENAME) && !defined(__bswap_32)
#define bswap_32 …
#define bswap_64 …
#endif
#else
#define bswap_32 …
#define bswap_64 …
#endif
namespace base {
namespace internal {
namespace cityhash_v111 {
#ifdef WORDS_BIGENDIAN
#define uint32_in_expected_order …
#define uint64_in_expected_order …
#else
#define uint32_in_expected_order(x) …
#define uint64_in_expected_order(x) …
#endif
#if !defined(LIKELY)
#if HAVE_BUILTIN_EXPECT
#define LIKELY …
#else
#define LIKELY(x) …
#endif
#endif
static uint64 UNALIGNED_LOAD64(const char* p) { … }
static uint32 UNALIGNED_LOAD32(const char* p) { … }
static uint64 Fetch64(const char* p) { … }
static uint32 Fetch32(const char* p) { … }
static const uint64 k0 = …;
static const uint64 k1 = …;
static const uint64 k2 = …;
static const uint32 c1 = …;
static const uint32 c2 = …;
static uint32 fmix(uint32 h) { … }
static uint32 Rotate32(uint32 val, int shift) { … }
#undef PERMUTE3
#define PERMUTE3(a, b, c) …
static uint32 Mur(uint32 a, uint32 h) { … }
static uint32 Hash32Len13to24(const char* s, size_t len) { … }
static uint32 Hash32Len0to4(const char* s, size_t len) { … }
static uint32 Hash32Len5to12(const char* s, size_t len) { … }
uint32 CityHash32(const char* s, size_t len) { … }
static uint64 Rotate(uint64 val, int shift) { … }
static uint64 ShiftMix(uint64 val) { … }
static uint64 HashLen16(uint64 u, uint64 v) { … }
static uint64 HashLen16(uint64 u, uint64 v, uint64 mul) { … }
static uint64 HashLen0to16(const char* s, size_t len) { … }
static uint64 HashLen17to32(const char* s, size_t len) { … }
static pair<uint64, uint64> WeakHashLen32WithSeeds(uint64 w,
uint64 x,
uint64 y,
uint64 z,
uint64 a,
uint64 b) { … }
static pair<uint64, uint64> WeakHashLen32WithSeeds(const char* s,
uint64 a,
uint64 b) { … }
static uint64 HashLen33to64(const char* s, size_t len) { … }
uint64 CityHash64(const char* s, size_t len) { … }
uint64 CityHash64WithSeed(const char* s, size_t len, uint64 seed) { … }
uint64 CityHash64WithSeeds(const char* s,
size_t len,
uint64 seed0,
uint64 seed1) { … }
static uint128 CityMurmur(const char* s, size_t len, uint128 seed) { … }
uint128 CityHash128WithSeed(const char* s, size_t len, uint128 seed) { … }
uint128 CityHash128(const char* s, size_t len) { … }
}
}
}