ONE - On-device Neural Engine
Loading...
Searching...
No Matches
loco::Graph::SimpleFactoryObjectPool< T > Struct Template Reference

Object Pool with Simple Factory Method. More...

#include <Graph.h>

Collaboration diagram for loco::Graph::SimpleFactoryObjectPool< T >:

Public Member Functions

virtual ~SimpleFactoryObjectPool ()=default
 
T * create (void)
 
- Public Member Functions inherited from loco::ObjectPool< T >
virtual ~ObjectPool ()=default
 
uint32_t size (void) const
 Return the number of objects.
 
T * at (uint32_t n) const
 Access N-th object.
 

Additional Inherited Members

- Protected Member Functions inherited from loco::ObjectPool< T >
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.
 

Detailed Description

template<typename T>
struct loco::Graph::SimpleFactoryObjectPool< T >

Object Pool with Simple Factory Method.

TODO Remove this unused class

Definition at line 177 of file Graph.h.

Constructor & Destructor Documentation

◆ ~SimpleFactoryObjectPool()

template<typename T >
virtual loco::Graph::SimpleFactoryObjectPool< T >::~SimpleFactoryObjectPool ( )
virtualdefault

Member Function Documentation

◆ create()

template<typename T >
T * loco::Graph::SimpleFactoryObjectPool< T >::create ( void  )
inline

Definition at line 181 of file Graph.h.

182 {
183 std::unique_ptr<T> ptr{new T};
184 return ObjectPool<T>::take(std::move(ptr));
185 }
U * take(std::unique_ptr< U > &&o)
Take the ownership of a given object and returns its raw pointer.
Definition ObjectPool.h:45

References loco::ObjectPool< T >::take().


The documentation for this struct was generated from the following file: