72 return Settings::inverse_polynomial_is_computed_at_row(row);
91 template <
typename Accumulator,
typename AllEntities>
94 using View =
typename Accumulator::View;
98 Accumulator
const& first_set_enabled = Accumulator(
101 Accumulator
const& second_set_enabled = Accumulator(
105 return (first_set_enabled + second_set_enabled - (first_set_enabled * second_set_enabled));
113 template <
typename Accumulator,
size_t read_index,
typename AllEntities>
118 using View =
typename Accumulator::View;
131 template <
typename Accumulator,
size_t write_index,
typename AllEntities>
135 using View =
typename Accumulator::View;
153 template <
typename Accumulator,
size_t read_index,
typename AllEntities,
typename Parameters>
156 using View =
typename Accumulator::View;
161 const auto all_polynomials = Settings::get_const_entities(in);
163 auto result = Accumulator(0);
168 1>([&]<
size_t i>() { result = result * params.beta + View(
std::get<i>(all_polynomials)); });
170 const auto& gamma = params.gamma;
171 return result + gamma;
184 template <
typename Accumulator,
size_t write_index,
typename AllEntities,
typename Parameters>
187 using View =
typename Accumulator::View;
192 const auto& used_entities = Settings::get_const_entities(in);
194 auto result = Accumulator(0);
198 1>([&]<
size_t i>() { result = result * params.beta + View(
std::get<i>(used_entities)); });
200 const auto& gamma = params.gamma;
201 return result + gamma;
211 template <
typename ContainerOverSubrelations,
typename AllEntities,
typename Parameters>
212 static void accumulate(ContainerOverSubrelations& accumulator,
213 const AllEntities& in,
214 const Parameters& params,
215 const FF& scaling_factor)
219 accumulator, in, params, scaling_factor);
223template <
typename Settings,
typename FF>
static constexpr std::array< bool, 2 > SUBRELATION_LINEARLY_INDEPENDENT
We apply the power polynomial only to the first subrelation.
static bool operation_exists_at_row(const AllValues &row)
Check if we need to compute the inverse polynomial element value for this row.
static Accumulator compute_read_term_predicate(const AllEntities &in)
Compute if the value from the first set exists in this row.
static Accumulator compute_write_term_predicate(const AllEntities &in)
Compute if the value from the second set exists in this row.
static Accumulator compute_inverse_exists(const AllEntities &in)
Get selector/wire switching on(1) or off(0) inverse computation We turn it on if either of the permut...
static Accumulator compute_read_term(const AllEntities &in, const Parameters ¶ms)
Compute the value of a single item in the set.
static constexpr size_t READ_TERMS
static void accumulate(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Expression for generic log-derivative-based set permutation.
static constexpr size_t LENGTH
static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
static auto & get_inverse_polynomial(AllEntities &in)
Get the inverse permutation polynomial (needed to compute its value)
static Accumulator compute_write_term(const AllEntities &in, const Parameters ¶ms)
Compute the value of a single item in the set.
static constexpr size_t WRITE_TERMS
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Entry point for Barretenberg command-line interface.
GenericPermutationSettingIndices
Specifies positions of elements in the tuple of entities received from methods in the Settings class.
@ INVERSE_POLYNOMIAL_INDEX
@ PERMUTATION_SETS_START_POLYNOMIAL_INDEX
@ FIRST_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX
@ SECOND_PERMUTATION_SET_ENABLE_POLYNOMIAL_INDEX
void accumulate_logderivative_permutation_subrelation_contributions(ContainerOverSubrelations &accumulator, const AllEntities &in, const Parameters ¶ms, const FF &scaling_factor)
Compute generic log-derivative set permutation subrelation accumulation.
constexpr void constexpr_for(F &&f)
Implements a loop using a compile-time iterator. Requires c++20. Implementation (and description) fro...
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept