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_bit_radix
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 = 9;
48 static constexpr Column SRC_SELECTOR = Column::scalar_mul_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_temp_x_shift, ColumnAndShifts::scalar_mul_temp_y_shift,
57 ColumnAndShifts::scalar_mul_temp_inf_shift
58 };
59 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
60 ColumnAndShifts::ecc_r_x, ColumnAndShifts::ecc_r_y, ColumnAndShifts::ecc_r_is_inf,
61 ColumnAndShifts::ecc_p_x, ColumnAndShifts::ecc_p_y, ColumnAndShifts::ecc_p_is_inf,
62 ColumnAndShifts::ecc_q_x, ColumnAndShifts::ecc_q_y, ColumnAndShifts::ecc_q_is_inf
63 };
64};
65
67template <typename FF_>
69
71
73 static constexpr std::string_view NAME = "LOOKUP_SCALAR_MUL_ADD";
74 static constexpr std::string_view RELATION_NAME = "scalar_mul";
75 static constexpr size_t LOOKUP_TUPLE_SIZE = 9;
76 static constexpr Column SRC_SELECTOR = Column::scalar_mul_should_add;
77 static constexpr Column DST_SELECTOR = Column::ecc_sel;
78 static constexpr Column COUNTS = Column::lookup_scalar_mul_add_counts;
79 static constexpr Column INVERSES = Column::lookup_scalar_mul_add_inv;
80 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
81 ColumnAndShifts::scalar_mul_res_x, ColumnAndShifts::scalar_mul_res_y,
82 ColumnAndShifts::scalar_mul_res_inf, ColumnAndShifts::scalar_mul_res_x_shift,
83 ColumnAndShifts::scalar_mul_res_y_shift, ColumnAndShifts::scalar_mul_res_inf_shift,
84 ColumnAndShifts::scalar_mul_temp_x, ColumnAndShifts::scalar_mul_temp_y,
85 ColumnAndShifts::scalar_mul_temp_inf
86 };
87 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
88 ColumnAndShifts::ecc_r_x, ColumnAndShifts::ecc_r_y, ColumnAndShifts::ecc_r_is_inf,
89 ColumnAndShifts::ecc_p_x, ColumnAndShifts::ecc_p_y, ColumnAndShifts::ecc_p_is_inf,
90 ColumnAndShifts::ecc_q_x, ColumnAndShifts::ecc_q_y, ColumnAndShifts::ecc_q_is_inf
91 };
92};
93
95template <typename FF_>
97
98} // namespace bb::avm2
This file contains the template for the generic lookup that can be specialized to enforce various loo...
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