Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
to_radix_mem.hpp
Go to the documentation of this file.
1
// AUTOGENERATED FILE
2
#pragma once
3
4
#include <string_view>
5
6
#include "
barretenberg/common/bb_bench.hpp
"
7
#include "
barretenberg/relations/relation_parameters.hpp
"
8
#include "
barretenberg/relations/relation_types.hpp
"
9
#include "
barretenberg/vm2/generated/columns.hpp
"
10
11
namespace
bb::avm2
{
12
13
template
<
typename
FF_>
class
to_radix_memImpl
{
14
public
:
15
using
FF
= FF_;
16
17
static
constexpr
std::array<size_t, 41>
SUBRELATION_PARTIAL_LENGTHS
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
18
3, 3, 3, 5, 4, 3, 5, 3, 5, 3, 6, 3, 4, 3,
19
3, 3, 4, 4, 3, 3, 3, 4, 6, 4, 3, 3, 3 };
20
21
template
<
typename
AllEntities>
inline
static
bool
skip
(
const
AllEntities& in)
22
{
23
using
C
=
ColumnAndShifts
;
24
25
return
(in.get(C::to_radix_mem_sel)).is_zero();
26
}
27
28
template
<
typename
ContainerOverSubrelations,
typename
AllEntities>
29
void
static
accumulate
(ContainerOverSubrelations& evals,
30
const
AllEntities& in,
31
[[maybe_unused]]
const
RelationParameters<FF>
&,
32
[[maybe_unused]]
const
FF
& scaling_factor);
33
};
34
35
template
<
typename
FF>
class
to_radix_mem
:
public
Relation
<to_radix_memImpl<FF>> {
36
public
:
37
static
constexpr
const
std::string_view
NAME
=
"to_radix_mem"
;
38
39
// Subrelation indices constants, to be used in tests.
40
static
constexpr
size_t
SR_SEL_ON_START_OR_END
= 3;
41
static
constexpr
size_t
SR_TRACE_CONTINUITY
= 4;
42
static
constexpr
size_t
SR_START_AFTER_LATCH
= 5;
43
static
constexpr
size_t
SR_EXEC_CLK_CONTINUITY
= 6;
44
static
constexpr
size_t
SR_SPACE_ID_CONTINUITY
= 7;
45
static
constexpr
size_t
SR_VALUE_CONTINUITY
= 8;
46
static
constexpr
size_t
SR_RADIX_CONTINUITY
= 9;
47
static
constexpr
size_t
SR_IS_OUTPUT_BITS_CONTINUITY
= 10;
48
static
constexpr
size_t
SR_IS_OUTPUT_BITS_IMPLY_RADIX_2
= 18;
49
static
constexpr
size_t
SR_ZERO_CHECK_NUM_LIMBS
= 20;
50
static
constexpr
size_t
SR_ZERO_CHECK_VALUE
= 22;
51
static
constexpr
size_t
SR_SEL_SHOULD_DECOMPOSE_CONTINUITY
= 27;
52
static
constexpr
size_t
SR_TRUNCATION_ERROR
= 30;
53
static
constexpr
size_t
SR_DECR_NUM_LIMBS
= 32;
54
static
constexpr
size_t
SR_INCR_DST_ADDRESS
= 33;
55
static
constexpr
size_t
SR_LAST_ROW_ERR_COMPUTATION
= 34;
56
static
constexpr
size_t
SR_LAST_ROW_NUM_LIMBS_ZERO
= 35;
57
static
constexpr
size_t
SR_LAST_ROW_VALID_COMPUTATION
= 36;
58
static
constexpr
size_t
SR_SEL_SHOULD_WRITE_MEM_CONTINUITY
= 38;
59
static
constexpr
size_t
SR_SEL_SHOULD_WRITE_MEM_REQUIRES_SEL
= 39;
60
61
static
std::string
get_subrelation_label
(
size_t
index
)
62
{
63
switch
(
index
) {
64
case
SR_SEL_ON_START_OR_END
:
65
return
"SEL_ON_START_OR_END"
;
66
case
SR_TRACE_CONTINUITY
:
67
return
"TRACE_CONTINUITY"
;
68
case
SR_START_AFTER_LATCH
:
69
return
"START_AFTER_LATCH"
;
70
case
SR_EXEC_CLK_CONTINUITY
:
71
return
"EXEC_CLK_CONTINUITY"
;
72
case
SR_SPACE_ID_CONTINUITY
:
73
return
"SPACE_ID_CONTINUITY"
;
74
case
SR_VALUE_CONTINUITY
:
75
return
"VALUE_CONTINUITY"
;
76
case
SR_RADIX_CONTINUITY
:
77
return
"RADIX_CONTINUITY"
;
78
case
SR_IS_OUTPUT_BITS_CONTINUITY
:
79
return
"IS_OUTPUT_BITS_CONTINUITY"
;
80
case
SR_IS_OUTPUT_BITS_IMPLY_RADIX_2
:
81
return
"IS_OUTPUT_BITS_IMPLY_RADIX_2"
;
82
case
SR_ZERO_CHECK_NUM_LIMBS
:
83
return
"ZERO_CHECK_NUM_LIMBS"
;
84
case
SR_ZERO_CHECK_VALUE
:
85
return
"ZERO_CHECK_VALUE"
;
86
case
SR_SEL_SHOULD_DECOMPOSE_CONTINUITY
:
87
return
"SEL_SHOULD_DECOMPOSE_CONTINUITY"
;
88
case
SR_TRUNCATION_ERROR
:
89
return
"TRUNCATION_ERROR"
;
90
case
SR_DECR_NUM_LIMBS
:
91
return
"DECR_NUM_LIMBS"
;
92
case
SR_INCR_DST_ADDRESS
:
93
return
"INCR_DST_ADDRESS"
;
94
case
SR_LAST_ROW_ERR_COMPUTATION
:
95
return
"LAST_ROW_ERR_COMPUTATION"
;
96
case
SR_LAST_ROW_NUM_LIMBS_ZERO
:
97
return
"LAST_ROW_NUM_LIMBS_ZERO"
;
98
case
SR_LAST_ROW_VALID_COMPUTATION
:
99
return
"LAST_ROW_VALID_COMPUTATION"
;
100
case
SR_SEL_SHOULD_WRITE_MEM_CONTINUITY
:
101
return
"SEL_SHOULD_WRITE_MEM_CONTINUITY"
;
102
case
SR_SEL_SHOULD_WRITE_MEM_REQUIRES_SEL
:
103
return
"SEL_SHOULD_WRITE_MEM_REQUIRES_SEL"
;
104
}
105
return
std::to_string
(
index
);
106
}
107
};
108
109
}
// namespace bb::avm2
bb_bench.hpp
bb::Relation
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Definition
relation_types.hpp:96
bb::avm2::to_radix_mem
Definition
to_radix_mem.hpp:35
bb::avm2::to_radix_mem::SR_SPACE_ID_CONTINUITY
static constexpr size_t SR_SPACE_ID_CONTINUITY
Definition
to_radix_mem.hpp:44
bb::avm2::to_radix_mem::SR_SEL_SHOULD_WRITE_MEM_CONTINUITY
static constexpr size_t SR_SEL_SHOULD_WRITE_MEM_CONTINUITY
Definition
to_radix_mem.hpp:58
bb::avm2::to_radix_mem::SR_TRACE_CONTINUITY
static constexpr size_t SR_TRACE_CONTINUITY
Definition
to_radix_mem.hpp:41
bb::avm2::to_radix_mem::SR_SEL_SHOULD_DECOMPOSE_CONTINUITY
static constexpr size_t SR_SEL_SHOULD_DECOMPOSE_CONTINUITY
Definition
to_radix_mem.hpp:51
bb::avm2::to_radix_mem::SR_INCR_DST_ADDRESS
static constexpr size_t SR_INCR_DST_ADDRESS
Definition
to_radix_mem.hpp:54
bb::avm2::to_radix_mem::SR_START_AFTER_LATCH
static constexpr size_t SR_START_AFTER_LATCH
Definition
to_radix_mem.hpp:42
bb::avm2::to_radix_mem::SR_IS_OUTPUT_BITS_CONTINUITY
static constexpr size_t SR_IS_OUTPUT_BITS_CONTINUITY
Definition
to_radix_mem.hpp:47
bb::avm2::to_radix_mem::NAME
static constexpr const std::string_view NAME
Definition
to_radix_mem.hpp:37
bb::avm2::to_radix_mem::SR_TRUNCATION_ERROR
static constexpr size_t SR_TRUNCATION_ERROR
Definition
to_radix_mem.hpp:52
bb::avm2::to_radix_mem::SR_SEL_ON_START_OR_END
static constexpr size_t SR_SEL_ON_START_OR_END
Definition
to_radix_mem.hpp:40
bb::avm2::to_radix_mem::SR_LAST_ROW_NUM_LIMBS_ZERO
static constexpr size_t SR_LAST_ROW_NUM_LIMBS_ZERO
Definition
to_radix_mem.hpp:56
bb::avm2::to_radix_mem::SR_ZERO_CHECK_VALUE
static constexpr size_t SR_ZERO_CHECK_VALUE
Definition
to_radix_mem.hpp:50
bb::avm2::to_radix_mem::SR_VALUE_CONTINUITY
static constexpr size_t SR_VALUE_CONTINUITY
Definition
to_radix_mem.hpp:45
bb::avm2::to_radix_mem::SR_SEL_SHOULD_WRITE_MEM_REQUIRES_SEL
static constexpr size_t SR_SEL_SHOULD_WRITE_MEM_REQUIRES_SEL
Definition
to_radix_mem.hpp:59
bb::avm2::to_radix_mem::get_subrelation_label
static std::string get_subrelation_label(size_t index)
Definition
to_radix_mem.hpp:61
bb::avm2::to_radix_mem::SR_LAST_ROW_ERR_COMPUTATION
static constexpr size_t SR_LAST_ROW_ERR_COMPUTATION
Definition
to_radix_mem.hpp:55
bb::avm2::to_radix_mem::SR_ZERO_CHECK_NUM_LIMBS
static constexpr size_t SR_ZERO_CHECK_NUM_LIMBS
Definition
to_radix_mem.hpp:49
bb::avm2::to_radix_mem::SR_LAST_ROW_VALID_COMPUTATION
static constexpr size_t SR_LAST_ROW_VALID_COMPUTATION
Definition
to_radix_mem.hpp:57
bb::avm2::to_radix_mem::SR_DECR_NUM_LIMBS
static constexpr size_t SR_DECR_NUM_LIMBS
Definition
to_radix_mem.hpp:53
bb::avm2::to_radix_mem::SR_IS_OUTPUT_BITS_IMPLY_RADIX_2
static constexpr size_t SR_IS_OUTPUT_BITS_IMPLY_RADIX_2
Definition
to_radix_mem.hpp:48
bb::avm2::to_radix_mem::SR_EXEC_CLK_CONTINUITY
static constexpr size_t SR_EXEC_CLK_CONTINUITY
Definition
to_radix_mem.hpp:43
bb::avm2::to_radix_mem::SR_RADIX_CONTINUITY
static constexpr size_t SR_RADIX_CONTINUITY
Definition
to_radix_mem.hpp:46
bb::avm2::to_radix_memImpl
Definition
to_radix_mem.hpp:13
bb::avm2::to_radix_memImpl::accumulate
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
Definition
to_radix_mem_impl.hpp:11
bb::avm2::to_radix_memImpl::SUBRELATION_PARTIAL_LENGTHS
static constexpr std::array< size_t, 41 > SUBRELATION_PARTIAL_LENGTHS
Definition
to_radix_mem.hpp:17
bb::avm2::to_radix_memImpl::skip
static bool skip(const AllEntities &in)
Definition
to_radix_mem.hpp:21
bb::avm2::to_radix_memImpl::FF
FF_ FF
Definition
to_radix_mem.hpp:15
columns.hpp
VariableRefMutationOptions::index
@ index
bb::avm2
Definition
dbs.cpp:19
bb::avm2::Column
Column
Definition
columns.hpp:31
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
bb::avm2::ColumnAndShifts
ColumnAndShifts
Definition
columns.hpp:34
std::to_string
std::string to_string(bb::avm2::ValueTag tag)
Definition
tagged_value.cpp:402
relation_parameters.hpp
relation_types.hpp
bb::RelationParameters
Container for parameters used by the grand product (permutation, lookup) Honk relations.
Definition
relation_parameters.hpp:18
src
barretenberg
vm2
generated
relations
to_radix_mem.hpp
Generated by
1.9.8