53 throw_or_abort(
"The Translator circuit size has exceeded the fixed upper bound");
58 for (
auto [wire_poly_, wire_] :
zip_view(wires, circuit.wires)) {
59 auto& wire_poly = wire_poly_;
60 const auto& wire = wire_;
63 for (size_t i = start; i < end; i++) {
64 if (i >= wire_poly.start_index() && i < wire_poly.end_index()) {
65 wire_poly.at(i) = circuit.get_variable(wire[i]);
67 BB_ASSERT_EQ(circuit.get_variable(wire[i]), 0);
76 auto& wire = wires[idx];
77 for (
size_t i = wire.end_index() - NUM_DISABLED_ROWS_IN_SUMCHECK; i < wire.end_index(); i++) {
115 const size_t max_value = (1 << Flavor::MICRO_LIMB_BITS) - 1;
118 const size_t min_iterations_per_thread = 1 << 6;
119 const size_t num_threads =
122 const size_t iterations_per_thread = Flavor::SORTED_STEPS_COUNT / num_threads;
123 const size_t leftovers = Flavor::SORTED_STEPS_COUNT % num_threads;
126 const size_t start = thread_idx * iterations_per_thread;
128 (thread_idx + 1) * iterations_per_thread + (thread_idx == num_threads - 1 ? leftovers : 0);
129 for (
size_t idx = start; idx < end; ++idx) {
130 inner_array[idx] = max_value - Flavor::SORT_STEP * idx;
137 return sorted_elements;
140 void compute_lagrange_polynomials();
142 void compute_extra_range_constraint_numerator();
144 void compute_translator_range_constraint_ordered_polynomials();
146 void compute_interleaved_polynomials();
148 void split_interleaved_random_coefficients_to_ordered();
A container for the prover polynomials handles.
The proving key is responsible for storing the polynomials used by the prover.
static constexpr size_t MINI_CIRCUIT_SIZE
static constexpr size_t NUM_OP_QUEUE_WIRES
TranslatorCircuitBuilder CircuitBuilder
bb::CommitmentKey< Curve > CommitmentKey
bb::Polynomial< FF > Polynomial
static constexpr size_t INTERLEAVING_GROUP_SIZE
void compute_interleaved_polynomials()
Construct a set of polynomials that are the result of interleaving a group of polynomials into one....
typename Flavor::CommitmentKey CommitmentKey
static std::array< size_t, Flavor::SORTED_STEPS_COUNT > get_sorted_steps()
Create the array of steps inserted in each ordered range constraint to ensure they respect the approp...
static constexpr size_t mini_circuit_dyadic_size
void compute_extra_range_constraint_numerator()
Compute the extra numerator for the grand product polynomial.
static constexpr size_t dyadic_circuit_size_without_masking
TranslatorProvingKey(const Circuit &circuit, const CommitmentKey &commitment_key=CommitmentKey())
void compute_translator_range_constraint_ordered_polynomials()
Compute denominator polynomials for Translator's range constraint permutation.
static constexpr size_t dyadic_circuit_size
typename Flavor::ProverPolynomials ProverPolynomials
std::shared_ptr< ProvingKey > proving_key
static constexpr size_t dyadic_mini_circuit_size_without_masking
typename Flavor::ProvingKey ProvingKey
TranslatorProvingKey()=default
typename Flavor::Polynomial Polynomial
void compute_lagrange_polynomials()
Set all the precomputed lagrange polynomials used in Translator relations.
typename Flavor::CircuitBuilder Circuit
Entry point for Barretenberg command-line interface.
size_t calculate_num_threads_pow2(size_t num_iterations, size_t min_iterations_per_thread)
calculates number of threads to create based on minimum iterations per thread, guaranteed power of 2
void parallel_for(size_t num_iterations, const std::function< void(size_t)> &func)
void parallel_for_range(size_t num_points, const std::function< void(size_t, size_t)> &func, size_t no_multhreading_if_less_or_equal)
Split a loop into several loops running in parallel.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
#define PROFILE_THIS_NAME(name)
static field random_element(numeric::RNG *engine=nullptr) noexcept
void throw_or_abort(std::string const &err)