Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bitwise.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <utility>
4
9
10namespace bb::avm2::simulation {
11
16 public:
23
24 MemoryValue and_op(const MemoryValue& a, const MemoryValue& b) override;
25 MemoryValue or_op(const MemoryValue& a, const MemoryValue& b) override;
26 MemoryValue xor_op(const MemoryValue& a, const MemoryValue& b) override;
27
29 const MemoryValue& b1,
30 const MemoryValue& a2,
31 const MemoryValue& b2) override;
33 const MemoryValue& b1,
34 const MemoryValue& a2,
35 const MemoryValue& b2) override;
36
37 private:
39};
40
41} // namespace bb::avm2::simulation
Witness-generating implementation of bitwise AND/OR/XOR operations.
Definition bitwise.hpp:15
std::pair< MemoryValue, MemoryValue > simd_xor_op_64(const MemoryValue &a1, const MemoryValue &b1, const MemoryValue &a2, const MemoryValue &b2) override
Two independent U64 XORs packed into one U128 sub-trace row (SIMD-64). See simd_and_op_64.
Definition bitwise.cpp:137
MemoryValue and_op(const MemoryValue &a, const MemoryValue &b) override
Perform bitwise AND on two tagged memory values.
Definition bitwise.cpp:21
std::pair< MemoryValue, MemoryValue > simd_and_op_64(const MemoryValue &a1, const MemoryValue &b1, const MemoryValue &a2, const MemoryValue &b2) override
Two independent U64 ANDs packed into one U128 sub-trace row (SIMD-64).
Definition bitwise.cpp:116
Bitwise(EventEmitterInterface< BitwiseEvent > &event_emitter)
Definition bitwise.hpp:20
EventEmitterInterface< BitwiseEvent > & events
Definition bitwise.hpp:38
MemoryValue or_op(const MemoryValue &a, const MemoryValue &b) override
Perform bitwise OR on two tagged memory values.
Definition bitwise.cpp:50
MemoryValue xor_op(const MemoryValue &a, const MemoryValue &b) override
Perform bitwise XOR on two tagged memory values.
Definition bitwise.cpp:79
EventEmitter< DataCopyEvent > event_emitter
FF a
FF b
AVM range check gadget for witness generation.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13