ONE - On-device Neural Engine
|
Object Pool. More...
#include <ObjectPool.h>
Public Member Functions | |
virtual | ~ObjectPool ()=default |
uint32_t | size (void) const |
Return the number of objects. | |
T * | at (uint32_t n) const |
Access N-th object. | |
Protected Member Functions | |
template<typename U > | |
U * | take (std::unique_ptr< U > &&o) |
Take the ownership of a given object and returns its raw pointer. | |
bool | erase (T *ptr) |
Erase an object from the pool. | |
Object Pool.
Definition at line 31 of file ObjectPool.h.
|
virtualdefault |
|
inline |
Access N-th object.
Definition at line 41 of file ObjectPool.h.
Referenced by loco::Pull::dtype(), loco::Pull::dtype(), exo::test::find_first_node_bytype(), moco::tf::test::find_first_node_bytype(), moco::test::find_first_node_bytype(), moco::find_node_byname(), moco::tf::test::find_nodes_bytype(), loco::Pull::index(), luci_interpreter::GraphLoader::loadTensors(), and locomotiv::Session::~Session().
|
inlineprotected |
Erase an object from the pool.
erase(p) returns false if p does not belong to this object pool.
Definition at line 57 of file ObjectPool.h.
|
inline |
Return the number of objects.
Definition at line 38 of file ObjectPool.h.
Referenced by exo::test::find_first_node_bytype(), moco::tf::test::find_first_node_bytype(), moco::test::find_first_node_bytype(), moco::find_node_byname(), moco::tf::test::find_nodes_bytype(), locomotiv::Session::input_size(), InputLayer::operator()(), and OutputLayer::operator()().
|
inlineprotected |
Take the ownership of a given object and returns its raw pointer.
Definition at line 45 of file ObjectPool.h.
Referenced by loco::Graph::SimpleFactoryObjectPool< T >::create().