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
17
struct
BitwiseEvent
{
18
BitwiseOperation
operation
;
19
MemoryValue
a
=
MemoryValue::from_tag
(
MemoryTag::FF
, 0);
20
MemoryValue
b
=
MemoryValue::from_tag
(
MemoryTag::FF
, 0);
21
uint128_t
res
= 0;
24
bool
simd_64
=
false
;
25
28
using
Key
=
std::tuple<BitwiseOperation, MemoryValue, MemoryValue, bool>
;
29
Key
get_key
()
const
{
return
{
operation
,
a
,
b
,
simd_64
}; }
30
31
bool
operator==
(
const
BitwiseEvent
& other)
const
=
default
;
32
};
33
34
}
// namespace bb::avm2::simulation
bb::avm2::TaggedValue
Definition
tagged_value.hpp:114
bb::avm2::TaggedValue::from_tag
static TaggedValue from_tag(ValueTag tag, FF value)
Definition
tagged_value.cpp:227
memory_types.hpp
bb::avm2::simulation
AVM range check gadget for witness generation.
Definition
address_derivation_event.hpp:6
bb::avm2::ValueTag::FF
@ FF
bb::avm2::BitwiseOperation
BitwiseOperation
Definition
constants.hpp:29
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
uint128_t
unsigned __int128 uint128_t
Definition
serialize.hpp:45
bb::avm2::simulation::BitwiseEvent
Event emitted during bitwise operation simulation for trace generation.
Definition
bitwise_event.hpp:17
bb::avm2::simulation::BitwiseEvent::a
MemoryValue a
Left operand (tagged memory value).
Definition
bitwise_event.hpp:19
bb::avm2::simulation::BitwiseEvent::b
MemoryValue b
Right operand (tagged memory value).
Definition
bitwise_event.hpp:20
bb::avm2::simulation::BitwiseEvent::simd_64
bool simd_64
Definition
bitwise_event.hpp:24
bb::avm2::simulation::BitwiseEvent::operation
BitwiseOperation operation
The bitwise operation (AND, OR, or XOR).
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:29
bb::avm2::simulation::BitwiseEvent::operator==
bool operator==(const BitwiseEvent &other) const =default
bb::avm2::simulation::BitwiseEvent::Key
std::tuple< BitwiseOperation, MemoryValue, MemoryValue, bool > Key
Key type for deduplication (operation, input_a, input_b, simd_64). simd_64 is part of the key so a SI...
Definition
bitwise_event.hpp:28
constants.hpp
src
barretenberg
vm2
simulation
events
bitwise_event.hpp
Generated by
1.9.8