NeoN
A framework for CFD software
Loading...
Searching...
No Matches
NeoN::GPUExecutor Class Reference

Executor for GPU offloading. More...

#include <GPUExecutor.hpp>

Inheritance diagram for NeoN::GPUExecutor:
NeoN::Logging::SupportsLoggingMixin

Public Types

using exec = Kokkos::DefaultExecutionSpace

Public Member Functions

 GPUExecutor ()
 GPUExecutor (std::unique_ptr< AllocatorStrategy > strategy)
 ~GPUExecutor ()
template<typename T>
T * alloc (sizeType elements) const
template<typename T>
T * realloc (void *ptr, sizeType elements) const
void free (void *ptr) const noexcept
MemorySpace memorySpace () const noexcept
template<typename ValueType>
decltype(auto) createKokkosView (ValueType *ptr, sizeType size) const
 create a Kokkos view for a given ptr
std::string name () const
exec underlyingExec () const
Public Member Functions inherited from NeoN::Logging::SupportsLoggingMixin
void setLogger (const std::shared_ptr< BaseLogger > logger)
std::shared_ptr< const BaseLogger > getLogger () const

Detailed Description

Executor for GPU offloading.

Definition at line 22 of file GPUExecutor.hpp.

Member Typedef Documentation

◆ exec

using NeoN::GPUExecutor::exec = Kokkos::DefaultExecutionSpace

Definition at line 29 of file GPUExecutor.hpp.

Constructor & Destructor Documentation

◆ GPUExecutor() [1/2]

NeoN::GPUExecutor::GPUExecutor ( )

◆ GPUExecutor() [2/2]

NeoN::GPUExecutor::GPUExecutor ( std::unique_ptr< AllocatorStrategy > strategy)

◆ ~GPUExecutor()

NeoN::GPUExecutor::~GPUExecutor ( )

Member Function Documentation

◆ alloc()

template<typename T>
T * NeoN::GPUExecutor::alloc ( sizeType elements) const
inline

Definition at line 39 of file GPUExecutor.hpp.

◆ createKokkosView()

template<typename ValueType>
decltype(auto) NeoN::GPUExecutor::createKokkosView ( ValueType * ptr,
sizeType size ) const
inline

create a Kokkos view for a given ptr

Based on the executor this function creates a Kokkos view into the data managed by ptr

Parameters
ptrPointer to data for which a view should be created
sizeNumber of elements this view contains
Template Parameters
ValueTypeThe value type the underlying memory holds

Definition at line 77 of file GPUExecutor.hpp.

◆ free()

void NeoN::GPUExecutor::free ( void * ptr) const
inlinenoexcept

Definition at line 58 of file GPUExecutor.hpp.

◆ memorySpace()

MemorySpace NeoN::GPUExecutor::memorySpace ( ) const
inlinenoexcept

Definition at line 67 of file GPUExecutor.hpp.

◆ name()

std::string NeoN::GPUExecutor::name ( ) const
inline

Definition at line 84 of file GPUExecutor.hpp.

◆ realloc()

template<typename T>
T * NeoN::GPUExecutor::realloc ( void * ptr,
sizeType elements ) const
inline

Definition at line 49 of file GPUExecutor.hpp.

◆ underlyingExec()

exec NeoN::GPUExecutor::underlyingExec ( ) const
inline

Definition at line 86 of file GPUExecutor.hpp.


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