Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_data_copy.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_DATA_COPY_MAX_READ_INDEX_GT";
18 static constexpr std::string_view RELATION_NAME = "data_copy";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
20 static constexpr Column SRC_SELECTOR = Column::data_copy_sel_start;
21 static constexpr Column DST_SELECTOR = Column::gt_sel;
22 static constexpr Column COUNTS = Column::lookup_data_copy_max_read_index_gt_counts;
23 static constexpr Column INVERSES = Column::lookup_data_copy_max_read_index_gt_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::data_copy_offset_plus_size,
26 ColumnAndShifts::data_copy_src_data_size,
27 ColumnAndShifts::data_copy_offset_plus_size_is_gt
28 };
29 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
30 ColumnAndShifts::gt_input_b,
31 ColumnAndShifts::gt_res };
32};
33
35template <typename FF_>
38
40
42 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_CHECK_SRC_ADDR_IN_RANGE";
43 static constexpr std::string_view RELATION_NAME = "data_copy";
44 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
45 static constexpr Column SRC_SELECTOR = Column::data_copy_sel_start;
46 static constexpr Column DST_SELECTOR = Column::gt_sel;
47 static constexpr Column COUNTS = Column::lookup_data_copy_check_src_addr_in_range_counts;
48 static constexpr Column INVERSES = Column::lookup_data_copy_check_src_addr_in_range_inv;
49 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
50 ColumnAndShifts::data_copy_max_read_addr,
51 ColumnAndShifts::data_copy_max_mem_addr,
52 ColumnAndShifts::data_copy_src_out_of_range_err
53 };
54 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
55 ColumnAndShifts::gt_input_b,
56 ColumnAndShifts::gt_res };
57};
58
61template <typename FF_>
64
66
68 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_CHECK_DST_ADDR_IN_RANGE";
69 static constexpr std::string_view RELATION_NAME = "data_copy";
70 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
71 static constexpr Column SRC_SELECTOR = Column::data_copy_sel_start;
72 static constexpr Column DST_SELECTOR = Column::gt_sel;
73 static constexpr Column COUNTS = Column::lookup_data_copy_check_dst_addr_in_range_counts;
74 static constexpr Column INVERSES = Column::lookup_data_copy_check_dst_addr_in_range_inv;
75 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
76 ColumnAndShifts::data_copy_max_write_addr,
77 ColumnAndShifts::data_copy_max_mem_addr,
78 ColumnAndShifts::data_copy_dst_out_of_range_err
79 };
80 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
81 ColumnAndShifts::gt_input_b,
82 ColumnAndShifts::gt_res };
83};
84
87template <typename FF_>
90
92
94 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_OFFSET_GT_MAX_READ_INDEX";
95 static constexpr std::string_view RELATION_NAME = "data_copy";
96 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
97 static constexpr Column SRC_SELECTOR = Column::data_copy_sel_start_no_err;
98 static constexpr Column DST_SELECTOR = Column::gt_sel;
99 static constexpr Column COUNTS = Column::lookup_data_copy_offset_gt_max_read_index_counts;
100 static constexpr Column INVERSES = Column::lookup_data_copy_offset_gt_max_read_index_inv;
101 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
102 ColumnAndShifts::data_copy_offset,
103 ColumnAndShifts::data_copy_max_read_index,
104 ColumnAndShifts::data_copy_offset_gt_max_read_index
105 };
106 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
107 ColumnAndShifts::gt_input_b,
108 ColumnAndShifts::gt_res };
109};
110
113template <typename FF_>
116
118
120 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_MEM_WRITE";
121 static constexpr std::string_view RELATION_NAME = "data_copy";
122 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
123 static constexpr Column SRC_SELECTOR = Column::data_copy_sel_mem_write;
124 static constexpr Column DST_SELECTOR = Column::memory_sel;
125 static constexpr Column COUNTS = Column::lookup_data_copy_mem_write_counts;
126 static constexpr Column INVERSES = Column::lookup_data_copy_mem_write_inv;
127 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
128 ColumnAndShifts::data_copy_clk, ColumnAndShifts::data_copy_dst_addr,
129 ColumnAndShifts::data_copy_value, ColumnAndShifts::precomputed_zero,
130 ColumnAndShifts::data_copy_sel_mem_write, ColumnAndShifts::data_copy_dst_context_id
131 };
132 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
133 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
134 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_rw, ColumnAndShifts::memory_space_id
135 };
136};
137
139template <typename FF_>
141
143
145 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_MEM_READ";
146 static constexpr std::string_view RELATION_NAME = "data_copy";
147 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
148 static constexpr Column SRC_SELECTOR = Column::data_copy_sel_mem_read;
149 static constexpr Column DST_SELECTOR = Column::memory_sel;
150 static constexpr Column COUNTS = Column::lookup_data_copy_mem_read_counts;
151 static constexpr Column INVERSES = Column::lookup_data_copy_mem_read_inv;
152 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
153 ColumnAndShifts::data_copy_clk, ColumnAndShifts::data_copy_read_addr,
154 ColumnAndShifts::data_copy_value, ColumnAndShifts::precomputed_zero,
155 ColumnAndShifts::precomputed_zero, ColumnAndShifts::data_copy_src_context_id
156 };
157 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
158 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
159 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_rw, ColumnAndShifts::memory_space_id
160 };
161};
162
164template <typename FF_>
166
168
170 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_COL_READ";
171 static constexpr std::string_view RELATION_NAME = "data_copy";
172 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
173 static constexpr Column SRC_SELECTOR = Column::data_copy_cd_copy_col_read;
174 static constexpr Column DST_SELECTOR = Column::calldata_sel;
175 static constexpr Column COUNTS = Column::lookup_data_copy_col_read_counts;
176 static constexpr Column INVERSES = Column::lookup_data_copy_col_read_inv;
177 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
178 ColumnAndShifts::data_copy_value,
179 ColumnAndShifts::data_copy_dst_context_id,
180 ColumnAndShifts::data_copy_read_addr
181 };
182 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
183 ColumnAndShifts::calldata_value, ColumnAndShifts::calldata_context_id, ColumnAndShifts::calldata_index
184 };
185};
186
188template <typename FF_>
190
191} // namespace bb::avm2
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
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::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::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_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::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS