ONE - On-device Neural Engine
|
#include <BlockManager.h>
Public Member Functions | |
BlockManager (Module *m=nullptr) | |
Block * | create (void) |
void | destroy (Block *) |
Free 'Block' object. | |
Public Member Functions inherited from coco::PtrManager< Block > | |
uint32_t | size (void) const |
Return the number of managed objects. | |
Block * | 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< Block > | |
U * | take (std::unique_ptr< U > &&o) |
std::unique_ptr< Block > | release (Block *ptr) |
Protected Member Functions inherited from coco::EntityBuilder | |
Module * | module (void) const |
void | module (Module *m) |
void | modulize (Entity *entity) const |
Definition at line 28 of file BlockManager.h.
|
inline |
Block * coco::BlockManager::create | ( | void | ) |
Definition at line 25 of file BlockManager.cpp.
References coco::EntityBuilder::modulize(), and coco::PtrManager< Block >::take().
void coco::BlockManager::destroy | ( | Block * | blk | ) |
Free 'Block' object.
NOTE Block SHOULD be detached from any list before it is destructed
Definition at line 32 of file BlockManager.cpp.
References coco::DLinkedList< Child, Parent >::Node::next(), coco::DLinkedList< Child, Parent >::Node::parent(), coco::DLinkedList< Child, Parent >::Node::prev(), and coco::PtrManager< Block >::release().