Go to the documentation of this file.
22 #include "absl/hash/internal/city.h"
27 #include "absl/base/config.h"
28 #include "absl/base/internal/endian.h"
29 #include "absl/base/internal/unaligned_access.h"
30 #include "absl/base/optimization.h"
34 namespace hash_internal {
36 #ifdef ABSL_IS_BIG_ENDIAN
37 #define uint32_in_expected_order(x) (absl::gbswap_32(x))
38 #define uint64_in_expected_order(x) (absl::gbswap_64(x))
40 #define uint32_in_expected_order(x) (x)
41 #define uint64_in_expected_order(x) (x)
73 return shift == 0 ? val : ((val >> shift) | (val << (32 - shift)));
77 #define PERMUTE3(a, b, c) \
90 return h * 5 + 0xe6546b64;
108 for (
size_t i = 0;
i <
len;
i++) {
109 signed char v =
s[
i];
141 h = h * 5 + 0xe6546b64;
144 h = h * 5 + 0xe6546b64;
147 g =
g * 5 + 0xe6546b64;
150 g =
g * 5 + 0xe6546b64;
153 f = f * 5 + 0xe6546b64;
154 size_t iters = (
len - 1) / 20;
163 h = h * 5 + 0xe6546b64;
169 g =
g * 5 + 0xe6546b64;
172 h = h * 5 + 0xe6546b64;
180 }
while (--iters != 0);
186 h = h * 5 + 0xe6546b64;
189 h = h * 5 + 0xe6546b64;
198 return shift == 0 ? val : ((val >> shift) | (val << (64 - shift)));
265 return std::make_pair(
a +
z,
b + c);
305 }
else if (
len <= 64) {
314 std::pair<uint64_t, uint64_t>
v =
316 std::pair<uint64_t, uint64_t> w =
321 len = (
len - 1) & ~
static_cast<size_t>(63);
static uint64_t HashLen0to16(const char *s, size_t len)
static uint32_t Fetch32(const char *p)
static const uint8_t seed[20]
OPENSSL_EXPORT pem_password_cb void * u
uint64_t CityHash64WithSeed(const char *s, size_t len, uint64_t seed)
#define uint32_in_expected_order(x)
static uint32_t Hash32Len5to12(const char *s, size_t len)
#define ABSL_NAMESPACE_END
#define PERMUTE3(a, b, c)
uint64_t CityHash64(const char *s, size_t len)
static uint32_t Mur(uint32_t a, uint32_t h)
#define ABSL_NAMESPACE_BEGIN
static uint32_t fmix(uint32_t h)
unsigned __int64 uint64_t
static uint64_t Fetch64(const char *p)
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
static uint64_t ShiftMix(uint64_t val)
ABSL_NAMESPACE_BEGIN uint64_t gbswap_64(uint64_t host_int)
uint32_t gbswap_32(uint32_t host_int)
static uint32_t Rotate32(uint32_t val, int shift)
#define uint64_in_expected_order(x)
static uint32_t Hash32Len13to24(const char *s, size_t len)
static uint64_t HashLen17to32(const char *s, size_t len)
static uint64_t Rotate(uint64_t val, int shift)
uint64_t CityHash64WithSeeds(const char *s, size_t len, uint64_t seed0, uint64_t seed1)
static uint32_t Hash32Len0to4(const char *s, size_t len)
static uint64_t HashLen33to64(const char *s, size_t len)
static uint64_t HashLen16(uint64_t u, uint64_t v, uint64_t mul)
static std::pair< uint64_t, uint64_t > WeakHashLen32WithSeeds(uint64_t w, uint64_t x, uint64_t y, uint64_t z, uint64_t a, uint64_t b)
uint32_t CityHash32(const char *s, size_t len)
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:54