21 #include <glog/logging.h> 49 extern std::array<std::array<std::uint8_t, 256>, 8>
const kSelectInByte;
68 template <
class Instructions>
72 constexpr
uint64_t kOnesStep4 = 0x1111111111111111ULL;
73 constexpr
uint64_t kOnesStep8 = 0x0101010101010101ULL;
74 constexpr
uint64_t kMSBsStep8 = 0x80ULL * kOnesStep8;
77 s =
s - ((
s & 0xA * kOnesStep4) >> 1);
78 s = (
s & 0x3 * kOnesStep4) + ((
s >> 2) & 0x3 * kOnesStep4);
79 s = (
s + (
s >> 4)) & 0xF * kOnesStep8;
83 uint64_t geqKStep8 = (((kStep8 | kMSBsStep8) - byteSums) & kMSBsStep8);
92 #if defined(__GNUC__) || defined(__clang__) 96 asm(
"pdep %1, %0, %0\n\t" 103 return _tzcnt_u64(_pdep_u64(1ULL <<
k, x));
constexpr unsigned int popcount(T const v)
#define FOLLY_ALWAYS_INLINE
—— Concurrent Priority Queue Implementation ——
uint64_t select64(uint64_t x, uint64_t k)
FOLLY_STORAGE_CONSTEXPR std::array< std::array< std::uint8_t, 256 >, 8 > const kSelectInByte