27 return folly::select64<folly::compression::instructions::Default>(
x,
k);
30 return folly::select64<folly::compression::instructions::Haswell>(
x,
k);
38 for (
size_t i = 0u;
i < 256u; ++
i) {
40 for (
size_t j = 0u; j < 8u; ++j) {
42 decoded |=
uint8_t(entry != 8) << entry;
51 for (
uint64_t x = kPrime,
i = 0;
i < (1 << 20);
x *= kPrime,
i += 1) {
53 for (
size_t k = 0;
k < w; ++
k) {
54 auto const pos = folly::select64<instr>(
x,
k);
55 CHECK_EQ((x >> pos) & 1, 1);
constexpr unsigned int popcount(T const v)
TEST_F(Select64Test, SelectInByteTable)
#define EXPECT_EQ(val1, val2)
uint64_t check_select64_default(uint64_t x, uint64_t k)
FOLLY_STORAGE_CONSTEXPR std::array< std::array< std::uint8_t, 256 >, 8 > const kSelectInByte
folly::compression::instructions::Default TestArch
uint64_t check_select64_haswell(uint64_t x, uint64_t k)