Go to the documentation of this file.
19 #ifndef GRPC_CORE_LIB_GPR_USEFUL_H
20 #define GRPC_CORE_LIB_GPR_USEFUL_H
40 return ((
x <<
n) | (
x >> (
sizeof(
x) * 8 -
n)));
44 return ((
x >>
n) | (
x << (
sizeof(
x) * 8 -
n)));
50 return *
i |= (
T(1) <<
n);
56 return *
i &= ~(
T(1) <<
n);
62 return (
i & (
T(1) <<
n)) != 0;
65 namespace useful_detail {
67 return (
x - ((
x >> 1) & 0x77777777) - ((
x >> 2) & 0x33333333) -
68 ((
x >> 3) & 0x11111111));
101 template <
typename T>
103 return (((
reinterpret_cast<size_t>(p)) >> 4) ^
104 ((
reinterpret_cast<size_t>(p)) >> 9) ^
105 ((
reinterpret_cast<size_t>(p)) >> 14)) %
129 #define GPR_ARRAY_SIZE(array) (sizeof(array) / sizeof(*(array)))
uint32_t MixHash32(uint32_t a, uint32_t b)
OPENSSL_EXPORT pem_password_cb void * u
#define T(upbtypeconst, upbtype, ctype, default_value)
bool GetBit(T i, size_t n)
constexpr T RotateRight(T x, T n)
unsigned __int64 uint64_t
T ClearBit(T *i, size_t n)
int64_t SaturatingAdd(int64_t a, int64_t b)
constexpr size_t HashPointer(T *p, size_t range)
T Clamp(T val, T min, T max)
int QsortCompare(const T &a, const T &b)
constexpr uint32_t BitCount(uint32_t i)
constexpr T RotateLeft(T x, T n)
constexpr uint32_t HexdigitBitcount(uint32_t x)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:48