Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
translator_shiftable_first_coeff_zero_relation_impl.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
9
10namespace bb {
11
20template <typename FF>
21template <typename ContainerOverSubrelations, typename AllEntities, typename Parameters>
22void TranslatorShiftableFirstCoeffZeroRelationImpl<FF>::accumulate(ContainerOverSubrelations& accumulators,
23 const AllEntities& in,
24 const Parameters& /*unused*/,
25 const FF& scaling_factor)
26{
28 using View = typename Accumulator::View;
29 const auto lagrange_first = View(in.lagrange_first);
30
31 // Contributions 0-4 pin the first value of each sorted ordered_range_constraints wire to 0.
32 std::get<0>(accumulators) += lagrange_first * View(in.ordered_range_constraints_0) * scaling_factor;
33 std::get<1>(accumulators) += lagrange_first * View(in.ordered_range_constraints_1) * scaling_factor;
34 std::get<2>(accumulators) += lagrange_first * View(in.ordered_range_constraints_2) * scaling_factor;
35 std::get<3>(accumulators) += lagrange_first * View(in.ordered_range_constraints_3) * scaling_factor;
36 std::get<4>(accumulators) += lagrange_first * View(in.ordered_range_constraints_4) * scaling_factor;
37}
38} // namespace bb
static void accumulate(ContainerOverSubrelations &accumulators, const AllEntities &in, const Parameters &, const FF &scaling_factor)
Anchors the first coefficient of the shiftable ordered_range_constraints polynomials to zero.
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13