Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_scalar_mul.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <cstddef>
5#include <string_view>
6#include <tuple>
7
8#include "../columns.hpp"
11
12namespace bb::avm2 {
13
15
17 static constexpr std::string_view NAME = "LOOKUP_SCALAR_MUL_TO_RADIX";
18 static constexpr std::string_view RELATION_NAME = "scalar_mul";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
20 static constexpr Column SRC_SELECTOR = Column::scalar_mul_sel;
21 static constexpr Column DST_SELECTOR = Column::to_radix_sel;
22 static constexpr Column COUNTS = Column::lookup_scalar_mul_to_radix_counts;
23 static constexpr Column INVERSES = Column::lookup_scalar_mul_to_radix_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::scalar_mul_scalar,
26 ColumnAndShifts::scalar_mul_bit,
27 ColumnAndShifts::scalar_mul_bit_idx,
28 ColumnAndShifts::scalar_mul_const_two
29 };
30 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
31 ColumnAndShifts::to_radix_value,
32 ColumnAndShifts::to_radix_limb,
33 ColumnAndShifts::to_radix_limb_index,
34 ColumnAndShifts::to_radix_radix
35 };
36};
37
39template <typename FF_>
41
43
45 static constexpr std::string_view NAME = "LOOKUP_SCALAR_MUL_DOUBLE";
46 static constexpr std::string_view RELATION_NAME = "scalar_mul";
47 static constexpr size_t LOOKUP_TUPLE_SIZE = 7;
48 static constexpr Column SRC_SELECTOR = Column::scalar_mul_sel_not_end;
49 static constexpr Column DST_SELECTOR = Column::ecc_sel;
50 static constexpr Column COUNTS = Column::lookup_scalar_mul_double_counts;
51 static constexpr Column INVERSES = Column::lookup_scalar_mul_double_inv;
52 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
53 ColumnAndShifts::scalar_mul_temp_x, ColumnAndShifts::scalar_mul_temp_y,
54 ColumnAndShifts::scalar_mul_temp_inf, ColumnAndShifts::scalar_mul_temp_x_shift,
55 ColumnAndShifts::scalar_mul_temp_y_shift, ColumnAndShifts::scalar_mul_temp_inf_shift,
56 ColumnAndShifts::scalar_mul_sel_not_end
57 };
58 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
59 ColumnAndShifts::ecc_r_x, ColumnAndShifts::ecc_r_y, ColumnAndShifts::ecc_r_is_inf,
60 ColumnAndShifts::ecc_p_x, ColumnAndShifts::ecc_p_y, ColumnAndShifts::ecc_p_is_inf,
61 ColumnAndShifts::ecc_double_op
62 };
63};
64
66template <typename FF_>
68
70
72 static constexpr std::string_view NAME = "LOOKUP_SCALAR_MUL_ADD";
73 static constexpr std::string_view RELATION_NAME = "scalar_mul";
74 static constexpr size_t LOOKUP_TUPLE_SIZE = 9;
75 static constexpr Column SRC_SELECTOR = Column::scalar_mul_should_add;
76 static constexpr Column DST_SELECTOR = Column::ecc_sel;
77 static constexpr Column COUNTS = Column::lookup_scalar_mul_add_counts;
78 static constexpr Column INVERSES = Column::lookup_scalar_mul_add_inv;
79 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
80 ColumnAndShifts::scalar_mul_res_x, ColumnAndShifts::scalar_mul_res_y,
81 ColumnAndShifts::scalar_mul_res_inf, ColumnAndShifts::scalar_mul_res_x_shift,
82 ColumnAndShifts::scalar_mul_res_y_shift, ColumnAndShifts::scalar_mul_res_inf_shift,
83 ColumnAndShifts::scalar_mul_temp_x, ColumnAndShifts::scalar_mul_temp_y,
84 ColumnAndShifts::scalar_mul_temp_inf
85 };
86 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
87 ColumnAndShifts::ecc_r_x, ColumnAndShifts::ecc_r_y, ColumnAndShifts::ecc_r_is_inf,
88 ColumnAndShifts::ecc_p_x, ColumnAndShifts::ecc_p_y, ColumnAndShifts::ecc_p_is_inf,
89 ColumnAndShifts::ecc_q_x, ColumnAndShifts::ecc_q_y, ColumnAndShifts::ecc_q_is_inf
90 };
91};
92
94template <typename FF_>
96
97} // namespace bb::avm2
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
Settings to be passed ot GenericLookupRelationImpl.