tfel
Loading...
Searching...
No Matches
mfront::generic_parallel::GPUBackend Struct Reference

base class of the CUDA and HIP backends: one thread per point. More...

#include </home/runner/work/tfel/tfel/mfront/include/MFront/GenericParallel/GPUBackend.hxx>

Inheritance diagram for mfront::generic_parallel::GPUBackend:
mfront::generic_parallel::AbstractBackend mfront::generic_parallel::CUDABackend mfront::generic_parallel::HIPBackend

Public Member Functions

 GPUBackend (const tfel::utilities::DataMap &)
 constructor
void writeSpecificIncludes (std::ostream &) const override
 write the headers required by the backend: the header of its primitive (MFront/GenericParallel/<name>.hxx) and, if the backend has functions specific to the runtime of the interface, their header
std::string getApply () const override
std::string getMemorySpace () const override
 ~GPUBackend () noexcept override
 destructor
Public Member Functions inherited from mfront::generic_parallel::AbstractBackend
virtual std::string getName () const =0
virtual std::string getSourceFileExtension () const =0
void writeSymbols (std::ostream &, std::string_view) const
 write the symbols describing the generated library: name of the backend (<f>_generic_parallel_backend), memory space in which the fields must be located (<f>_generic_parallel_memory_space), identifier of the execution policy (<f>_generic_parallel_execution_policy), and version of the data structures exchanged with the generated functions (<f>_generic_parallel_api_version, see MFRONT_GPMP_API_VERSION)
virtual std::string getExecutionPolicyType () const =0
virtual void writeCall (std::ostream &, std::string_view, std::string_view, std::string_view) const
 write the statement returning the result of a function of the runtime of the interface, for instance evaluateBatch of MFront/GenericParallelMaterialProperty/Evaluate.hxx. The primitive of the backend is appended to the given arguments.
virtual ~AbstractBackend () noexcept
 destructor

Protected Attributes

int number_of_threads_per_block = 128
 number of threads per block

Detailed Description

base class of the CUDA and HIP backends: one thread per point.

Options:

Constructor & Destructor Documentation

◆ GPUBackend()

mfront::generic_parallel::GPUBackend::GPUBackend ( const tfel::utilities::DataMap & )

constructor

Parameters
[in]optsoptions

Member Function Documentation

◆ getApply()

std::string mfront::generic_parallel::GPUBackend::getApply ( ) const
nodiscardoverridevirtual
Returns
an expression building the primitive of the backend (see the makeApply functions of the MFront/GenericParallel headers)

Implements mfront::generic_parallel::AbstractBackend.

◆ getMemorySpace()

std::string mfront::generic_parallel::GPUBackend::getMemorySpace ( ) const
nodiscardoverridevirtual
Returns
an expression, evaluated when the generated library is compiled, giving the memory space in which the fields must be located (see MFront/GenericParallel/MemorySpace.hxx): host, device or any

Implements mfront::generic_parallel::AbstractBackend.

◆ writeSpecificIncludes()

void mfront::generic_parallel::GPUBackend::writeSpecificIncludes ( std::ostream & ) const
overridevirtual

write the headers required by the backend: the header of its primitive (MFront/GenericParallel/<name>.hxx) and, if the backend has functions specific to the runtime of the interface, their header

Parameters
[out]osoutput stream

Implements mfront::generic_parallel::AbstractBackend.

Reimplemented in mfront::generic_parallel::HIPBackend.


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