NeoFOAM
WIP Prototype of a modern OpenFOAM core
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
NeoFOAM::CPUExecutor Class Reference

Executor for handling multicore CPU based parallelization. More...

#include <CPUExecutor.hpp>

Public Types

using exec = Kokkos::DefaultHostExecutionSpace
 

Public Member Functions

 CPUExecutor ()
 
 ~CPUExecutor ()
 
template<typename T >
T * alloc (size_t size) const
 
template<typename T >
T * realloc (void *ptr, size_t newSize) const
 
void * alloc (size_t size) const
 
void * 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 free (void *ptr) const noexcept
 
std::string name () const
 

Detailed Description

Executor for handling multicore CPU based parallelization.

Definition at line 17 of file CPUExecutor.hpp.

Member Typedef Documentation

◆ exec

using NeoFOAM::CPUExecutor::exec = Kokkos::DefaultHostExecutionSpace

Definition at line 21 of file CPUExecutor.hpp.

Constructor & Destructor Documentation

◆ CPUExecutor()

NeoFOAM::CPUExecutor::CPUExecutor ( )

◆ ~CPUExecutor()

NeoFOAM::CPUExecutor::~CPUExecutor ( )

Member Function Documentation

◆ alloc() [1/2]

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

Definition at line 27 of file CPUExecutor.hpp.

◆ alloc() [2/2]

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

Definition at line 38 of file CPUExecutor.hpp.

◆ createKokkosView()

template<typename ValueType >
decltype(auto) NeoFOAM::CPUExecutor::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 53 of file CPUExecutor.hpp.

◆ free()

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

Definition at line 58 of file CPUExecutor.hpp.

◆ name()

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

Definition at line 60 of file CPUExecutor.hpp.

◆ realloc() [1/2]

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

Definition at line 33 of file CPUExecutor.hpp.

◆ realloc() [2/2]

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

Definition at line 40 of file CPUExecutor.hpp.


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