27 template <
typename AllEntities>
inline static bool skip(
const AllEntities& in)
29 return (in.w_non_shifted_accumulator.is_zero() && in.w_shifted_accumulator.is_zero()) ||
30 (in.w_evaluations_accumulator.is_zero());
41 template <
typename ContainerOverSubrelations,
typename AllEntities,
typename Parameters>
42 inline static void accumulate(ContainerOverSubrelations& evals,
43 const AllEntities& in,
45 const FF& scaling_factor)
49 auto w_non_shifted_accumulator = Accumulator(in.w_non_shifted_accumulator);
50 auto w_evaluations_accumulator = Accumulator(in.w_evaluations_accumulator);
51 auto w_shifted_accumulator = Accumulator(in.w_shifted_accumulator);
53 std::get<0>(evals) += (w_non_shifted_accumulator * w_evaluations_accumulator) * scaling_factor;
54 std::get<1>(evals) += (w_shifted_accumulator * w_evaluations_accumulator) * scaling_factor;
72 template <
typename AllEntities>
inline static bool skip(
const AllEntities& in)
74 return (in.w_non_shifted_accumulator.is_zero() && in.w_non_shifted_instance.is_zero() &&
75 in.w_shifted_accumulator.is_zero() && in.w_shifted_instance.is_zero()) ||
76 (in.w_evaluations_accumulator.is_zero() && in.w_evaluations_instance.is_zero());
87 template <
typename ContainerOverSubrelations,
typename AllEntities,
typename Parameters>
88 inline static void accumulate(ContainerOverSubrelations& evals,
89 const AllEntities& in,
91 const FF& scaling_factor)
95 auto w_non_shifted_instance = Accumulator(in.w_non_shifted_instance);
96 auto w_evaluations_instance = Accumulator(in.w_evaluations_instance);
97 auto w_shifted_instance = Accumulator(in.w_shifted_instance);
99 std::get<0>(evals) += (w_non_shifted_instance * w_evaluations_instance) * scaling_factor;
100 std::get<1>(evals) += (w_shifted_instance * w_evaluations_instance) * scaling_factor;
104template <
typename FF>
106template <
typename FF>
static bool skip(const AllEntities &in)
Returns true if the contribution from all subrelations for the provided inputs is identically zero.
static constexpr std::array< bool, 2 > SUBRELATION_LINEARLY_INDEPENDENT
static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const Parameters &, const FF &scaling_factor)
Expression for the Multilinear Batching accumulator gate.
static constexpr std::array< bool, 2 > SUBRELATION_LINEARLY_INDEPENDENT
static bool skip(const AllEntities &in)
Returns true if the contribution from all subrelations for the provided inputs is identically zero.
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const Parameters &, const FF &scaling_factor)
Expression for the Multilinear Batching gate.
static constexpr std::array< size_t, 2 > SUBRELATION_PARTIAL_LENGTHS
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.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept