Aligned Allocation strategy for Fields.
Template parameters:
#include <FieldAllocator.h>
Protected Member Functions | |
T * | allocateMemory (uint_t size0, uint_t size1, uint_t size2, uint_t size3, uint_t &allocSize1, uint_t &allocSize2, uint_t &allocSize3) override |
Same as allocated, without handling of reference counter. More... | |
T * | allocateMemory (uint_t size) override |
Same as allocated, without handling of reference counter. More... | |
void | setInnerGhostLayerSize (uint_t innerGhostLayerSize) override |
void | deallocate (T *&values) override |
Deallocates memory that has been allocated using allocate() More... | |
Private Attributes | |
uint_t | offset_ |
Static Private Attributes | |
static std::map< T *, uint_t > | nrOfElements_ = std::map<T*,uint_t>() |
Nr of elements per allocated pointer has to be stored to call the destructor on each element. More... | |
Additional Inherited Members | |
Public Types inherited from walberla::field::FieldAllocator< T > | |
using | BaseType = typename std::conditional< VectorTrait< T >::F_SIZE!=0, typename VectorTrait< T >::OutputType, T >::type |
Public Member Functions inherited from walberla::field::FieldAllocator< T > | |
virtual | ~FieldAllocator ()=default |
T * | allocate (uint_t size0, uint_t size1, uint_t size2, uint_t size3, uint_t &allocSize1, uint_t &allocSize2, uint_t &allocSize3) |
Allocate memory for a field of given sizes and initializes reference counter with one. More... | |
T * | allocate (uint_t allocSize) |
Allocate memory of the given size. More... | |
void | incrementReferenceCount (T *mem) |
Increments the reference count for the given pointer. More... | |
bool | decrementReferenceCount (T *mem) |
Decrements the reference count for the given pointer. More... | |
uint_t | referenceCount (T *mem) const |
|
inlineoverrideprotectedvirtual |
Same as allocated, without handling of reference counter.
Implements walberla::field::FieldAllocator< T >.
|
inlineoverrideprotectedvirtual |
Same as allocated, without handling of reference counter.
Implements walberla::field::FieldAllocator< T >.
|
inlineoverrideprotectedvirtual |
Deallocates memory that has been allocated using allocate()
values | Return value of allocate function() |
Implements walberla::field::FieldAllocator< T >.
|
inlineoverrideprotectedvirtual |
Reimplemented from walberla::field::FieldAllocator< T >.
|
staticprivate |
Nr of elements per allocated pointer has to be stored to call the destructor on each element.
|
private |