Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_to_radix_mem.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_TO_RADIX_MEM_CHECK_DST_ADDR_IN_RANGE";
18 static constexpr std::string_view RELATION_NAME = "to_radix_mem";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
20 static constexpr Column SRC_SELECTOR = Column::to_radix_mem_start;
21 static constexpr Column DST_SELECTOR = Column::gt_sel;
22 static constexpr Column COUNTS = Column::lookup_to_radix_mem_check_dst_addr_in_range_counts;
23 static constexpr Column INVERSES = Column::lookup_to_radix_mem_check_dst_addr_in_range_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::to_radix_mem_max_write_addr,
26 ColumnAndShifts::to_radix_mem_max_mem_addr,
27 ColumnAndShifts::to_radix_mem_sel_dst_out_of_range_err
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_TO_RADIX_MEM_CHECK_RADIX_LT_2";
44 static constexpr std::string_view RELATION_NAME = "to_radix_mem";
45 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
46 static constexpr Column SRC_SELECTOR = Column::to_radix_mem_start;
47 static constexpr Column DST_SELECTOR = Column::gt_sel;
48 static constexpr Column COUNTS = Column::lookup_to_radix_mem_check_radix_lt_2_counts;
49 static constexpr Column INVERSES = Column::lookup_to_radix_mem_check_radix_lt_2_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
51 ColumnAndShifts::to_radix_mem_two,
52 ColumnAndShifts::to_radix_mem_radix,
53 ColumnAndShifts::to_radix_mem_sel_radix_lt_2_err
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
61template <typename FF_>
64
66
68 static constexpr std::string_view NAME = "LOOKUP_TO_RADIX_MEM_CHECK_RADIX_GT_256";
69 static constexpr std::string_view RELATION_NAME = "to_radix_mem";
70 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
71 static constexpr Column SRC_SELECTOR = Column::to_radix_mem_start;
72 static constexpr Column DST_SELECTOR = Column::gt_sel;
73 static constexpr Column COUNTS = Column::lookup_to_radix_mem_check_radix_gt_256_counts;
74 static constexpr Column INVERSES = Column::lookup_to_radix_mem_check_radix_gt_256_inv;
75 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
76 ColumnAndShifts::to_radix_mem_radix,
77 ColumnAndShifts::to_radix_mem_two_five_six,
78 ColumnAndShifts::to_radix_mem_sel_radix_gt_256_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_TO_RADIX_MEM_INPUT_OUTPUT_TO_RADIX";
95 static constexpr std::string_view RELATION_NAME = "to_radix_mem";
96 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
97 static constexpr Column SRC_SELECTOR = Column::to_radix_mem_sel_should_exec;
98 static constexpr Column DST_SELECTOR = Column::to_radix_sel;
99 static constexpr Column COUNTS = Column::lookup_to_radix_mem_input_output_to_radix_counts;
100 static constexpr Column INVERSES = Column::lookup_to_radix_mem_input_output_to_radix_inv;
101 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
102 ColumnAndShifts::to_radix_mem_value_to_decompose,
103 ColumnAndShifts::to_radix_mem_limb_index_to_lookup,
104 ColumnAndShifts::to_radix_mem_radix,
105 ColumnAndShifts::to_radix_mem_output_limb_value
106 };
107 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
108 ColumnAndShifts::to_radix_value,
109 ColumnAndShifts::to_radix_limb_index,
110 ColumnAndShifts::to_radix_radix,
111 ColumnAndShifts::to_radix_limb
112 };
113};
114
117template <typename FF_>
120
122
124 static constexpr std::string_view NAME = "LOOKUP_TO_RADIX_MEM_WRITE_MEM";
125 static constexpr std::string_view RELATION_NAME = "to_radix_mem";
126 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
127 static constexpr Column SRC_SELECTOR = Column::to_radix_mem_sel_should_exec;
128 static constexpr Column DST_SELECTOR = Column::memory_sel;
129 static constexpr Column COUNTS = Column::lookup_to_radix_mem_write_mem_counts;
130 static constexpr Column INVERSES = Column::lookup_to_radix_mem_write_mem_inv;
131 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
132 ColumnAndShifts::to_radix_mem_execution_clk, ColumnAndShifts::to_radix_mem_dst_addr,
133 ColumnAndShifts::to_radix_mem_output_limb_value, ColumnAndShifts::to_radix_mem_output_tag,
134 ColumnAndShifts::to_radix_mem_space_id, ColumnAndShifts::to_radix_mem_sel_should_exec
135 };
136 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
137 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
138 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_space_id, ColumnAndShifts::memory_rw
139 };
140};
141
143template <typename FF_>
145
146} // 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 > DST_COLUMNS
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::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS