tfel
Loading...
Searching...
No Matches
mfront::generic_parallel::SYCLBackend Struct Referencefinal

backend based on SYCL. The points are treated on the device associated with the queue given by the batch data. More...

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

Inheritance diagram for mfront::generic_parallel::SYCLBackend:
mfront::generic_parallel::AbstractBackend

Public Member Functions

 SYCLBackend (const tfel::utilities::DataMap &)
 constructor
std::string getName () const override
std::string getSourceFileExtension () const override
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
std::string getExecutionPolicyType () const override
void writeCall (std::ostream &, std::string_view, std::string_view, std::string_view) const override
 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.
 ~SYCLBackend () noexcept override
 destructor
Public Member Functions inherited from mfront::generic_parallel::AbstractBackend
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 ~AbstractBackend () noexcept
 destructor

Detailed Description

backend based on SYCL. The points are treated on the device associated with the queue given by the batch data.

Options:

  • data_transfer_policy: automatic (or auto, default), the fields which are not accessible by the device are copied in device memory and the outputs are copied back, or none, all the fields are assumed to be accessible by the device.
  • device_stack_size: minimal stack size, in bytes, of the threads of the device when the computations are performed on an NVIDIA GPU through the CUDA runtime (AdaptiveCpp).

Constructor & Destructor Documentation

◆ SYCLBackend()

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

constructor

Parameters
[in]optsoptions

Member Function Documentation

◆ getApply()

std::string mfront::generic_parallel::SYCLBackend::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.

◆ getExecutionPolicyType()

std::string mfront::generic_parallel::SYCLBackend::getExecutionPolicyType ( ) const
nodiscardoverridevirtual
Returns
the type of the execution policy of the backend (see MFront/GenericParallel/AbstractBackendExecutionPolicy.hxx), checked by the generated functions. Its header is included by the header of the primitive of the backend (see writeSpecificIncludes).

Implements mfront::generic_parallel::AbstractBackend.

◆ getMemorySpace()

std::string mfront::generic_parallel::SYCLBackend::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.

◆ getName()

std::string mfront::generic_parallel::SYCLBackend::getName ( ) const
nodiscardoverridevirtual
Returns
the name of the backend, which is used as a suffix for the names of the generated library and files

Implements mfront::generic_parallel::AbstractBackend.

◆ getSourceFileExtension()

std::string mfront::generic_parallel::SYCLBackend::getSourceFileExtension ( ) const
nodiscardoverridevirtual
Returns
the extension of the generated source file

Implements mfront::generic_parallel::AbstractBackend.

◆ writeCall()

void mfront::generic_parallel::SYCLBackend::writeCall ( std::ostream & ,
std::string_view ,
std::string_view ,
std::string_view  ) const
overridevirtual

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.

Parameters
[out]osoutput stream
[in]fname of the function
[in]statusname of the output status, which is the first argument
[in]argumentsother arguments

Reimplemented from mfront::generic_parallel::AbstractBackend.

◆ writeSpecificIncludes()

void mfront::generic_parallel::SYCLBackend::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.


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