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 ISpace & | rowSpace () const |
| Get the row space associated to the matrix. | |
| const ISpace & | colSpace () const |
| Get the col space associated to the matrix. | |
| const MatrixDistribution & | distribution () const |
| Get the matrix distribution. | |
| const Block * | block () const |
| Get uniform block datas. | |
| const VBlock * | vblock () const |
| Get variable block datas. | |
| const VBlock * | rowBlock () const |
| Get variable row block datas. | |
| const VBlock * | colBlock () const |
| Get variable col block datas. | |
| template<typename tag> | |
| const AlgebraTraits< tag >::matrix_type & | get () const |
| Get a specific matrix implementation. | |
| template<typename tag> | |
| AlgebraTraits< tag >::matrix_type & | get (const bool update_stamp) |
| Get a specific matrix implementation. | |
| template<typename tag> | |
| void | release () const |
| Release a matrix implementation. | |
| MultiMatrixImpl * | clone () 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 |
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.
| Alien::MultiMatrixImpl::MultiMatrixImpl | ( | ) |
Default constructor.
Definition at line 42 of file MultiMatrixImpl.cc.
Referenced by clone(), and MultiMatrixImpl().
| Alien::MultiMatrixImpl::MultiMatrixImpl | ( | std::shared_ptr< ISpace > | row_space, |
| std::shared_ptr< ISpace > | col_space, | ||
| std::shared_ptr< MatrixDistribution > | dist ) |
Constructor.
| [in] | row_space | The row space of the matrix |
| [in] | col_space | The column space of the matrix |
| [in] | dist | The distribution of the matrix |
Definition at line 51 of file MultiMatrixImpl.cc.
|
virtual |
Free resources.
Reimplemented in Alien::CompositeKernel::MultiMatrixImpl.
Definition at line 84 of file MultiMatrixImpl.cc.
References free().
|
protected |
Copy constructor.
| [in] | Internal data structure access. | The MultiMatrixImpl to copy |
Definition at line 64 of file MultiMatrixImpl.cc.
References MultiMatrixImpl().
| const Block * Alien::MultiMatrixImpl::block | ( | ) | const |
Get uniform block datas.
Definition at line 155 of file MultiMatrixImpl.cc.
| void Alien::MultiMatrixImpl::clear | ( | ) |
| MultiMatrixImpl * Alien::MultiMatrixImpl::clone | ( | ) | const |
Clone this object.
Definition at line 194 of file MultiMatrixImpl.cc.
References get(), MultiMatrixImpl(), Alien::Timestamp::timestamp(), and Alien::Timestamp::updateTimestamp().
| const VBlock * Alien::MultiMatrixImpl::colBlock | ( | ) | const |
Get variable col block datas.
Definition at line 173 of file MultiMatrixImpl.cc.
References rowBlock().
|
inline |
Get the col space associated to the matrix.
Definition at line 139 of file MultiMatrixImpl.h.
|
inline |
Get the matrix distribution.
Definition at line 145 of file MultiMatrixImpl.h.
Referenced by Alien::LinearSolver< Tag >::solve().
| void Alien::MultiMatrixImpl::free | ( | ) |
Free resources.
Definition at line 132 of file MultiMatrixImpl.cc.
Referenced by setBlockInfos(), and ~MultiMatrixImpl().
| const AlgebraTraits< tag >::matrix_type & Alien::MultiMatrixImpl::get | ( | ) | const |
Get a specific matrix implementation.
Might induce a conversion, depending on the up to date and requested matrix implementation
Definition at line 263 of file MultiMatrixImpl.h.
References Alien::IMatrixImpl::backend().
Referenced by Alien::LinearAlgebraExpr< Tag, TagV >::add(), clone(), Alien::SchurOp::computePrimarySystem(), Alien::LinearAlgebraExpr< Tag, TagV >::copy(), Alien::LinearAlgebra< Tag, TagV >::diagonal(), Alien::LinearAlgebraExpr< Tag, TagV >::diagonal(), Alien::LinearAlgebra< Tag, TagV >::dump(), Alien::LinearAlgebraExpr< Tag, TagV >::dump(), Alien::CompositeMatrix::impl(), Alien::CompositeMatrix::impl(), Alien::Move::MatrixData::impl(), Alien::Move::MatrixData::impl(), Alien::LinearAlgebra< Tag, TagV >::mult(), Alien::LinearAlgebraExpr< Tag, TagV >::mult(), Alien::LinearAlgebraExpr< Tag, TagV >::mult(), Alien::LinearAlgebraExpr< Tag, TagV >::norm2(), Alien::NormalizeOpt::normalize(), Alien::NormalizeOpt::normalize(), Alien::Redistributor::redistribute(), Alien::LinearAlgebraExpr< Tag, TagV >::scal(), and Alien::LinearSolver< Tag >::solve().
| 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
| [in] | update_stamp | Whether or not the timestamp should be increased or not |
Definition at line 281 of file MultiMatrixImpl.h.
References Alien::IMatrixImpl::backend(), and Alien::Timestamp::updateTimestamp().
|
protected |
Insert a matrix implementation in the multi matrix container.
| [in] | backend | The implementation backend id |
| [in] | m | The matrix to insert |
Definition at line 331 of file MultiMatrixImpl.h.
| void Alien::MultiMatrixImpl::release | ( | ) | const |
Release a matrix implementation.
Definition at line 300 of file MultiMatrixImpl.h.
| const VBlock * Alien::MultiMatrixImpl::rowBlock | ( | ) | const |
Get variable row block datas.
Definition at line 164 of file MultiMatrixImpl.cc.
Referenced by colBlock().
|
inline |
Get the row space associated to the matrix.
Definition at line 133 of file MultiMatrixImpl.h.
| void Alien::MultiMatrixImpl::setBlockInfos | ( | Arccore::Integer | block_size | ) |
Set uniform block information.
| [in] | block_size | The size of the blocks |
References clear(), free(), setBlockInfos(), setColBlockInfos(), and setRowBlockInfos().
Referenced by setBlockInfos().
| void Alien::MultiMatrixImpl::setBlockInfos | ( | const Block * | blocks | ) |
Set uniform block information.
| [in] | blocks | The block data |
Definition at line 100 of file MultiMatrixImpl.cc.
References Alien::Block::clone().
| void Alien::MultiMatrixImpl::setBlockInfos | ( | const VBlock * | blocks | ) |
Set variable block information.
| [in] | blocks | The block data |
Definition at line 108 of file MultiMatrixImpl.cc.
References Alien::VBlock::clone().
| void Alien::MultiMatrixImpl::setColBlockInfos | ( | const VBlock * | blocks | ) |
Set variable col block information.
| [in] | blocks | The col block data |
Definition at line 124 of file MultiMatrixImpl.cc.
References Alien::VBlock::clone().
Referenced by setBlockInfos().
| void Alien::MultiMatrixImpl::setRowBlockInfos | ( | const VBlock * | blocks | ) |
Set variable row block information.
| [in] | blocks | The row block data |
Definition at line 116 of file MultiMatrixImpl.cc.
References Alien::VBlock::clone().
Referenced by setBlockInfos().
| const VBlock * Alien::MultiMatrixImpl::vblock | ( | ) | const |
Get variable block datas.
Definition at line 185 of file MultiMatrixImpl.cc.