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_others;
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_others;
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_others;
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 = 5;
97 static constexpr Column SRC_SELECTOR = Column::to_radix_mem_sel_should_decompose;
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_limb_value,
106 ColumnAndShifts::to_radix_mem_value_found
107 };
108 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
109 ColumnAndShifts::to_radix_value,
110 ColumnAndShifts::to_radix_limb_index,
111 ColumnAndShifts::to_radix_radix,
112 ColumnAndShifts::to_radix_limb,
113 ColumnAndShifts::to_radix_found
114 };
115};
116
119template <typename FF_>
122
123} // 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