Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE > Struct Template Reference

Evaluates the 10 structured Translator precomputed selectors at a sumcheck challenge point. More...

#include <translator_selectors.hpp>

Public Member Functions

template<typename Entities >
void populate (Entities &target) const
 Write all 10 computed evaluations into any entity struct with matching named fields.
 

Static Public Member Functions

static TranslatorSelectorEvaluations compute (std::span< const FF > u)
 Compute evaluations of all 10 structured selectors at the sumcheck challenge.
 

Public Attributes

FF lagrange_first
 
FF lagrange_last
 
FF lagrange_odd_in_minicircuit
 
FF lagrange_even_in_minicircuit
 
FF lagrange_result_row
 
FF lagrange_last_in_minicircuit
 
FF lagrange_masking
 
FF lagrange_mini_masking
 
FF lagrange_real_last
 
FF lagrange_ordered_masking
 

Static Public Attributes

static constexpr size_t LOG_CONCAT_GROUP_SIZE = 4
 
static constexpr size_t LOG_N = LOG_MINI_CIRCUIT_SIZE + LOG_CONCAT_GROUP_SIZE
 
static constexpr size_t RESULT_ROW = 8
 
static constexpr size_t NUM_MASKED_ROWS_END = 4
 
static constexpr size_t RANDOMNESS_START = 2
 
static constexpr size_t CONCATENATION_GROUP_SIZE = 1UL << LOG_CONCAT_GROUP_SIZE
 
static constexpr size_t MAX_RANDOM_VALUES_PER_ORDERED = CONCATENATION_GROUP_SIZE * NUM_MASKED_ROWS_END
 
static constexpr size_t LOG_NUM_MASKED = 2
 
static constexpr size_t LOG_RESULT_ROW = 3
 
static constexpr size_t LOG_RANDOMNESS_START = 1
 
static constexpr size_t LOG_MAX_RANDOM = LOG_CONCAT_GROUP_SIZE + LOG_NUM_MASKED
 

Detailed Description

template<typename FF, size_t LOG_MINI_CIRCUIT_SIZE>
struct bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >

Evaluates the 10 structured Translator precomputed selectors at a sumcheck challenge point.

All Translator selectors except ordered_extra_range_constraints_numerator are multilinear polynomials over {0,1}^d whose support forms subcubes or small unions of subcubes. Their evaluations at the sumcheck challenge u = (u_0, ..., u_{d-1}) can be computed in O(d) field operations, using the key property that the sum of multilinear Lagrange basis polynomials over a free subcube equals 1.

Bit ordering: row index ℓ = ℓ_0 + 2·ℓ_1 + ... + 2^{d-1}·ℓ_{d-1} (bit 0 = LSB). Bits 0..M-1 encode the position within a mini-circuit block; bits M..D-1 encode the block index.

Template Parameters
FFThe finite field type.
LOG_MINI_CIRCUIT_SIZELog2 of the mini-circuit size (e.g. 13 for current Translator).

Definition at line 23 of file translator_selectors.hpp.

Member Function Documentation

◆ compute()

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
static TranslatorSelectorEvaluations bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::compute ( std::span< const FF u)
inlinestatic

Compute evaluations of all 10 structured selectors at the sumcheck challenge.

Parameters
uSumcheck challenge (u_0, ..., u_{LOG_N-1}). Size must equal LOG_N.
Returns
TranslatorSelectorEvaluations with all 10 fields populated.

Definition at line 67 of file translator_selectors.hpp.

◆ populate()

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
template<typename Entities >
void bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::populate ( Entities target) const
inline

Write all 10 computed evaluations into any entity struct with matching named fields.

Works for AllValues, AllEntities<FF>, PrecomputedEntities<FF>, native or stdlib.

Definition at line 225 of file translator_selectors.hpp.

Member Data Documentation

◆ CONCATENATION_GROUP_SIZE

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::CONCATENATION_GROUP_SIZE = 1UL << LOG_CONCAT_GROUP_SIZE
staticconstexpr

Definition at line 32 of file translator_selectors.hpp.

◆ lagrange_even_in_minicircuit

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_even_in_minicircuit

Definition at line 53 of file translator_selectors.hpp.

◆ lagrange_first

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_first

Definition at line 50 of file translator_selectors.hpp.

◆ lagrange_last

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_last

Definition at line 51 of file translator_selectors.hpp.

◆ lagrange_last_in_minicircuit

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_last_in_minicircuit

Definition at line 55 of file translator_selectors.hpp.

◆ lagrange_masking

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_masking

Definition at line 56 of file translator_selectors.hpp.

◆ lagrange_mini_masking

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_mini_masking

Definition at line 57 of file translator_selectors.hpp.

◆ lagrange_odd_in_minicircuit

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_odd_in_minicircuit

Definition at line 52 of file translator_selectors.hpp.

◆ lagrange_ordered_masking

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_ordered_masking

Definition at line 59 of file translator_selectors.hpp.

◆ lagrange_real_last

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_real_last

Definition at line 58 of file translator_selectors.hpp.

◆ lagrange_result_row

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
FF bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::lagrange_result_row

Definition at line 54 of file translator_selectors.hpp.

◆ LOG_CONCAT_GROUP_SIZE

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::LOG_CONCAT_GROUP_SIZE = 4
staticconstexpr

Definition at line 25 of file translator_selectors.hpp.

◆ LOG_MAX_RANDOM

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::LOG_MAX_RANDOM = LOG_CONCAT_GROUP_SIZE + LOG_NUM_MASKED
staticconstexpr

Definition at line 39 of file translator_selectors.hpp.

◆ LOG_N

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::LOG_N = LOG_MINI_CIRCUIT_SIZE + LOG_CONCAT_GROUP_SIZE
staticconstexpr

Definition at line 26 of file translator_selectors.hpp.

◆ LOG_NUM_MASKED

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::LOG_NUM_MASKED = 2
staticconstexpr

Definition at line 36 of file translator_selectors.hpp.

◆ LOG_RANDOMNESS_START

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::LOG_RANDOMNESS_START = 1
staticconstexpr

Definition at line 38 of file translator_selectors.hpp.

◆ LOG_RESULT_ROW

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::LOG_RESULT_ROW = 3
staticconstexpr

Definition at line 37 of file translator_selectors.hpp.

◆ MAX_RANDOM_VALUES_PER_ORDERED

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::MAX_RANDOM_VALUES_PER_ORDERED = CONCATENATION_GROUP_SIZE * NUM_MASKED_ROWS_END
staticconstexpr

Definition at line 33 of file translator_selectors.hpp.

◆ NUM_MASKED_ROWS_END

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::NUM_MASKED_ROWS_END = 4
staticconstexpr

Definition at line 30 of file translator_selectors.hpp.

◆ RANDOMNESS_START

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::RANDOMNESS_START = 2
staticconstexpr

Definition at line 31 of file translator_selectors.hpp.

◆ RESULT_ROW

template<typename FF , size_t LOG_MINI_CIRCUIT_SIZE>
constexpr size_t bb::TranslatorSelectorEvaluations< FF, LOG_MINI_CIRCUIT_SIZE >::RESULT_ROW = 8
staticconstexpr

Definition at line 29 of file translator_selectors.hpp.


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