Alien  1.3.0
User documentation
Loading...
Searching...
No Matches

Multi matrices representation container. More...

#include <core/alien/core/impl/MultiMatrixImpl.h>

Public Member Functions

 MultiMatrixImpl ()
 Default constructor.
 MultiMatrixImpl (std::shared_ptr< ISpace > row_space, std::shared_ptr< ISpace > col_space, std::shared_ptr< MatrixDistribution > dist)
 Constructor.
virtual ~MultiMatrixImpl ()
 Free resources.
void setBlockInfos (Arccore::Integer block_size)
 Set uniform block information.
void setBlockInfos (const Block *blocks)
 Set uniform block information.
void setBlockInfos (const VBlock *blocks)
 Set variable block information.
void setRowBlockInfos (const VBlock *blocks)
 Set variable row block information.
void setColBlockInfos (const VBlock *blocks)
 Set variable col block information.
void free ()
 Free resources.
void clear ()
 Clear resources.
const ISpacerowSpace () const
 Get the row space associated to the matrix.
const ISpacecolSpace () const
 Get the col space associated to the matrix.
const MatrixDistributiondistribution () const
 Get the matrix distribution.
const Blockblock () const
 Get uniform block datas.
const VBlockvblock () const
 Get variable block datas.
const VBlockrowBlock () const
 Get variable row block datas.
const VBlockcolBlock () const
 Get variable col block datas.
template<typename tag>
const AlgebraTraits< tag >::matrix_typeget () const
 Get a specific matrix implementation.
template<typename tag>
AlgebraTraits< tag >::matrix_typeget (const bool update_stamp)
 Get a specific matrix implementation.
template<typename tag>
void release () const
 Release a matrix implementation.
MultiMatrixImplclone () const
 Clone this object.
Public Member Functions inherited from Alien::TimestampMng
 TimestampMng (const TimestampMng &tm)
Int64 timestamp () const
 Valeur du timestamp de référence.
void updateTimestamp (Timestamp *ts) const
 Requête de mise à jour d'un Timestamp.
void addObserver (std::shared_ptr< ITimestampObserver > observer)
void clearObservers ()
Public Member Functions inherited from Alien::UserFeatureMng
bool hasFeature (const String &feature) const
void setFeature (const String &feature)
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
Public Member Functions inherited from Alien::ObjectWithLock
void lock ()
 Verrouille l'objet.
void unlock ()
 Dévérouille l'objet.
bool isLocked () const
 Retourne si l'objet est vérouillé

Protected Member Functions

 MultiMatrixImpl (const MultiMatrixImpl &impl)
 Copy constructor.
template<typename matrix_type>
void insert (BackEndId backend, matrix_type *m)
 Insert a matrix implementation in the multi matrix container.
Protected Member Functions inherited from Alien::ObjectWithTrace
TraceMessage cout () const

Detailed Description

Multi matrices representation container.

This class allows to store and access several implementations of the same matrix. It also stores all shared information between those implementations such as distribution, or block information. It provides two accessors, one to access the matrix in read-only mode, that does not increase the timestamp and one in read-write mode, that can increase the timestamp. The former implementation might therefore become the up to date matrix.

While requesting a matrix in a specific format, if the up to date matrix is not in that specific format, the up-to-date matrix will be converted, provided a converter exists.

Definition at line 65 of file MultiMatrixImpl.h.

Constructor & Destructor Documentation

◆ MultiMatrixImpl() [1/3]

Alien::MultiMatrixImpl::MultiMatrixImpl ( )

Default constructor.

Definition at line 42 of file MultiMatrixImpl.cc.

Referenced by clone(), and MultiMatrixImpl().

◆ MultiMatrixImpl() [2/3]

Alien::MultiMatrixImpl::MultiMatrixImpl ( std::shared_ptr< ISpace > row_space,
std::shared_ptr< ISpace > col_space,
std::shared_ptr< MatrixDistribution > dist )

Constructor.

Parameters
[in]row_spaceThe row space of the matrix
[in]col_spaceThe column space of the matrix
[in]distThe distribution of the matrix

Definition at line 51 of file MultiMatrixImpl.cc.

◆ ~MultiMatrixImpl()

Alien::MultiMatrixImpl::~MultiMatrixImpl ( )
virtual

Free resources.

Reimplemented in Alien::CompositeKernel::MultiMatrixImpl.

Definition at line 84 of file MultiMatrixImpl.cc.

References free().

◆ MultiMatrixImpl() [3/3]

Alien::MultiMatrixImpl::MultiMatrixImpl ( const MultiMatrixImpl & impl)
protected

Copy constructor.

Parameters
[in]Internal data structure access.The MultiMatrixImpl to copy

Definition at line 64 of file MultiMatrixImpl.cc.

References MultiMatrixImpl().

Member Function Documentation

◆ block()

const Block * Alien::MultiMatrixImpl::block ( ) const

Get uniform block datas.

Returns
The matrix block data, or a nullptr if the matrix is scalar or has variable blocks

Definition at line 155 of file MultiMatrixImpl.cc.

