|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Event emitted during bitwise operation simulation for trace generation. More...
#include <bitwise_event.hpp>
Public Types | |
| using | Key = std::tuple< BitwiseOperation, MemoryValue, MemoryValue, bool > |
| Key type for deduplication (operation, input_a, input_b, simd_64). simd_64 is part of the key so a SIMD row never deduplicates with a differently-shaped scalar row on the same operands. | |
Public Member Functions | |
| Key | get_key () const |
| bool | operator== (const BitwiseEvent &other) const =default |
Public Attributes | |
| BitwiseOperation | operation |
| The bitwise operation (AND, OR, or XOR). | |
| MemoryValue | a = MemoryValue::from_tag(MemoryTag::FF, 0) |
| Left operand (tagged memory value). | |
| MemoryValue | b = MemoryValue::from_tag(MemoryTag::FF, 0) |
| Right operand (tagged memory value). | |
| uint128_t | res = 0 |
| bool | simd_64 = false |
Event emitted during bitwise operation simulation for trace generation.
Captures the inputs, operation type, and result of a bitwise AND/OR/XOR operation. Emitted on both success and error paths (on error, res defaults to 0). Consumed by BitwiseTraceBuilder::process() to populate the bitwise subtrace.
Definition at line 17 of file bitwise_event.hpp.
| using bb::avm2::simulation::BitwiseEvent::Key = std::tuple<BitwiseOperation, MemoryValue, MemoryValue, bool> |
Key type for deduplication (operation, input_a, input_b, simd_64). simd_64 is part of the key so a SIMD row never deduplicates with a differently-shaped scalar row on the same operands.
Definition at line 28 of file bitwise_event.hpp.
|
inline |
Definition at line 29 of file bitwise_event.hpp.
|
default |
| MemoryValue bb::avm2::simulation::BitwiseEvent::a = MemoryValue::from_tag(MemoryTag::FF, 0) |
Left operand (tagged memory value).
Definition at line 19 of file bitwise_event.hpp.
| MemoryValue bb::avm2::simulation::BitwiseEvent::b = MemoryValue::from_tag(MemoryTag::FF, 0) |
Right operand (tagged memory value).
Definition at line 20 of file bitwise_event.hpp.
| BitwiseOperation bb::avm2::simulation::BitwiseEvent::operation |
The bitwise operation (AND, OR, or XOR).
Definition at line 18 of file bitwise_event.hpp.
| uint128_t bb::avm2::simulation::BitwiseEvent::res = 0 |
Result of the operation. Defaults to 0 (used on error paths).
Definition at line 21 of file bitwise_event.hpp.
| bool bb::avm2::simulation::BitwiseEvent::simd_64 = false |
True for a keccak SIMD-64 operation: a and b are U128 values each packing two independent U64 lanes (lane 0 = low 64 bits, lane 1 = high 64 bits) and res packs the two U64 results the same way.
Definition at line 24 of file bitwise_event.hpp.