SpatialOps
SpatialOps::PoolAutoPtr< T > Class Template Reference

takes ownership over memory allocated from the pool and puts the memory back into the pool when it is destructed. More...

#include <MemoryPool.h>

Public Member Functions

 PoolAutoPtr (T *ptr, short int activeIndex)
 PoolAutoPtr constructor which takes ownership over ptr. More...
 
T * get ()
 return the raw pointer to the memory managed
 
 operator T* ()
 cast this type to pointer of managed memory implicitly
 
T & operator* ()
 return reference to managed memory
 
T * operator-> ()
 allow pointer like interaction
 
 ~PoolAutoPtr ()
 put managed memory back into other pool on destruction
 

Detailed Description

template<typename T>
class SpatialOps::PoolAutoPtr< T >

takes ownership over memory allocated from the pool and puts the memory back into the pool when it is destructed.

Template Parameters
Tthe data type allocated from the pool
Related classes:

Definition at line 121 of file MemoryPool.h.

Constructor & Destructor Documentation

◆ PoolAutoPtr()

template<typename T>
SpatialOps::PoolAutoPtr< T >::PoolAutoPtr ( T *  ptr,
short int  activeIndex 
)
inline

PoolAutoPtr constructor which takes ownership over ptr.

Parameters
ptrpointer returned by a call to Pool<T>::get( activeIndex, size )
activeIndexthe active GPU device index

Definition at line 129 of file MemoryPool.h.


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