Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_bitwise.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_BITWISE_INTEGRAL_TAG_LENGTH";
18 static constexpr std::string_view RELATION_NAME = "bitwise";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 2;
20 static constexpr Column SRC_SELECTOR = Column::bitwise_sel_get_ctr;
21 static constexpr Column DST_SELECTOR = Column::precomputed_sel_tag_parameters;
22 static constexpr Column COUNTS = Column::lookup_bitwise_integral_tag_length_counts;
23 static constexpr Column INVERSES = Column::lookup_bitwise_integral_tag_length_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::bitwise_tag_a,
25 ColumnAndShifts::bitwise_ctr };
26 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
27 ColumnAndShifts::precomputed_clk, ColumnAndShifts::precomputed_tag_byte_length
28 };
29};
30
32template <typename FF_>
35
37
39 static constexpr std::string_view NAME = "LOOKUP_BITWISE_BYTE_OPERATIONS";
40 static constexpr std::string_view RELATION_NAME = "bitwise";
41 static constexpr size_t LOOKUP_TUPLE_SIZE = 4;
42 static constexpr Column SRC_SELECTOR = Column::bitwise_sel;
43 static constexpr Column DST_SELECTOR = Column::precomputed_sel_bitwise;
44 static constexpr Column COUNTS = Column::lookup_bitwise_byte_operations_counts;
45 static constexpr Column INVERSES = Column::lookup_bitwise_byte_operations_inv;
46 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = { ColumnAndShifts::bitwise_op_id,
47 ColumnAndShifts::bitwise_ia_byte,
48 ColumnAndShifts::bitwise_ib_byte,
49 ColumnAndShifts::bitwise_ic_byte };
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
51 ColumnAndShifts::precomputed_bitwise_op_id,
52 ColumnAndShifts::precomputed_bitwise_input_a,
53 ColumnAndShifts::precomputed_bitwise_input_b,
54 ColumnAndShifts::precomputed_bitwise_output
55 };
56};
57
59template <typename FF_>
61
63
65 static constexpr std::string_view NAME = "LOOKUP_BITWISE_DISPATCH_EXEC_BITWISE";
66 static constexpr std::string_view RELATION_NAME = "bitwise";
67 static constexpr size_t LOOKUP_TUPLE_SIZE = 8;
68 static constexpr Column SRC_SELECTOR = Column::execution_sel_execute_bitwise;
69 static constexpr Column DST_SELECTOR = Column::bitwise_sel;
70 static constexpr Column COUNTS = Column::lookup_bitwise_dispatch_exec_bitwise_counts;
71 static constexpr Column INVERSES = Column::lookup_bitwise_dispatch_exec_bitwise_inv;
72 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
73 ColumnAndShifts::execution_subtrace_operation_id, ColumnAndShifts::execution_sel_opcode_error,
74 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_mem_tag_reg_0_,
75 ColumnAndShifts::execution_register_1_, ColumnAndShifts::execution_mem_tag_reg_1_,
76 ColumnAndShifts::execution_register_2_, ColumnAndShifts::execution_mem_tag_reg_2_
77 };
78 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
79 ColumnAndShifts::bitwise_op_id, ColumnAndShifts::bitwise_err, ColumnAndShifts::bitwise_acc_ia,
80 ColumnAndShifts::bitwise_tag_a, ColumnAndShifts::bitwise_acc_ib, ColumnAndShifts::bitwise_tag_b,
81 ColumnAndShifts::bitwise_acc_ic, ColumnAndShifts::bitwise_tag_c
82 };
83};
84
86template <typename FF_>
89
90} // 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 > 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 > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS