43#ifndef MAT_ALLOCATOR_HEADER
44#define MAT_ALLOCATOR_HEADER
75 throw std::runtime_error(
"Error in Allocator::alloc(): no free slots.");
85 throw std::runtime_error(
"Error in Allocator::free(): unknown ptr.");
88 throw std::runtime_error(
"Error in Allocator::free(): bad ptr.");
91 throw std::runtime_error(
"Error in Allocator::free(): -1 not found.");
Definition Allocator.h:52
bool ownsPtr(Treal *ptr)
Definition Allocator.h:106
Treal * buffer
Definition Allocator.h:117
int noOfOccupiedSlots
Definition Allocator.h:120
Treal * alloc()
Definition Allocator.h:73
int noOfBuffers
Definition Allocator.h:116
int noOfRealsPerBuffer
Definition Allocator.h:115
void free(Treal *ptr)
Definition Allocator.h:83
~Allocator()
Definition Allocator.h:68
bool isEmpty()
Definition Allocator.h:101
int firstFreeIndex
Definition Allocator.h:119
bool isFull()
Definition Allocator.h:96
Allocator(int noOfRealsPerBuffer_, int noOfBuffers_)
Definition Allocator.h:54
int getNoOfOccupiedSlots()
Definition Allocator.h:111
int * nextFreeIndexList
Definition Allocator.h:118
Definition allocate.cc:39
static Treal getMachineEpsilon()
Definition matInclude.h:147