2#include "barretenberg/sumcheck/instance/prover_instance.hpp"
3#include "barretenberg/sumcheck/instance/verifier_instance.hpp"
9 static_assert(NUM_ > 0,
"Must have at least one prover instance");
10 using Flavor = Flavor_;
11 using FoldingParameters =
typename Flavor::FoldingParameters;
13 static constexpr size_t NUM = NUM_;
16 using ArrayType = std::array<std::shared_ptr<Instance>, NUM_>;
18 static constexpr size_t EXTENDED_LENGTH = (Flavor::MAX_TOTAL_RELATION_LENGTH - 1) * (NUM - 1) + 1;
19 static constexpr size_t BATCHED_EXTENDED_LENGTH = (Flavor::MAX_TOTAL_RELATION_LENGTH - 1 + NUM - 1) * (NUM - 1) + 1;
25 std::vector<FF> next_gate_challenges;
27 std::shared_ptr<Instance>
const& operator[](
size_t idx)
const {
return _data[idx]; }
28 typename ArrayType::iterator begin() {
return _data.begin(); };
29 typename ArrayType::iterator end() {
return _data.end(); };
33 ASSERT(data.size() == NUM);
34 for (
size_t idx = 0; idx < data.size(); idx++) {
35 _data[idx] = std::move(data[idx]);
57 std::vector<Univariate<FF, NUM>> row_to_univariates(
size_t row_idx)
const
59 auto insts_prover_polynomials_views = get_polynomials_views();
60 std::vector<Univariate<FF, NUM>> results;
62 results.resize(insts_prover_polynomials_views[0].size());
63 size_t instance_idx = 0;
65 for (
auto& get_all : insts_prover_polynomials_views) {
67 for (
auto [result, poly_ptr] :
zip_view(results, get_all)) {
68 result.evaluations[instance_idx] = (poly_ptr)[row_idx];
77 auto get_polynomials_views()
const
80 std::vector get_alls{ _data[0]->prover_polynomials.get_all() };
82 for (
size_t i = 1; i < NUM; i++) {
83 get_alls.push_back(_data[i]->prover_polynomials.get_all());
90 using Flavor = Flavor_;
93 using ArrayType = std::array<std::shared_ptr<Instance>, NUM_>;
96 static constexpr size_t NUM = NUM_;
97 static constexpr size_t BATCHED_EXTENDED_LENGTH = (Flavor::MAX_TOTAL_RELATION_LENGTH - 1 + NUM - 1) * (NUM - 1) + 1;
99 std::shared_ptr<Instance>
const& operator[](
size_t idx)
const {
return _data[idx]; }
100 typename ArrayType::iterator begin() {
return _data.begin(); };
101 typename ArrayType::iterator end() {
return _data.end(); };
105 std::generate(_data.begin(), _data.end(), []() { return std::make_unique<Instance>(); });
An Instance is normally constructed from a finalized circuit and it's role is to compute all the poly...
Definition: prover_instance.hpp:20
Definition: verifier_instance.hpp:6
VerificationKey_< PrecomputedEntities< Commitment > > VerificationKey
The verification key is responsible for storing the the commitments to the precomputed (non-witnessk)...
Definition: goblin_translator.hpp:941
Definition: zip_view.hpp:159
Defines particular circuit builder types expected to be used for circuit construction in stdlib and c...
Definition: claim.hpp:6
Definition: instances.hpp:7
Definition: instances.hpp:89