◆ clear()

void Alien::MultiMatrixImpl::clear ( )

Clear resources.

Definition at line 144 of file MultiMatrixImpl.cc.

Referenced by setBlockInfos().

◆ clone()

MultiMatrixImpl * Alien::MultiMatrixImpl::clone ( ) const

Clone this object.

Returns
A clone of this object

Definition at line 194 of file MultiMatrixImpl.cc.

References get(), MultiMatrixImpl(), Alien::Timestamp::timestamp(), and Alien::Timestamp::updateTimestamp().

◆ colBlock()

const VBlock * Alien::MultiMatrixImpl::colBlock ( ) const

Get variable col block datas.

Returns
The matrix col block data, or a nullptr if the matrix is scalar or has uniform blocks

Definition at line 173 of file MultiMatrixImpl.cc.

References rowBlock().

◆ colSpace()

const ISpace & Alien::MultiMatrixImpl::colSpace ( ) const
inline

Get the col space associated to the matrix.

Returns
The col space

Definition at line 139 of file MultiMatrixImpl.h.

◆ distribution()

const MatrixDistribution & Alien::MultiMatrixImpl::distribution ( ) const
inline

Get the matrix distribution.

Returns
The matrix distribution

Definition at line 145 of file MultiMatrixImpl.h.

Referenced by Alien::LinearSolver< Tag >::solve().

◆ free()

void Alien::MultiMatrixImpl::free ( )

Free resources.

Definition at line 132 of file MultiMatrixImpl.cc.

Referenced by setBlockInfos(), and ~MultiMatrixImpl().

◆ get() [1/2]

◆ get() [2/2]

template<typename tag>
AlgebraTraits< tag >::matrix_type & Alien::MultiMatrixImpl::get ( const bool update_stamp)

Get a specific matrix implementation.

Might induce a conversion, depending on the up to date and requested matrix implementation

Parameters
[in]update_stampWhether or not the timestamp should be increased or not
Returns
The up to date matrix in the requested implementation

Definition at line 281 of file MultiMatrixImpl.h.

References Alien::IMatrixImpl::backend(), and Alien::Timestamp::updateTimestamp().

◆ insert()

template<typename matrix_type>
void Alien::MultiMatrixImpl::insert ( BackEndId backend,
matrix_type * m )
protected

Insert a matrix implementation in the multi matrix container.

Parameters
[in]backendThe implementation backend id
[in]mThe matrix to insert

Definition at line 331 of file MultiMatrixImpl.h.

◆ release()

template<typename tag>
void Alien::MultiMatrixImpl::release ( ) const

Release a matrix implementation.

Definition at line 300 of file MultiMatrixImpl.h.

◆ rowBlock()

const VBlock * Alien::MultiMatrixImpl::rowBlock ( ) const

Get variable row block datas.

Returns
The matrix row block data, or a nullptr if the matrix is scalar or has uniform blocks

Definition at line 164 of file MultiMatrixImpl.cc.

Referenced by colBlock().

◆ rowSpace()

const ISpace & Alien::MultiMatrixImpl::rowSpace ( ) const
inline

Get the row space associated to the matrix.

Returns
The row space

Definition at line 133 of file MultiMatrixImpl.h.

◆ setBlockInfos() [1/3]

void Alien::MultiMatrixImpl::setBlockInfos ( Arccore::Integer block_size)

Set uniform block information.

Parameters
[in]block_sizeThe size of the blocks

References clear(), free(), setBlockInfos(), setColBlockInfos(), and setRowBlockInfos().

Referenced by setBlockInfos().

◆ setBlockInfos() [2/3]

void Alien::MultiMatrixImpl::setBlockInfos ( const Block * blocks)

Set uniform block information.

Parameters
[in]blocksThe block data

Definition at line 100 of file MultiMatrixImpl.cc.

References Alien::Block::clone().

◆ setBlockInfos() [3/3]

void Alien::MultiMatrixImpl::setBlockInfos ( const VBlock * blocks)

Set variable block information.

Parameters
[in]blocksThe block data

Definition at line 108 of file MultiMatrixImpl.cc.

References Alien::VBlock::clone().

◆ setColBlockInfos()

void Alien::MultiMatrixImpl::setColBlockInfos ( const VBlock * blocks)

Set variable col block information.

Parameters
[in]blocksThe col block data

Definition at line 124 of file MultiMatrixImpl.cc.

References Alien::VBlock::clone().

Referenced by setBlockInfos().

◆ setRowBlockInfos()

void Alien::MultiMatrixImpl::setRowBlockInfos ( const VBlock * blocks)

Set variable row block information.

Parameters
[in]blocksThe row block data

Definition at line 116 of file MultiMatrixImpl.cc.

References Alien::VBlock::clone().

Referenced by setBlockInfos().

◆ vblock()

const VBlock * Alien::MultiMatrixImpl::vblock ( ) const

Get variable block datas.

Returns
The matrix block data, or a nullptr if the matrix is scalar or has uniform blocks

Definition at line 185 of file MultiMatrixImpl.cc.


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