Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
to_radix.hpp
Go to the documentation of this file.
1
// AUTOGENERATED FILE
2
#pragma once
3
4
#include <string_view>
5
6
#include "
barretenberg/common/op_count.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_radixImpl
{
14
public
:
15
using
FF
= FF_;
16
17
static
constexpr
std::array<size_t, 40>
SUBRELATION_PARTIAL_LENGTHS
= { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 4,
18
3, 3, 3, 3, 3, 3, 4, 5, 4, 3, 3, 3, 3, 5,
19
3, 3, 3, 3, 3, 5, 3, 4, 3, 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_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
:
public
Relation
<to_radixImpl<FF>> {
36
public
:
37
static
constexpr
const
std::string_view
NAME
=
"to_radix"
;
38
39
static
std::string
get_subrelation_label
(
size_t
index)
40
{
41
switch
(index) {
42
case
4:
43
return
"START_AFTER_LATCH"
;
44
case
5:
45
return
"SELECTOR_ON_START"
;
46
case
6:
47
return
"SELECTOR_CONSISTENCY"
;
48
case
36:
49
return
"OVERFLOW_CHECK"
;
50
case
37:
51
return
"CONSTANT_CONSISTENCY_RADIX"
;
52
case
38:
53
return
"CONSTANT_CONSISTENCY_VALUE"
;
54
case
39:
55
return
"CONSTANT_CONSISTENCY_SAFE_LIMBS"
;
56
}
57
return
std::to_string
(index);
58
}
59
60
// Subrelation indices constants, to be used in tests.
61
static
constexpr
size_t
SR_START_AFTER_LATCH
= 4;
62
static
constexpr
size_t
SR_SELECTOR_ON_START
= 5;
63
static
constexpr
size_t
SR_SELECTOR_CONSISTENCY
= 6;
64
static
constexpr
size_t
SR_OVERFLOW_CHECK
= 36;
65
static
constexpr
size_t
SR_CONSTANT_CONSISTENCY_RADIX
= 37;
66
static
constexpr
size_t
SR_CONSTANT_CONSISTENCY_VALUE
= 38;
67
static
constexpr
size_t
SR_CONSTANT_CONSISTENCY_SAFE_LIMBS
= 39;
68
};
69
70
}
// namespace bb::avm2
bb::Relation
A wrapper for Relations to expose methods used by the Sumcheck prover or verifier to add the contribu...
Definition
relation_types.hpp:153
bb::avm2::to_radix
Definition
to_radix.hpp:35
bb::avm2::to_radix::SR_START_AFTER_LATCH
static constexpr size_t SR_START_AFTER_LATCH
Definition
to_radix.hpp:61
bb::avm2::to_radix::SR_SELECTOR_ON_START
static constexpr size_t SR_SELECTOR_ON_START
Definition
to_radix.hpp:62
bb::avm2::to_radix::SR_SELECTOR_CONSISTENCY
static constexpr size_t SR_SELECTOR_CONSISTENCY
Definition
to_radix.hpp:63
bb::avm2::to_radix::SR_OVERFLOW_CHECK
static constexpr size_t SR_OVERFLOW_CHECK
Definition
to_radix.hpp:64
bb::avm2::to_radix::get_subrelation_label
static std::string get_subrelation_label(size_t index)
Definition
to_radix.hpp:39
bb::avm2::to_radix::SR_CONSTANT_CONSISTENCY_SAFE_LIMBS
static constexpr size_t SR_CONSTANT_CONSISTENCY_SAFE_LIMBS
Definition
to_radix.hpp:67
bb::avm2::to_radix::SR_CONSTANT_CONSISTENCY_RADIX
static constexpr size_t SR_CONSTANT_CONSISTENCY_RADIX
Definition
to_radix.hpp:65
bb::avm2::to_radix::SR_CONSTANT_CONSISTENCY_VALUE
static constexpr size_t SR_CONSTANT_CONSISTENCY_VALUE
Definition
to_radix.hpp:66
bb::avm2::to_radix::NAME
static constexpr const std::string_view NAME
Definition
to_radix.hpp:37
bb::avm2::to_radixImpl
Definition
to_radix.hpp:13
bb::avm2::to_radixImpl::SUBRELATION_PARTIAL_LENGTHS
static constexpr std::array< size_t, 40 > SUBRELATION_PARTIAL_LENGTHS
Definition
to_radix.hpp:17
bb::avm2::to_radixImpl::accumulate
static void accumulate(ContainerOverSubrelations &evals, const AllEntities &in, const RelationParameters< FF > &, const FF &scaling_factor)
Definition
to_radix_impl.hpp:10
bb::avm2::to_radixImpl::skip
static bool skip(const AllEntities &in)
Definition
to_radix.hpp:21
bb::avm2::to_radixImpl::FF
FF_ FF
Definition
to_radix.hpp:15
columns.hpp
bb::avm2
Definition
flavor.hpp:472
bb::avm2::Column
Column
Definition
columns.hpp:32
bb::avm2::ColumnAndShifts
ColumnAndShifts
Definition
columns.hpp:35
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
std::to_string
std::string to_string(bb::avm2::ValueTag tag)
Definition
tagged_value.cpp:399
op_count.hpp
relation_parameters.hpp
relation_types.hpp
bb::RelationParameters
Container for parameters used by the grand product (permutation, lookup) Honk relations.
Definition
relation_parameters.hpp:19
src
barretenberg
vm2
generated
relations
to_radix.hpp
Generated by
1.9.8