27template <
typename Params,
typename View>
59template <
typename RelationImpl>
63 constexpr size_t NUM_SUBRELATIONS = RelationImpl::SUBRELATION_PARTIAL_LENGTHS.size();
65 for (
size_t idx = 0; idx < NUM_SUBRELATIONS; idx++) {
66 result[idx] = RelationImpl::SUBRELATION_PARTIAL_LENGTHS[idx] + RelationImpl::TOTAL_LENGTH_ADJUSTMENTS[idx];
70 return RelationImpl::SUBRELATION_PARTIAL_LENGTHS;
85template <
size_t NUM_KEYS,
size_t NUM_SUBRELATIONS>
89 std::transform(SUBRELATION_PARTIAL_LENGTHS.begin(),
90 SUBRELATION_PARTIAL_LENGTHS.end(),
91 SUBRELATION_PARTIAL_LENGTHS.begin(),
92 [](
const size_t x) { return (x - 1) * (NUM_KEYS - 1) + 1; });
93 return SUBRELATION_PARTIAL_LENGTHS;
126template <
typename Relation,
typename AllEntities>
140template <
typename Flavor,
typename ProverPolynomialsOrPartiallyEvaluatedMultivariates,
typename EdgeType>
142 requires(
const ProverPolynomialsOrPartiallyEvaluatedMultivariates& input,
const EdgeType edge_idx) {
153template <
typename RelationImpl>
class Relation :
public RelationImpl {
155 using FF =
typename RelationImpl::FF;
158 compute_total_subrelation_lengths<RelationImpl>();
161 RelationImpl::SUBRELATION_PARTIAL_LENGTHS.end());
166 template <
size_t NUM_KEYS>
169 template <
size_t NUM_KEYS>
172 compute_composed_subrelation_partial_lengths<NUM_KEYS>(
static bool skip_entire_row(const ProverPolynomialsOrPartiallyEvaluatedMultivariates &polynomials, const EdgeType edge_idx)
When evaluating the sumcheck protocol - can we skip evaluation of all relations for a given row?
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
TupleOfUnivariatesWithOptimisticSkipping< FF, compute_composed_subrelation_partial_lengths< NUM_KEYS >(SUBRELATION_TOTAL_LENGTHS), NUM_KEYS - 1 > ProtogalaxyTupleOfUnivariatesOverSubrelations
static constexpr size_t TOTAL_RELATION_LENGTH
ArrayOfValues< FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS > SumcheckArrayOfValuesOverSubrelations
TupleOfUnivariates< FF, compute_composed_subrelation_partial_lengths< NUM_KEYS >(SUBRELATION_TOTAL_LENGTHS)> ProtogalaxyTupleOfUnivariatesOverSubrelationsNoOptimisticSkipping
typename RelationImpl::FF FF
static constexpr size_t RELATION_LENGTH
static constexpr std::array< size_t, RelationImpl::SUBRELATION_PARTIAL_LENGTHS.size()> SUBRELATION_TOTAL_LENGTHS
TupleOfUnivariates< FF, RelationImpl::SUBRELATION_PARTIAL_LENGTHS > SumcheckTupleOfUnivariatesOverSubrelations
std::tuple_element_t< 0, SumcheckArrayOfValuesOverSubrelations > ValueAccumulator0
std::tuple_element_t< 0, SumcheckTupleOfUnivariatesOverSubrelations > UnivariateAccumulator0
constexpr size_t NUM_KEYS
Check if the flavor has a static skip method to determine if accumulation of all relations can be ski...
The templates defined herein facilitate sharing the relation arithmetic between the prover and the ve...
Entry point for Barretenberg command-line interface.
std::conditional_t< IsField< typename Params::DataType >, typename Params::DataType, View > GetParameterView
A type to optionally extract a view of a relation parameter in a relation.
typename TupleOfContainersOverArray< bb::Univariate, FF, LENGTHS, 0, SKIP_COUNT >::type TupleOfUnivariatesWithOptimisticSkipping
typename TupleOfContainersOverArray< bb::Univariate, FF, LENGTHS, 0, 0 >::type TupleOfUnivariates
HomogeneousTupleToArray< TupleOfValues< FF, LENGTHS > > ArrayOfValues
consteval std::array< size_t, NUM_SUBRELATIONS > compute_composed_subrelation_partial_lengths(std::array< size_t, NUM_SUBRELATIONS > SUBRELATION_PARTIAL_LENGTHS)
Get the subrelation accumulators for the Protogalaxy combiner calculation.
constexpr bool subrelation_is_linearly_independent()
Check whether a given subrelation is linearly independent from the other subrelations.
consteval std::array< size_t, RelationImpl::SUBRELATION_PARTIAL_LENGTHS.size()> compute_total_subrelation_lengths()
Compute the total subrelation lengths, i.e., the lengths when regarding the challenges as variables.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept