Alien  1.3.0
User documentation
Loading...
Searching...
No Matches
Alien::IVectorConverter Class Referenceabstract

Vectors converter. More...

#include <core/alien/core/backend/IVectorConverter.h>

Public Member Functions

virtual ~IVectorConverter ()
 Free resources.
virtual BackEndId sourceBackend () const =0
 Get the source backend id.
virtual BackEndId targetBackend () const =0
 Get the target backend id.
virtual void convert (const IVectorImpl *sourceImpl, IVectorImpl *targetImpl) const =0
 Convert a vector from one format to another.
Public Member Functions inherited from Alien::ObjectWithTrace
template<typename T>
void alien_info (T &&t) const
template<typename T>
void alien_debug (T &&t) const
template<typename T>
void alien_warning (T &&t) const
template<typename T>
void alien_fatal (T &&t) const
ITraceMng * traceMng () const

Protected Member Functions

template<typename T>
BackEndId backendId () const
 Get the target backend id.
Protected Member Functions inherited from Alien::ObjectWithTrace
TraceMessage cout () const

Static Protected Member Functions

template<typename T>
static T & cast (IVectorImpl *impl, BackEndId backend)
 Cast a vector implementation in its actual type.
template<typename T>
static const T & cast (const IVectorImpl *impl, BackEndId backend)
 Const cast a vector implementation in its actual type.

Detailed Description

Vectors converter.

Interface to convert a vector in another format, provided a converter between those two formats has been registered. If there is no direct converter between the source and target format, a third intermediate format will be used if available.

Definition at line 35 of file IVectorConverter.h.

Constructor & Destructor Documentation

◆ ~IVectorConverter()

virtual Alien::IVectorConverter::~IVectorConverter ( )
inlinevirtual

Free resources.

Definition at line 39 of file IVectorConverter.h.

Member Function Documentation

◆ backendId()

template<typename T>
BackEndId Alien::IVectorConverter::backendId ( ) const
inlineprotected

Get the target backend id.

Returns
The target backend id

Definition at line 67 of file IVectorConverter.h.

Referenced by Composite_to_SimpleCSR_VectorConverter::sourceBackend(), and Composite_to_SimpleCSR_VectorConverter::targetBackend().

◆ cast() [1/2]

template<typename T>
const T & Alien::IVectorConverter::cast ( const IVectorImpl * impl,
BackEndId backend )
inlinestaticprotected

Const cast a vector implementation in its actual type.

Parameters
[in]Internal data structure access.Vector implemenantation
[in]backendBackend id
Returns
The actual vector implementation

Definition at line 96 of file IVectorConverter.h.

References Alien::IVectorImpl::backend().

◆ cast() [2/2]

template<typename T>
T & Alien::IVectorConverter::cast ( IVectorImpl * impl,
BackEndId backend )
inlinestaticprotected

◆ convert()

virtual void Alien::IVectorConverter::convert ( const IVectorImpl * sourceImpl,
IVectorImpl * targetImpl ) const
pure virtual

Convert a vector from one format to another.

Parameters
[in]sourceImplImplementation of the source vector
[in,out]targetImplImplementation of the target vector

Implemented in Alien::DoKToSimpleCSRVectorConverter, Alien::RedistributorToSimpleCSRVectorConverter, Alien::SimpleCSRtoDoKVectorConverter, Alien::SimpleCSRtoRedistributorVectorConverter, Composite_to_SimpleCSR_VectorConverter, HCSRtoSYCLVectorConverter, SimpleCSRtoSYCLVectorConverter, and SYCLtoSimpleCSRVectorConverter.

◆ sourceBackend()

◆ targetBackend()


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