NeoFOAM
WIP Prototype of a modern OpenFOAM core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Concepts
Public Types | Public Member Functions | List of all members
NeoFOAM::SerialExecutor Class Reference

Reference executor for serial CPU execution. More...

#include <serialExecutor.hpp>

Public Types

using exec = Kokkos::Serial
 

Public Member Functions

 SerialExecutor ()
 
 ~SerialExecutor ()
 
template<typename T >
T * alloc (size_t size) const
 
template<typename T >
T * realloc (void *ptr, size_t newSize) const
 
template<typename ValueType >
decltype(auto) createKokkosView (ValueType *ptr, size_t size) const
 create a Kokkos view for a given ptr
 
void * alloc (size_t size) const
 
void * realloc (void *ptr, size_t newSize) const
 
void free (void *ptr) const noexcept
 
std::string name () const
 

Detailed Description

Reference executor for serial CPU execution.

Definition at line 16 of file serialExecutor.hpp.

Member Typedef Documentation

◆ exec

using NeoFOAM::SerialExecutor::exec = Kokkos::Serial

Definition at line 20 of file serialExecutor.hpp.

Constructor & Destructor Documentation

◆ SerialExecutor()

NeoFOAM::SerialExecutor::SerialExecutor ( )

◆ ~SerialExecutor()

NeoFOAM::SerialExecutor::~SerialExecutor ( )

Member Function Documentation

◆ alloc() [1/2]

template<typename T >
T * NeoFOAM::SerialExecutor::alloc ( size_t  size) const
inline

Definition at line 26 of file serialExecutor.hpp.

◆ alloc() [2/2]

void * NeoFOAM::SerialExecutor::alloc ( size_t  size) const
inline

Definition at line 50 of file serialExecutor.hpp.

◆ createKokkosView()

template<typename ValueType >
decltype(auto) NeoFOAM::SerialExecutor::createKokkosView ( ValueType *  ptr,
size_t  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 45 of file serialExecutor.hpp.

◆ free()

void NeoFOAM::SerialExecutor::free ( void *  ptr) const
inlinenoexcept

Definition at line 57 of file serialExecutor.hpp.

◆ name()

std::string NeoFOAM::SerialExecutor::name ( ) const
inline

Definition at line 59 of file serialExecutor.hpp.

◆ realloc() [1/2]

template<typename T >
T * NeoFOAM::SerialExecutor::realloc ( void *  ptr,
size_t  newSize 
) const
inline

Definition at line 32 of file serialExecutor.hpp.

◆ realloc() [2/2]

void * NeoFOAM::SerialExecutor::realloc ( void *  ptr,
size_t  newSize 
) const
inline

Definition at line 52 of file serialExecutor.hpp.


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