Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation::Alu Class Reference

#include <alu.hpp>

Inheritance diagram for bb::avm2::simulation::Alu:
bb::avm2::simulation::AluInterface

Public Member Functions

 Alu (GreaterThanInterface &greater_than, FieldGreaterThanInterface &field_gt, RangeCheckInterface &range_check, EventEmitterInterface< AluEvent > &event_emitter)
 
MemoryValue add (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue sub (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue mul (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue div (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue fdiv (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue eq (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue lt (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue lte (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue op_not (const MemoryValue &a) override
 
MemoryValue truncate (const FF &a, MemoryTag dst_tag) override
 
MemoryValue shr (const MemoryValue &a, const MemoryValue &b) override
 
MemoryValue shl (const MemoryValue &a, const MemoryValue &b) override
 
- Public Member Functions inherited from bb::avm2::simulation::AluInterface
virtual ~AluInterface ()=default
 

Private Attributes

GreaterThanInterfacegreater_than
 
FieldGreaterThanInterfacefield_gt
 
RangeCheckInterfacerange_check
 
EventEmitterInterface< AluEvent > & events
 

Detailed Description

Definition at line 27 of file alu.hpp.

Constructor & Destructor Documentation

◆ Alu()

bb::avm2::simulation::Alu::Alu ( GreaterThanInterface greater_than,
FieldGreaterThanInterface field_gt,
RangeCheckInterface range_check,
EventEmitterInterface< AluEvent > &  event_emitter 
)
inline

Definition at line 29 of file alu.hpp.

Member Function Documentation

◆ add()

MemoryValue bb::avm2::simulation::Alu::add ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 12 of file alu.cpp.

◆ div()

MemoryValue bb::avm2::simulation::Alu::div ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 64 of file alu.cpp.

◆ eq()

MemoryValue bb::avm2::simulation::Alu::eq ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 124 of file alu.cpp.

◆ fdiv()

MemoryValue bb::avm2::simulation::Alu::fdiv ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 100 of file alu.cpp.

◆ lt()

MemoryValue bb::avm2::simulation::Alu::lt ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 137 of file alu.cpp.

◆ lte()

MemoryValue bb::avm2::simulation::Alu::lte ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 152 of file alu.cpp.

◆ mul()

MemoryValue bb::avm2::simulation::Alu::mul ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 36 of file alu.cpp.

◆ op_not()

MemoryValue bb::avm2::simulation::Alu::op_not ( const MemoryValue a)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 168 of file alu.cpp.

◆ shl()

MemoryValue bb::avm2::simulation::Alu::shl ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 180 of file alu.cpp.

◆ shr()

MemoryValue bb::avm2::simulation::Alu::shr ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 208 of file alu.cpp.

◆ sub()

MemoryValue bb::avm2::simulation::Alu::sub ( const MemoryValue a,
const MemoryValue b 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 24 of file alu.cpp.

◆ truncate()

MemoryValue bb::avm2::simulation::Alu::truncate ( const FF a,
MemoryTag  dst_tag 
)
overridevirtual

Implements bb::avm2::simulation::AluInterface.

Definition at line 236 of file alu.cpp.

Member Data Documentation

◆ events

EventEmitterInterface<AluEvent>& bb::avm2::simulation::Alu::events
private

Definition at line 56 of file alu.hpp.

◆ field_gt

FieldGreaterThanInterface& bb::avm2::simulation::Alu::field_gt
private

Definition at line 54 of file alu.hpp.

◆ greater_than

GreaterThanInterface& bb::avm2::simulation::Alu::greater_than
private

Definition at line 53 of file alu.hpp.

◆ range_check

RangeCheckInterface& bb::avm2::simulation::Alu::range_check
private

Definition at line 55 of file alu.hpp.


The documentation for this class was generated from the following files: