40 struct FingerprintTablePoly;
42 struct FingerprintTablePoly<63> {
46 struct FingerprintTablePoly<95> {
47 static constexpr
uint64_t data[2] = {0x51555cb0aa8d39c3, 0xb679ec3700000000};
50 struct FingerprintTablePoly<127> {
51 static constexpr
uint64_t data[2] = {0xc91bff9b8768b51b, 0x8c5d5853bd77b0d3};
54 template <
typename D,
size_t S0,
size_t... I0>
55 constexpr
auto copy_table(
D const (&table)[S0], index_sequence<I0...>) {
56 using array = std::array<D, S0>;
57 return array{{table[I0]...}};
59 template <
typename D,
size_t S0>
60 constexpr
auto copy_table(
D const (&table)[S0]) {
61 return copy_table(table, make_index_sequence<S0>{});
64 template <
typename D,
size_t S0,
size_t S1,
size_t... I0>
65 constexpr
auto copy_table(D
const (&table)[S0][S1], index_sequence<I0...>) {
66 using array = std::array<std::array<D, S1>, S0>;
67 return array{{copy_table(table[I0])...}};
69 template <
typename D,
size_t S0,
size_t S1>
70 constexpr
auto copy_table(D
const (&table)[S0][S1]) {
71 return copy_table(table, make_index_sequence<S0>{});
74 template <
typename D,
size_t S0,
size_t S1,
size_t S2,
size_t... I0>
75 constexpr
auto copy_table(D
const (&table)[S0][S1][S2], index_sequence<I0...>) {
76 using array = std::array<std::array<std::array<D, S2>, S1>, S0>;
77 return array{{copy_table(table[I0])...}};
79 template <
typename D,
size_t S0,
size_t S1,
size_t S2>
80 constexpr
auto copy_table(D
const (&table)[S0][S1][S2]) {
81 return copy_table(table, make_index_sequence<S0>{});
85 constexpr poly_table<Deg> make_poly_table() {
93 FingerprintPolynomial<Deg>
t;
95 for (
int i = 0;
i < 8;
i++) {
97 for (
size_t j = 0; j <
poly_size(Deg); ++j) {
98 table[
i][
x][j] = t.get(j);
102 return copy_table(table);
std::array< std::array< std::array< uint64_t, poly_size(Deg)>, 256 >, 8 > poly_table
—— Concurrent Priority Queue Implementation ——
constexpr size_t poly_size(size_t bits)
constexpr auto data(C &c) -> decltype(c.data())
#define FOLLY_STORAGE_CONSTEXPR
static constexpr uint64_t data[1]