19 auto to_be_shifted = polys.get_to_be_shifted();
22 "To be shifted columns array size mismatch");
25 const size_t num_to_be_shifted = to_be_shifted.size();
26 for (
size_t i = 0; i < num_to_be_shifted; i++) {
27 auto& poly = to_be_shifted[i];
33 uint32_t allocated_size = num_rows > 0 ? num_rows - 1 : 0;
48 auto unshifted = polys.get_unshifted();
50 auto& poly = unshifted[i];
52 if (poly.virtual_size() > 0) {
65 auto unshifted = polys.get_unshifted();
68 auto& poly = unshifted[i];
69 Column col = static_cast<Column>(i);
71 trace.visit_column(col, [&](size_t row, const AvmProver::FF& value) {
81 for (
auto [shifted, to_be_shifted] :
zip_view(polys.get_shifted(), polys.get_to_be_shifted())) {
82 shifted = to_be_shifted.shifted();
94 auto& inverse_polynomial = prover_polynomials.
get(
static_cast<ColumnAndShifts>(inverses_col));
95 const auto& src_selector = prover_polynomials.
get(
static_cast<ColumnAndShifts>(src_selector_col));
96 const auto& dst_selector = prover_polynomials.
get(
static_cast<ColumnAndShifts>(dst_selector_col));
98 if (!inverse_polynomial.is_empty()) {
99 throw std::runtime_error(
"Inverse polynomial is expected to be empty at this point.");
102 const size_t num_rows =
std::max<size_t>(src_selector.end_index(), dst_selector.end_index());
103 inverse_polynomial = AvmProver::Polynomial::create_non_parallel_zero_init(num_rows,
MAX_AVM_TRACE_SIZE);
106 "Inverse polynomial size mismatch");
113 for (
auto [key_poly, prover_poly] :
zip_view(proving_key->get_all(), polynomials.get_unshifted())) {
#define BB_ASSERT_EQ(actual, expected,...)
static Polynomial create_non_parallel_zero_init(size_t size, size_t virtual_size)
A factory to construct a polynomial where parallel initialization is not possible (e....
DataType & get(ColumnAndShifts c)
A container for the prover polynomials handles.
Flavor::Polynomial Polynomial
uint32_t get_column_rows(Column col) const
void clear_column(Column col)
void resize_inverses(AvmFlavor::ProverPolynomials &prover_polynomials, Column inverses_col, Column src_selector_col, Column dst_selector_col)
AvmProver::ProverPolynomials compute_polynomials(tracegen::TraceContainer &trace)
std::shared_ptr< AvmProver::ProvingKey > proving_key_from_polynomials(AvmProver::ProverPolynomials &polynomials)
constexpr std::size_t MAX_AVM_TRACE_SIZE
constexpr auto TO_BE_SHIFTED_COLUMNS_ARRAY
std::string flavor_get_label(Container &&container, const Element &element)
void parallel_for(size_t num_iterations, const std::function< void(size_t)> &func)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
#define AVM_TRACK_TIME(key, body)