Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
fake_gt.cpp
Go to the documentation of this file.
1
#include "
barretenberg/vm2/simulation/testing/fakes/fake_gt.hpp
"
2
3
#include "
barretenberg/numeric/uint128/uint128.hpp
"
4
#include "
barretenberg/numeric/uint256/uint256.hpp
"
5
#include "
barretenberg/vm2/common/field.hpp
"
6
#include "
barretenberg/vm2/common/tagged_value.hpp
"
7
8
namespace
bb::avm2::simulation
{
9
10
bool
FakeGreaterThan::gt
(
const
FF
&
a
,
const
FF
&
b
)
11
{
12
return
static_cast<
uint256_t
>
(
a
) >
static_cast<
uint256_t
>
(
b
);
13
}
14
15
bool
FakeGreaterThan::gt
(
const
uint128_t
&
a
,
const
uint128_t
&
b
)
16
{
17
return
a
>
b
;
18
}
19
20
bool
FakeGreaterThan::gt
(
const
MemoryValue
&
a
,
const
MemoryValue
&
b
)
21
{
22
// < and <= implemented on MemoryValue
23
return
b
<=
a
;
24
}
25
26
}
// namespace bb::avm2::simulation
bb::avm2::TaggedValue
Definition
tagged_value.hpp:70
bb::avm2::simulation::FakeGreaterThan::gt
bool gt(const FF &a, const FF &b) override
Definition
fake_gt.cpp:10
bb::numeric::uint256_t
Definition
uint256.hpp:32
a
FF a
Definition
field_gt.test.cpp:51
b
FF b
Definition
field_gt.test.cpp:52
fake_gt.hpp
bb::avm2::simulation
Definition
address_derivation.cpp:8
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
uint128_t
unsigned __int128 uint128_t
Definition
serialize.hpp:44
tagged_value.hpp
uint128.hpp
uint256.hpp
field.hpp
src
barretenberg
vm2
simulation
testing
fakes
fake_gt.cpp
Generated by
1.9.8