NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
NeoN::AllocatorStrategy Class Referenceabstract

#include <allocator.hpp>

Inheritance diagram for NeoN::AllocatorStrategy:
NeoN::KokkosAllocator NeoN::UmpireAllocator NeoN::UmpirePoolAllocator

Public Member Functions

void setMemSpace (MemorySpace memSpace)
 set tag controlling where allocation happens
 
virtual void * alloc (size_t size)=0
 allocate a block of size bytes
 
virtual voidrealloc (void *ptr, size_t size)=0
 reallocate a block of size bytes
 
virtual void free (void *ptr)=0
 free a block of size bytes
 
virtual ~AllocatorStrategy ()
 

Protected Attributes

MemorySpace memSpace_ = MemorySpace::CPU
 

Detailed Description

Definition at line 23 of file allocator.hpp.

Constructor & Destructor Documentation

◆ ~AllocatorStrategy()

virtual NeoN::AllocatorStrategy::~AllocatorStrategy ( )
inlinevirtual

Definition at line 45 of file allocator.hpp.

Member Function Documentation

◆ alloc()

virtual void * NeoN::AllocatorStrategy::alloc ( size_t  size)
pure virtual

allocate a block of size bytes

Implemented in NeoN::KokkosAllocator, NeoN::UmpireAllocator, and NeoN::UmpirePoolAllocator.

◆ free()

virtual void NeoN::AllocatorStrategy::free ( void ptr)
pure virtual

free a block of size bytes

Implemented in NeoN::KokkosAllocator, NeoN::UmpireAllocator, and NeoN::UmpirePoolAllocator.

◆ realloc()

virtual void * NeoN::AllocatorStrategy::realloc ( void ptr,
size_t  size 
)
pure virtual

reallocate a block of size bytes

Implemented in NeoN::KokkosAllocator, NeoN::UmpireAllocator, and NeoN::UmpirePoolAllocator.

◆ setMemSpace()

void NeoN::AllocatorStrategy::setMemSpace ( MemorySpace  memSpace)
inline

set tag controlling where allocation happens

Definition at line 34 of file allocator.hpp.

Member Data Documentation

◆ memSpace_

MemorySpace NeoN::AllocatorStrategy::memSpace_ = MemorySpace::CPU
protected

Definition at line 29 of file allocator.hpp.


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