Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
class_id_derivation_impl.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
6
7namespace bb::avm2 {
8
9template <typename FF_>
10template <typename ContainerOverSubrelations, typename AllEntities>
11void class_id_derivationImpl<FF_>::accumulate(ContainerOverSubrelations& evals,
12 const AllEntities& in,
13 [[maybe_unused]] const RelationParameters<FF_>&,
14 [[maybe_unused]] const FF_& scaling_factor)
15{
16 using C = ColumnAndShifts;
17
18 const auto constants_GENERATOR_INDEX__CONTRACT_LEAF = FF(16);
19
20 {
21 using View = typename std::tuple_element_t<0, ContainerOverSubrelations>::View;
22 auto tmp = static_cast<View>(in.get(C::class_id_derivation_sel)) *
23 (FF(1) - static_cast<View>(in.get(C::class_id_derivation_sel)));
24 std::get<0>(evals) += (tmp * scaling_factor);
25 }
26 {
27 using View = typename std::tuple_element_t<1, ContainerOverSubrelations>::View;
28 auto tmp = static_cast<View>(in.get(C::class_id_derivation_sel)) *
29 (static_cast<View>(in.get(C::class_id_derivation_gen_index_contract_leaf)) -
30 CView(constants_GENERATOR_INDEX__CONTRACT_LEAF));
31 std::get<1>(evals) += (tmp * scaling_factor);
32 }
33 {
34 using View = typename std::tuple_element_t<2, ContainerOverSubrelations>::View;
35 auto tmp = static_cast<View>(in.get(C::class_id_derivation_sel)) *
36 (static_cast<View>(in.get(C::class_id_derivation_const_two)) - FF(2));
37 std::get<2>(evals) += (tmp * scaling_factor);
38 }
39}
40
41} // namespace bb::avm2
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
ColumnAndShifts
Definition columns.hpp:34
AvmFlavorSettings::FF FF
Definition field.hpp:10
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
#define CView(v)
Container for parameters used by the grand product (permutation, lookup) Honk relations.