|
ONE - On-device Neural Engine
|
Base interface on all supported NN operations. More...
#include <Op.h>

Data Structures | |
| struct | IMutator |
| Op mutator interface. More... | |
| struct | IVisitor |
| Op visitor interface. More... | |
| struct | Mutator |
| struct | Visitor |
Public Member Functions | |
| virtual | ~Op () |
| virtual uint32_t | arity (void) const =0 |
| Return the number of arguments (# of child Ops) | |
| virtual Op * | arg (uint32_t n) const =0 |
| Return N-th argument. | |
| virtual std::set< Object * > | uses (void) const =0 |
| Return a set of object(s) used during execution. | |
| template<typename T > | |
| T | accept (IVisitor< T > *v) const |
| template<typename T > | |
| T | accept (IVisitor< T > &v) const |
| template<typename T > | |
| T | accept (IVisitor< T > &&v) const |
| void | accept (IMutator *m) |
| void | accept (IMutator &m) |
| void | accept (IMutator &&m) |
| Instr * | parent (void) const |
| Op * | up (void) const |
| Return a pointer to the parent Op. | |
Public Member Functions inherited from coco::Entity | |
| virtual | ~Entity ()=default |
| Module * | module (void) const |
Friends | |
| class | Step |
| class | Part |
|
virtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 102 of file Op.h.
Referenced by dump(), OpPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), InstrPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), OpPrinter::visit(), and OpPrinter::visit().
|
pure virtual |
Return N-th argument.
Implemented in coco::UnaryOp, coco::BinaryOp, coco::Load, and coco::Conv2D.
Referenced by caffeimport::BatchNormBuilder::build(), caffeimport::ConvolutionBuilder::build(), caffeimport::PoolingBuilder::build(), and caffeimport::ReLUBuilder::build().
|
pure virtual |
Return the number of arguments (# of child Ops)
Implemented in coco::UnaryOp, coco::BinaryOp, coco::Load, and coco::Conv2D.
| Instr * coco::Op::parent | ( | void | ) | const |
Definition at line 31 of file Op.cpp.
References coco::Step::instr(), parent(), and coco::Part::parent().
Referenced by coco::OpManager::destroy(), coco::OpManager::destroy_all(), coco::Load::loc(), coco::Conv2D::loc(), and parent().
| Op * coco::Op::up | ( | void | ) | const |
Return a pointer to the parent Op.
Definition at line 52 of file Op.cpp.
References coco::Part::parent().
Referenced by coco::OpManager::destroy_all(), and coco::root().
|
pure virtual |
Return a set of object(s) used during execution.
NOTE There is no 'def' method as Op is not allowed to define a new object
Implemented in coco::UnaryOp, coco::BinaryOp, coco::Load, and coco::Conv2D.