tfel
Loading...
Searching...
No Matches
mfront::generic_parallel::AbstractBackendExecutionPolicy Struct Referenceabstract

base class of the execution policies of the backends of the generic-parallel interfaces. More...

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

Inheritance diagram for mfront::generic_parallel::AbstractBackendExecutionPolicy:
OtherBackendExecutionPolicy mfront::generic_parallel::BackendExecutionPolicyBase mfront::generic_parallel::CUDABackendExecutionPolicy mfront::generic_parallel::HIPBackendExecutionPolicy mfront::generic_parallel::ParallelSTLBackendExecutionPolicy mfront::generic_parallel::SyclBackendExecutionPolicy

Public Member Functions

virtual const char * getIdentifier () const noexcept=0
virtual ~AbstractBackendExecutionPolicy ()
 destructor

Protected Member Functions

 AbstractBackendExecutionPolicy () noexcept=default
 default constructor
 AbstractBackendExecutionPolicy (const AbstractBackendExecutionPolicy &) noexcept=default
 copy constructor
 AbstractBackendExecutionPolicy (AbstractBackendExecutionPolicy &&) noexcept=default
 move constructor
AbstractBackendExecutionPolicy & operator= (const AbstractBackendExecutionPolicy &) noexcept=default
 copy assignment
AbstractBackendExecutionPolicy & operator= (AbstractBackendExecutionPolicy &&) noexcept=default
 move assignment

Detailed Description

base class of the execution policies of the backends of the generic-parallel interfaces.

A generated function compares the identifier of the policy it receives with the one of its backend, then converts the policy by static_cast (see getBackendExecutionPolicy). A policy whose identifier is not the one of the backend is refused (invalid arguments).

This class is defined by the MFrontGenericParallelRuntime library, which must be linked by the codes creating policies. The generated libraries do not need it.

Note
getIdentifier is declared before the destructor, so that it is the first entry of the table of virtual functions with all the C++ ABIs (a virtual destructor has one entry with the ABI of Visual Studio and two with the Itanium ABI): a policy created by a code compiled by Visual Studio can be checked by a library compiled by MinGW, and the reverse. Published policies are never modified: a new need of a backend is satisfied by a new policy.

Member Function Documentation

◆ getIdentifier()

virtual const char * mfront::generic_parallel::AbstractBackendExecutionPolicy::getIdentifier ( ) const
pure virtualnoexcept

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