Barretenberg
The ZK-SNARK library at the core of Aztec
|
Container for managing multiple BasicTables plus the data needed to combine basic table outputs (e.g. limbs) into accumulators. Does not store actual raw table data. More...
#include <types.hpp>
Public Types | |
typedef std::array< bb::fr, 2 > | table_out |
typedef std::array< uint64_t, 2 > | table_in |
Public Member Functions | |
MultiTable (const bb::fr &col_1_repeated_coeff, const bb::fr &col_2_repeated_coeff, const bb::fr &col_3_repeated_coeff, const size_t num_lookups) | |
MultiTable (const std::vector< bb::fr > &col_1_coeffs, const std::vector< bb::fr > &col_2_coeffs, const std::vector< bb::fr > &col_3_coeffs) | |
MultiTable () | |
MultiTable (const MultiTable &other)=default | |
MultiTable (MultiTable &&other)=default | |
MultiTable & | operator= (const MultiTable &other)=default |
MultiTable & | operator= (MultiTable &&other)=default |
bool | operator== (const MultiTable &other) const =default |
Public Attributes | |
std::vector< bb::fr > | column_1_coefficients |
std::vector< bb::fr > | column_2_coefficients |
std::vector< bb::fr > | column_3_coefficients |
MultiTableId | id |
std::vector< BasicTableId > | basic_table_ids |
std::vector< uint64_t > | slice_sizes |
std::vector< bb::fr > | column_1_step_sizes |
std::vector< bb::fr > | column_2_step_sizes |
std::vector< bb::fr > | column_3_step_sizes |
std::vector< table_out(*)(table_in)> | get_table_values |
Private Member Functions | |
void | init_step_sizes () |
Container for managing multiple BasicTables plus the data needed to combine basic table outputs (e.g. limbs) into accumulators. Does not store actual raw table data.
As a simple example, consider using lookups to compute XOR on uint32_t inputs. To do this we decompose the inputs into 6 limbs and use a BasicTable for 6-bit XOR lookups. In this case the MultiTable simply manages 6 basic tables, all of which are the XOR BasicTable. (In many cases all of the BasicTables managed by a MultiTable are identical, however there are some cases where more than 1 type is required, e.g. if a certain limb has to be handled differently etc.). This class also stores the scalars needed to reconstruct full values from the components that are contained in the basic lookup tables.
typedef std::array<uint64_t, 2> bb::plookup::MultiTable::table_in |
typedef std::array<bb::fr, 2> bb::plookup::MultiTable::table_out |
|
default |
|
default |
|
inlineprivate |
|
default |
|
default |
|
default |
std::vector<BasicTableId> bb::plookup::MultiTable::basic_table_ids |
std::vector<bb::fr> bb::plookup::MultiTable::column_1_coefficients |
std::vector<bb::fr> bb::plookup::MultiTable::column_1_step_sizes |
std::vector<bb::fr> bb::plookup::MultiTable::column_2_coefficients |
std::vector<bb::fr> bb::plookup::MultiTable::column_2_step_sizes |
std::vector<bb::fr> bb::plookup::MultiTable::column_3_coefficients |
std::vector<bb::fr> bb::plookup::MultiTable::column_3_step_sizes |
MultiTableId bb::plookup::MultiTable::id |
std::vector<uint64_t> bb::plookup::MultiTable::slice_sizes |