Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_to_radix.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_LIMB_RANGE";
18 static constexpr std::string_view RELATION_NAME = "to_radix";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
20 static constexpr Column SRC_SELECTOR = Column::to_radix_sel;
21 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
22 static constexpr Column COUNTS = Column::lookup_to_radix_limb_range_counts;
23 static constexpr Column INVERSES = Column::lookup_to_radix_limb_range_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::to_radix_limb };
25 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_clk };
26};
27
29template <typename FF_>
31
33
35 static constexpr std::string_view NAME = "LOOKUP_TO_RADIX_LIMB_LESS_THAN_RADIX_RANGE";
36 static constexpr std::string_view RELATION_NAME = "to_radix";
37 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
38 static constexpr Column SRC_SELECTOR = Column::to_radix_sel;
39 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
40 static constexpr Column COUNTS = Column::lookup_to_radix_limb_less_than_radix_range_counts;
41 static constexpr Column INVERSES = Column::lookup_to_radix_limb_less_than_radix_range_inv;
42 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
43 ColumnAndShifts::to_radix_limb_radix_diff
44 };
45 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_clk };
46};
47
50template <typename FF_>
53
55
57 static constexpr std::string_view NAME = "LOOKUP_TO_RADIX_FETCH_SAFE_LIMBS";
58 static constexpr std::string_view RELATION_NAME = "to_radix";
59 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
60 static constexpr Column SRC_SELECTOR = Column::to_radix_start;
61 static constexpr Column DST_SELECTOR = Column::precomputed_sel_to_radix_p_limb_counts;
62 static constexpr Column COUNTS = Column::lookup_to_radix_fetch_safe_limbs_counts;
63 static constexpr Column INVERSES = Column::lookup_to_radix_fetch_safe_limbs_inv;
64 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
65 ColumnAndShifts::to_radix_radix, ColumnAndShifts::to_radix_safe_limbs
66 };
67 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
68 ColumnAndShifts::precomputed_clk, ColumnAndShifts::precomputed_to_radix_safe_limbs
69 };
70};
71
73template <typename FF_>
75
77
79 static constexpr std::string_view NAME = "LOOKUP_TO_RADIX_FETCH_P_LIMB";
80 static constexpr std::string_view RELATION_NAME = "to_radix";
81 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
82 static constexpr Column SRC_SELECTOR = Column::to_radix_not_padding_limb;
83 static constexpr Column DST_SELECTOR = Column::precomputed_sel_p_decomposition;
84 static constexpr Column COUNTS = Column::lookup_to_radix_fetch_p_limb_counts;
85 static constexpr Column INVERSES = Column::lookup_to_radix_fetch_p_limb_inv;
86 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
87 ColumnAndShifts::to_radix_radix, ColumnAndShifts::to_radix_limb_index, ColumnAndShifts::to_radix_p_limb
88 };
89 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
90 ColumnAndShifts::precomputed_p_decomposition_radix,
91 ColumnAndShifts::precomputed_p_decomposition_limb_index,
92 ColumnAndShifts::precomputed_p_decomposition_limb
93 };
94};
95
97template <typename FF_>
99
101
103 static constexpr std::string_view NAME = "LOOKUP_TO_RADIX_LIMB_P_DIFF_RANGE";
104 static constexpr std::string_view RELATION_NAME = "to_radix";
105 static constexpr size_t LOOKUP_TUPLE_SIZE = 1;
106 static constexpr Column SRC_SELECTOR = Column::to_radix_not_padding_limb;
107 static constexpr Column DST_SELECTOR = Column::precomputed_sel_range_8;
108 static constexpr Column COUNTS = Column::lookup_to_radix_limb_p_diff_range_counts;
109 static constexpr Column INVERSES = Column::lookup_to_radix_limb_p_diff_range_inv;
110 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
111 ColumnAndShifts::to_radix_limb_p_diff
112 };
113 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::precomputed_clk };
114};
115
117template <typename FF_>
120
121} // 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::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 > 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 > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS