template<typename T, unsigned int HostAllocFlags = gpuHostAllocDefault>
class walberla::gpu::HostFieldAllocator< T, HostAllocFlags >
Allocator that allocates a CPU! field using gpuHostAlloc without padding.
Uses gpuHostAlloc for the allocation - which allocates page-locked memory that is faster to transfer to the GPU This allocator should be used for CPU fields that are often transferred to GPU and back
|
virtual | ~HostFieldAllocator ()=default |
|
virtual T * | allocateMemory (uint_t size0, uint_t size1, uint_t size2, uint_t size3, uint_t &allocSize1, uint_t &allocSize2, uint_t &allocSize3) |
| Same as allocated, without handling of reference counter. More...
|
|
virtual T * | allocateMemory (uint_t size) |
| Same as allocated, without handling of reference counter. More...
|
|
virtual void | deallocate (T *&values) |
| Deallocates memory that has been allocated using allocate() More...
|
|
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...
|
|
virtual void | setInnerGhostLayerSize (uint_t) |
|
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 |
|