NeoN
A framework for CFD software
Loading...
Searching...
No Matches
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 (sizeType size) override
 allocate a block of size bytes
void * realloc (void *ptr, sizeType 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 19 of file kokkos.hpp.

Member Typedef Documentation

◆ CPUMemSpace

using NeoN::KokkosAllocator::CPUMemSpace = Kokkos::HostSpace

Definition at line 25 of file kokkos.hpp.

◆ GPUMemSpace

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

Definition at line 24 of file kokkos.hpp.

Constructor & Destructor Documentation

◆ ~KokkosAllocator()

NeoN::KokkosAllocator::~KokkosAllocator ( )
inlineoverride

Definition at line 33 of file kokkos.hpp.

Member Function Documentation

◆ alloc()

void * NeoN::KokkosAllocator::alloc ( sizeType 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,
sizeType size )
overridevirtual

reallocate a block of size bytes

Implements NeoN::AllocatorStrategy.


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