Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bitwise_event.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
#include "
barretenberg/vm2/common/constants.hpp
"
6
#include "
barretenberg/vm2/common/memory_types.hpp
"
7
8
namespace
bb::avm2::simulation
{
9
10
class
BitwiseException
:
public
std::runtime_error {
11
public
:
12
BitwiseException
(
const
std::string& msg)
13
:
std
::runtime_error(
"Bitwise Exception: "
+ msg)
14
{}
15
};
16
17
struct
BitwiseEvent
{
18
BitwiseOperation
operation
;
19
MemoryValue
a
;
20
MemoryValue
b
;
21
uint128_t
res
= 0;
22
23
// To be used with deduplicating event emitters.
24
using
Key
=
std::tuple<BitwiseOperation, MemoryValue, MemoryValue>
;
25
Key
get_key
()
const
{
return
{
operation
,
a
,
b
}; }
26
27
bool
operator==
(
const
BitwiseEvent
& other)
const
=
default
;
28
};
29
30
}
// namespace bb::avm2::simulation
bb::avm2::TaggedValue
Definition
tagged_value.hpp:70
bb::avm2::simulation::BitwiseException
Definition
bitwise_event.hpp:10
bb::avm2::simulation::BitwiseException::BitwiseException
BitwiseException(const std::string &msg)
Definition
bitwise_event.hpp:12
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
bb::avm2::BitwiseOperation
BitwiseOperation
Definition
constants.hpp:14
std
STL namespace.
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::BitwiseEvent
Definition
bitwise_event.hpp:17
bb::avm2::simulation::BitwiseEvent::Key
std::tuple< BitwiseOperation, MemoryValue, MemoryValue > Key
Definition
bitwise_event.hpp:24
bb::avm2::simulation::BitwiseEvent::a
MemoryValue a
Definition
bitwise_event.hpp:19
bb::avm2::simulation::BitwiseEvent::b
MemoryValue b
Definition
bitwise_event.hpp:20
bb::avm2::simulation::BitwiseEvent::operation
BitwiseOperation operation
Definition
bitwise_event.hpp:18
bb::avm2::simulation::BitwiseEvent::res
uint128_t res
Definition
bitwise_event.hpp:21
bb::avm2::simulation::BitwiseEvent::get_key
Key get_key() const
Definition
bitwise_event.hpp:25
bb::avm2::simulation::BitwiseEvent::operator==
bool operator==(const BitwiseEvent &other) const =default
constants.hpp
src
barretenberg
vm2
simulation
events
bitwise_event.hpp
Generated by
1.9.8