Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
relation_macros.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <type_traits>
4
#include <utility>
5
6
// This function/macros is used to possibly cast pol aliases in a relation's accumulate.
7
template
<
typename
View,
typename
FF_>
constexpr
auto
avm_relations_maybe_cast_
(
auto
&& v)
8
{
9
if
constexpr
(
std::is_same_v
<
std::decay_t
<
decltype
(v)>, FF_>) {
10
return
std::forward<decltype(v)>
(v);
11
}
else
{
12
return
static_cast<
View
>
(
std::forward<decltype(v)>
(v));
13
}
14
};
15
16
#define CView(v) avm_relations_maybe_cast_<View, FF_>(v)
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
avm_relations_maybe_cast_
constexpr auto avm_relations_maybe_cast_(auto &&v)
Definition
relation_macros.hpp:7
src
barretenberg
vm2
constraining
relations
relation_macros.hpp
Generated by
1.9.8