Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::LookupPolynomialStructure< Settings_ > Class Template Reference

Polynomial structure required for the lookup argument. More...

#include <generic_lookup_relation.hpp>

Static Public Member Functions

static constexpr size_t get_inverse_polynomial_index ()
 
static constexpr size_t get_read_count_polynomial_index (const size_t index)
 
static constexpr size_t get_lookup_term_predicate_index (const size_t lookup_index)
 
static constexpr size_t get_table_term_predicate_index (const size_t table_index)
 
static constexpr size_t compute_lookup_term_polynomial_offset (size_t lookup_index)
 Compute where the polynomials defining a particular lookup term are located.
 
static constexpr size_t compute_table_term_polynomial_offset (size_t table_index)
 Compute where the polynomials defining a particular table term are located.
 

Static Private Attributes

static constexpr size_t NUM_LOOKUP_TERMS = Settings_::NUM_LOOKUP_TERMS
 
static constexpr size_t NUM_TABLE_TERMS = Settings_::NUM_TABLE_TERMS
 
static constexpr size_t INVERSE_POLYNOMIAL_INDEX = 0
 
static constexpr size_t LOOKUP_READ_COUNT_START_POLYNOMIAL_INDEX = 1
 
static constexpr size_t LOOKUP_TERM_PREDICATE_START_POLYNOMIAL_INDEX
 
static constexpr size_t TABLE_TERM_PREDICATE_START_POLYNOMIAL_INDEX
 
static constexpr size_t LOOKUP_TERM_START_POLYNOMIAL_INDEX
 

Detailed Description

template<typename Settings_>
class bb::LookupPolynomialStructure< Settings_ >

Polynomial structure required for the lookup argument.

The implementor must provide methods get_const_entities and get_nonconst_entities via Settings that return the polynomials required for the lookup argument. These polynomials have a structure that is in part fixed and in part variable:

Fixed Part:

  1. The first polynomial is the inverse polynomial
  2. Next we have NUM_TABLE_TERMS polynomials representing the lookup read counts, i.e., how many times each table term has been read
  3. Next we have NUM_LOOKUP_TERMS polynomials representing the lookup term predicates, which toggle whether a lookup term can be looked up in this row or not
  4. Next we have NUM_TABLE_TERMS polynomials representing the table term predicates, which toggle whether a table term can be looked up in this row or not

Variable Part:

  1. For each lookup term, we have a variable number of polynomials depending on the type of lookup:
    • BASIC_LOOKUP: LOOKUP_TUPLE_SIZE polynomials representing the columns being looked up (and that will be batched)
    • CUSTOMIZED_LOOKUP: No additional polynomials are required, as the logic is fully specified in Settings
  2. For each table term, we have a variable number of polynomials depending on the type of table:
    • BASIC_TABLE: LOOKUP_TUPLE_SIZE polynomials representing the table columns (and that will be batched)
    • CUSTOMIZED_TABLE: No additional polynomials are required, as the logic is fully specified in Settings

Definition at line 56 of file generic_lookup_relation.hpp.

Member Function Documentation

◆ compute_lookup_term_polynomial_offset()

template<typename Settings_ >
static constexpr size_t bb::LookupPolynomialStructure< Settings_ >::compute_lookup_term_polynomial_offset ( size_t  lookup_index)
inlinestaticconstexpr

Compute where the polynomials defining a particular lookup term are located.

Parameters
lookup_indexIndex of the lookup term
Returns
Offset in the polynomial array where this lookup term's polynomials begin

Definition at line 94 of file generic_lookup_relation.hpp.

◆ compute_table_term_polynomial_offset()

template<typename Settings_ >
static constexpr size_t bb::LookupPolynomialStructure< Settings_ >::compute_table_term_polynomial_offset ( size_t  table_index)
inlinestaticconstexpr

Compute where the polynomials defining a particular table term are located.

Parameters
table_indexIndex of the table term
Returns
Offset in the polynomial array where this table term's polynomials begin

Definition at line 121 of file generic_lookup_relation.hpp.

◆ get_inverse_polynomial_index()

template<typename Settings_ >
static constexpr size_t bb::LookupPolynomialStructure< Settings_ >::get_inverse_polynomial_index ( )
inlinestaticconstexpr

Definition at line 71 of file generic_lookup_relation.hpp.

◆ get_lookup_term_predicate_index()

template<typename Settings_ >
static constexpr size_t bb::LookupPolynomialStructure< Settings_ >::get_lookup_term_predicate_index ( const size_t  lookup_index)
inlinestaticconstexpr

Definition at line 78 of file generic_lookup_relation.hpp.

◆ get_read_count_polynomial_index()

template<typename Settings_ >
static constexpr size_t bb::LookupPolynomialStructure< Settings_ >::get_read_count_polynomial_index ( const size_t  index)
inlinestaticconstexpr

Definition at line 73 of file generic_lookup_relation.hpp.

◆ get_table_term_predicate_index()

template<typename Settings_ >
static constexpr size_t bb::LookupPolynomialStructure< Settings_ >::get_table_term_predicate_index ( const size_t  table_index)
inlinestaticconstexpr

Definition at line 83 of file generic_lookup_relation.hpp.

Member Data Documentation

◆ INVERSE_POLYNOMIAL_INDEX

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::INVERSE_POLYNOMIAL_INDEX = 0
staticconstexprprivate

Definition at line 61 of file generic_lookup_relation.hpp.

◆ LOOKUP_READ_COUNT_START_POLYNOMIAL_INDEX

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::LOOKUP_READ_COUNT_START_POLYNOMIAL_INDEX = 1
staticconstexprprivate

Definition at line 62 of file generic_lookup_relation.hpp.

◆ LOOKUP_TERM_PREDICATE_START_POLYNOMIAL_INDEX

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::LOOKUP_TERM_PREDICATE_START_POLYNOMIAL_INDEX
staticconstexprprivate
Initial value:

Definition at line 63 of file generic_lookup_relation.hpp.

◆ LOOKUP_TERM_START_POLYNOMIAL_INDEX

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::LOOKUP_TERM_START_POLYNOMIAL_INDEX
staticconstexprprivate
Initial value:

Definition at line 67 of file generic_lookup_relation.hpp.

◆ NUM_LOOKUP_TERMS

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::NUM_LOOKUP_TERMS = Settings_::NUM_LOOKUP_TERMS
staticconstexprprivate

Definition at line 58 of file generic_lookup_relation.hpp.

◆ NUM_TABLE_TERMS

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::NUM_TABLE_TERMS = Settings_::NUM_TABLE_TERMS
staticconstexprprivate

Definition at line 59 of file generic_lookup_relation.hpp.

◆ TABLE_TERM_PREDICATE_START_POLYNOMIAL_INDEX

template<typename Settings_ >
constexpr size_t bb::LookupPolynomialStructure< Settings_ >::TABLE_TERM_PREDICATE_START_POLYNOMIAL_INDEX
staticconstexprprivate
Initial value:

Definition at line 65 of file generic_lookup_relation.hpp.


The documentation for this class was generated from the following file: