26template <
typename Flavor>
31 for (
const auto& table : circuit.get_lookup_tables()) {
32 for (
size_t i = 0; i < table.size(); ++i) {
33 table_polynomials[0].at(
offset) = table.column_1[i];
34 table_polynomials[1].at(
offset) = table.column_2[i];
35 table_polynomials[2].at(
offset) = table.column_3[i];
36 table_polynomials[3].at(
offset) = table.table_index;
49template <
typename Flavor>
55 size_t table_offset = 0;
56 for (
auto& table : circuit.get_lookup_tables()) {
57 table.initialize_index_map();
59 for (
auto& gate_data : table.lookup_gates) {
61 auto table_entry = gate_data.to_table_components(table.use_twin_keys);
64 auto index_in_table = table.index_map[table_entry];
67 size_t index_in_poly = table_offset + index_in_table;
68 read_counts.
at(index_in_poly)++;
69 read_tags.
at(index_in_poly) = 1;
71 table_offset += table.size();
Fr & at(size_t index)
Our mutable accessor, unlike operator[]. We abuse precedent a bit to differentiate at() and operator[...
A template class for a reference array. Behaves as if std::array<T&, N> was possible.
Base class templates for structures that contain data parameterized by the fundamental polynomials of...
Entry point for Barretenberg command-line interface.
void construct_lookup_table_polynomials(const RefArray< typename Flavor::Polynomial, 4 > &table_polynomials, const typename Flavor::CircuitBuilder &circuit)
Construct polynomials containing the concatenation of all lookup tables used in the circuit.
void construct_lookup_read_counts(typename Flavor::Polynomial &read_counts, typename Flavor::Polynomial &read_tags, typename Flavor::CircuitBuilder &circuit)
Construct polynomial whose value at index i is the number of times the table entry at that index has ...