Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
range_check_event.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
// TODO(dbanks12): what is Cpp best practice? Import this here or somewhere common/shared?
6
// It is needed for uint128_t
7
#include "
barretenberg/numeric/uint128/uint128.hpp
"
8
9
namespace
bb::avm2::simulation
{
10
11
struct
RangeCheckEvent
{
12
uint128_t
value
;
13
uint8_t
num_bits
;
14
15
bool
operator==
(
const
RangeCheckEvent
& other)
const
=
default
;
16
17
// To be used with deduplicating event emitters.
18
using
Key
=
std::tuple<uint128_t, uint8_t>
;
19
Key
get_key
()
const
{
return
{
value
,
num_bits
}; }
20
};
21
22
}
// namespace bb::avm2::simulation
bb::avm2::simulation
Definition
address_derivation.cpp:8
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
uint128_t
unsigned __int128 uint128_t
Definition
serialize.hpp:44
bb::avm2::simulation::RangeCheckEvent
Definition
range_check_event.hpp:11
bb::avm2::simulation::RangeCheckEvent::num_bits
uint8_t num_bits
Definition
range_check_event.hpp:13
bb::avm2::simulation::RangeCheckEvent::operator==
bool operator==(const RangeCheckEvent &other) const =default
bb::avm2::simulation::RangeCheckEvent::Key
std::tuple< uint128_t, uint8_t > Key
Definition
range_check_event.hpp:18
bb::avm2::simulation::RangeCheckEvent::value
uint128_t value
Definition
range_check_event.hpp:12
bb::avm2::simulation::RangeCheckEvent::get_key
Key get_key() const
Definition
range_check_event.hpp:19
uint128.hpp
src
barretenberg
vm2
simulation
events
range_check_event.hpp
Generated by
1.9.8