|
ONE - On-device Neural Engine
|
#include <InstrManager.h>

Public Member Functions | |
| InstrManager (Module *m=nullptr) | |
| template<typename Ins > | |
| Ins * | create (void) |
| void | destroy (Instr *) |
| Destroy (= deallocate) an Instr instance. | |
Public Member Functions inherited from coco::PtrManager< Instr > | |
| uint32_t | size (void) const |
| Return the number of managed objects. | |
| Instr * | at (uint32_t n) const |
Public Member Functions inherited from coco::EntityBuilder | |
| virtual | ~EntityBuilder ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from coco::PtrManager< Instr > | |
| U * | take (std::unique_ptr< U > &&o) |
| std::unique_ptr< Instr > | release (Instr *ptr) |
Protected Member Functions inherited from coco::EntityBuilder | |
| Module * | module (void) const |
| void | module (Module *m) |
| void | modulize (Entity *entity) const |
Definition at line 36 of file InstrManager.h.
|
inline |
| Ins * coco::InstrManager::create | ( | void | ) |
Definition at line 57 of file InstrManager.h.
References coco::EntityBuilder::modulize(), and coco::PtrManager< Instr >::take().
Referenced by InstrBuilder::copy(), and InstrBuilder::eval().
| void coco::InstrManager::destroy | ( | Instr * | ins | ) |
Destroy (= deallocate) an Instr instance.
NOTE destroy(ins) WILL NOT update ins->parent(). An Instruction SHOULD BE detacted from a module before destroy call
Definition at line 26 of file InstrManager.cpp.
References coco::DLinkedList< Child, Parent >::Node::parent(), and coco::PtrManager< Instr >::release().