NeoN
A framework for CFD software
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
NeoN::KokkosAllocator Class Reference

#include <kokkos.hpp>

Inheritance diagram for NeoN::KokkosAllocator:
NeoN::AllocatorStrategy

Public Types

using GPUMemSpace = Kokkos::DefaultExecutionSpace::memory_space
 
using CPUMemSpace = Kokkos::HostSpace
 

Public Member Functions

void * alloc (size_t size) override
 allocate a block of size bytes
 
voidrealloc (void *ptr, size_t size) override
 reallocate a block of size bytes
 
void free (void *ptr) override
 free a block of size bytes
 
 ~KokkosAllocator () override
 
- Public Member Functions inherited from NeoN::AllocatorStrategy
void setMemSpace (MemorySpace memSpace)
 set tag controlling where allocation happens
 
virtual ~AllocatorStrategy ()
 

Additional Inherited Members

- Protected Attributes inherited from NeoN::AllocatorStrategy
MemorySpace memSpace_ = MemorySpace::CPU
 

Detailed Description

Definition at line 18 of file kokkos.hpp.

Member Typedef Documentation

◆ CPUMemSpace

Definition at line 24 of file kokkos.hpp.

◆ GPUMemSpace

using NeoN::KokkosAllocator::GPUMemSpace = Kokkos::DefaultExecutionSpace::memory_space

Definition at line 23 of file kokkos.hpp.

Constructor & Destructor Documentation

◆ ~KokkosAllocator()

NeoN::KokkosAllocator::~KokkosAllocator ( )
inlineoverride

Definition at line 32 of file kokkos.hpp.

Member Function Documentation

◆ alloc()

void * NeoN::KokkosAllocator::alloc ( size_t  size)
overridevirtual

allocate a block of size bytes

Implements NeoN::AllocatorStrategy.

◆ free()

void NeoN::KokkosAllocator::free ( void ptr)
overridevirtual

free a block of size bytes

Implements NeoN::AllocatorStrategy.

◆ realloc()

void * NeoN::KokkosAllocator::realloc ( void ptr,
size_t  size 
)
overridevirtual

reallocate a block of size bytes

Implements NeoN::AllocatorStrategy.


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