ONE - On-device Neural Engine
|
#include <BagManager.h>
Public Member Functions | |
BagManager (Module *m=nullptr) | |
Bag * | create (uint32_t size) |
void | destroy (Bag *b) |
Destroy (= deallocate) a Bag entity. | |
Public Member Functions inherited from coco::PtrManager< Bag > | |
uint32_t | size (void) const |
Return the number of managed objects. | |
Bag * | 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< Bag > | |
U * | take (std::unique_ptr< U > &&o) |
std::unique_ptr< Bag > | release (Bag *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 BagManager.h.
|
inline |
Bag * coco::BagManager::create | ( | uint32_t | size | ) |
Definition at line 24 of file BagManager.cpp.
References coco::EntityBuilder::modulize(), coco::PtrManager< Bag >::size(), and coco::PtrManager< Bag >::take().
void coco::BagManager::destroy | ( | Bag * | b | ) |
Destroy (= deallocate) a Bag entity.
NOTE A Bag SHOULD BE detached from IR before destruction
Definition at line 31 of file BagManager.cpp.
References coco::PtrManager< Bag >::release().