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_OFFSET_PLUS_SIZE_IS_GT_DATA_SIZE";
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_start;
21 static constexpr Column DST_SELECTOR = Column::gt_sel_others;
22 static constexpr Column COUNTS = Column::lookup_data_copy_offset_plus_size_is_gt_data_size_counts;
23 static constexpr Column INVERSES = Column::lookup_data_copy_offset_plus_size_is_gt_data_size_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
36template <typename FF_>
39
41
43 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_CHECK_SRC_ADDR_IN_RANGE";
44 static constexpr std::string_view RELATION_NAME = "data_copy";
45 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
46 static constexpr Column SRC_SELECTOR = Column::data_copy_start;
47 static constexpr Column DST_SELECTOR = Column::gt_sel_others;
48 static constexpr Column COUNTS = Column::lookup_data_copy_check_src_addr_in_range_counts;
49 static constexpr Column INVERSES = Column::lookup_data_copy_check_src_addr_in_range_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
51 ColumnAndShifts::data_copy_read_addr_upper_bound,
52 ColumnAndShifts::data_copy_mem_size,
53 ColumnAndShifts::data_copy_src_reads_exceed_mem
54 };
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
56 ColumnAndShifts::gt_input_b,
57 ColumnAndShifts::gt_res };
58};
59
62template <typename FF_>
65
67
69 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_CHECK_DST_ADDR_IN_RANGE";
70 static constexpr std::string_view RELATION_NAME = "data_copy";
71 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
72 static constexpr Column SRC_SELECTOR = Column::data_copy_start;
73 static constexpr Column DST_SELECTOR = Column::gt_sel_others;
74 static constexpr Column COUNTS = Column::lookup_data_copy_check_dst_addr_in_range_counts;
75 static constexpr Column INVERSES = Column::lookup_data_copy_check_dst_addr_in_range_inv;
76 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
77 ColumnAndShifts::data_copy_write_addr_upper_bound,
78 ColumnAndShifts::data_copy_mem_size,
79 ColumnAndShifts::data_copy_dst_out_of_range_err
80 };
81 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
82 ColumnAndShifts::gt_input_b,
83 ColumnAndShifts::gt_res };
84};
85
88template <typename FF_>
91
93
95 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_SEL_HAS_READS";
96 static constexpr std::string_view RELATION_NAME = "data_copy";
97 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
98 static constexpr Column SRC_SELECTOR = Column::data_copy_start_no_err;
99 static constexpr Column DST_SELECTOR = Column::gt_sel_others;
100 static constexpr Column COUNTS = Column::lookup_data_copy_sel_has_reads_counts;
101 static constexpr Column INVERSES = Column::lookup_data_copy_sel_has_reads_inv;
102 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
103 ColumnAndShifts::data_copy_clamped_read_index_upper_bound,
104 ColumnAndShifts::data_copy_offset,
105 ColumnAndShifts::data_copy_sel_has_reads
106 };
107 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
108 ColumnAndShifts::gt_input_b,
109 ColumnAndShifts::gt_res };
110};
111
113template <typename FF_>
115
117
119 static constexpr std::string_view NAME = "LOOKUP_DATA_COPY_COL_READ";
120 static constexpr std::string_view RELATION_NAME = "data_copy";
121 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
122 static constexpr Column SRC_SELECTOR = Column::data_copy_cd_copy_col_read;
123 static constexpr Column DST_SELECTOR = Column::calldata_sel;
124 static constexpr Column COUNTS = Column::lookup_data_copy_col_read_counts;
125 static constexpr Column INVERSES = Column::lookup_data_copy_col_read_inv;
126 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
127 ColumnAndShifts::data_copy_read_addr_plus_one,
128 ColumnAndShifts::data_copy_dst_context_id,
129 ColumnAndShifts::data_copy_value
130 };
131 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
132 ColumnAndShifts::calldata_index, ColumnAndShifts::calldata_context_id, ColumnAndShifts::calldata_value
133 };
134};
135
137template <typename FF_>
139
140} // namespace bb::avm2
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::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
Settings to be passed ot GenericLookupRelationImpl.