ergo
mat::AllocatorManager< Treal > Class Template Reference

#include <AllocatorManager.h>

Public Member Functions

void init (size_t noOfRealsPerBuffer_, size_t noOfBuffers_)
Treal * alloc (size_t n)
void free (Treal *ptr)
std::string getStatistics ()
AllocatorManager< float > & instance ()
AllocatorManager< double > & instance ()
AllocatorManager< long double > & instance ()

Static Public Member Functions

static AllocatorManagerinstance ()

Private Member Functions

 AllocatorManager ()
 ~AllocatorManager ()

Private Attributes

std::list< Allocator< Treal > * > list
size_t noOfRealsPerBuffer
size_t noOfBuffers
pthread_mutex_t mutex
size_t peakListSize

Constructor & Destructor Documentation

◆ AllocatorManager()

template<class Treal>
mat::AllocatorManager< Treal >::AllocatorManager ( )
inlineprivate

References mutex, noOfBuffers, noOfRealsPerBuffer, and peakListSize.

Referenced by instance().

◆ ~AllocatorManager()

template<class Treal>
mat::AllocatorManager< Treal >::~AllocatorManager ( )
inlineprivate

References list.

Member Function Documentation

◆ alloc()

template<class Treal>
Treal * mat::AllocatorManager< Treal >::alloc ( size_t n)
inline

◆ free()

template<class Treal>
void mat::AllocatorManager< Treal >::free ( Treal * ptr)
inline

References list, and mutex.

Referenced by mat::freeElements(), and mat::freeElements().

◆ getStatistics()

◆ init()

template<class Treal>
void mat::AllocatorManager< Treal >::init ( size_t noOfRealsPerBuffer_,
size_t noOfBuffers_ )
inline

◆ instance() [1/4]

AllocatorManager< float > & mat::AllocatorManager< float >::instance ( )

References AllocatorManager().

◆ instance() [2/4]

AllocatorManager< double > & mat::AllocatorManager< double >::instance ( )

References AllocatorManager().

◆ instance() [3/4]

AllocatorManager< long double > & mat::AllocatorManager< longdouble >::instance ( )

References AllocatorManager().

◆ instance() [4/4]

Member Data Documentation

◆ list

template<class Treal>
std::list< Allocator<Treal>* > mat::AllocatorManager< Treal >::list
private

◆ mutex

template<class Treal>
pthread_mutex_t mat::AllocatorManager< Treal >::mutex
private

Referenced by alloc(), AllocatorManager(), and free().

◆ noOfBuffers

template<class Treal>
size_t mat::AllocatorManager< Treal >::noOfBuffers
private

◆ noOfRealsPerBuffer

template<class Treal>
size_t mat::AllocatorManager< Treal >::noOfRealsPerBuffer
private

◆ peakListSize

template<class Treal>
size_t mat::AllocatorManager< Treal >::peakListSize
private

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