Computes a matrix distribution. More...
#include <core/alien/distribution/MatrixDistribution.h>
Classes | |
| struct | Internal |
| Internal implementation of the matrix distribution. More... | |
Public Member Functions | |
| MatrixDistribution () | |
| Constructor. | |
| MatrixDistribution (const ISpace &row_space, const ISpace &col_space, Arccore::MessagePassing::IMessagePassingMng *parallel_mng) | |
| Constructor. | |
| MatrixDistribution (Arccore::Integer global_row_size, Arccore::Integer global_col_size, Arccore::MessagePassing::IMessagePassingMng *parallel_mng) | |
| Constructor. | |
| MatrixDistribution (Arccore::Integer global_row_size, Arccore::Integer global_col_size, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng) | |
| Constructor. | |
| MatrixDistribution (const ISpace &row_space, const ISpace &col_space, Integer local_row_size, IMessagePassingMng *parallel_mng) | |
| Constructor. | |
| MatrixDistribution (const ISpace &row_space, const ISpace &col_space, Integer local_row_size, Integer local_col_size, IMessagePassingMng *parallel_mng) | |
| Constructor. | |
| MatrixDistribution (Arccore::Integer global_row_size, Arccore::Integer global_col_size, Arccore::Integer local_row_size, Arccore::MessagePassing::IMessagePassingMng *parallel_mng) | |
| Constructor. | |
| MatrixDistribution (Arccore::Integer global_row_size, Arccore::Integer global_col_size, Arccore::Integer local_row_size, Arccore::Integer local_col_size, Arccore::MessagePassing::IMessagePassingMng *parallel_mng) | |
| Constructor. | |
| MatrixDistribution (Arccore::Integer global_row_size, Arccore::Integer global_col_size, Arccore::Integer local_row_size, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng) | |
| Constructor. | |
| MatrixDistribution (Arccore::Integer global_row_size, Arccore::Integer global_col_size, Arccore::Integer local_row_size, Arccore::Integer local_col_size, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng) | |
| Constructor. | |
| MatrixDistribution (const MatrixDistribution &dist) | |
| Copy constructor. | |
| MatrixDistribution (MatrixDistribution &&dist) | |
| Rvalue constructor. | |
| ~MatrixDistribution () | |
| Free resources. | |
| MatrixDistribution & | operator= (const MatrixDistribution &dist) |
| Operator equal. | |
| MatrixDistribution & | operator= (MatrixDistribution &&dist) |
| Operator equal. | |
| bool | operator== (const MatrixDistribution &dist) const |
| Comparison operator. | |
| bool | isParallel () const |
| Whether or not the run is parallel. | |
| Arccore::MessagePassing::IMessagePassingMng * | parallelMng () const |
| Get the parallel manager. | |
| const VectorDistribution & | rowDistribution () const |
| Get the row distribution. | |
| const VectorDistribution & | colDistribution () const |
| Get the col distribution. | |
| const ISpace & | rowSpace () const |
| Get the row space. | |
| const ISpace & | colSpace () const |
| Get the col space. | |
| Arccore::Integer | localRowSize () const |
| Get the local row size. | |
| Arccore::Integer | localColSize () const |
| Get the local col size. | |
| Arccore::Integer | globalRowSize () const |
| Get the global row size. | |
| Arccore::Integer | globalColSize () const |
| Get the global col size. | |
| Arccore::Integer | rowOffset () const |
| Get the row offset. | |
| Arccore::Integer | rowOffset (Arccore::Integer p) const |
| Get the row offset for a specific proc. | |
| Arccore::Integer | colOffset () const |
| Get the col offset. | |
| Arccore::Integer | colOffset (Arccore::Integer p) const |
| Get the col offset for a specific proc. | |
| std::shared_ptr< MatrixDistribution > | clone () const |
| Clone the distribution. | |
Private Member Functions | |
| Arccore::Integer | rowGlobalToLocal (Arccore::Integer i) const |
| Get the local id of a row with its global id. | |
| Arccore::Integer | rowGlobalToLocal (Arccore::Integer i, Arccore::Integer p) const |
| Get the local id of a non local row with its global id. | |
| Arccore::Integer | colGlobalToLocal (Arccore::Integer i) const |
| Get the local id of a col with its global id. | |
| Arccore::Integer | colGlobalToLocal (Arccore::Integer i, Arccore::Integer p) const |
| Get the local id of a non local col with its global id. | |
| Arccore::Integer | rowLocalToGlobal (Arccore::Integer i) const |
| Get the global id of a row with its local id. | |
| Arccore::Integer | rowLocalToGlobal (Arccore::Integer i, Arccore::Integer p) const |
| Get the global id of a non local row with its local id. | |
| Arccore::Integer | colLocalToGlobal (Arccore::Integer i) const |
| Get the global id of a col with its local id. | |
| Arccore::Integer | colLocalToGlobal (Arccore::Integer i, Arccore::Integer p) const |
| Get the global id of a non local col with its local id. | |
| Arccore::Integer | owner (Arccore::Integer i, Arccore::Integer j) const |
| Get the owner of an entry. | |
Private Attributes | |
| std::shared_ptr< Internal > | m_internal |
| Internal implementation of the matrix distribution. | |
Computes a matrix distribution.
Computes or use a pre-existing block row distribution for matrices
Definition at line 40 of file MatrixDistribution.h.
| Alien::MatrixDistribution::MatrixDistribution | ( | ) |
Constructor.
Definition at line 313 of file MatrixDistribution.cc.
References m_internal.
Referenced by MatrixDistribution(), MatrixDistribution(), MatrixDistribution(), operator=(), operator=(), and operator==().
| Alien::MatrixDistribution::MatrixDistribution | ( | const ISpace & | row_space, |
| const ISpace & | col_space, | ||
| Arccore::MessagePassing::IMessagePassingMng * | parallel_mng ) |
Constructor.
| [in] | row_space | The row space of the matrix |
| [in] | col_space | The col space of the matrix |
| [in] | parallel_mng | The parallel manager |
| Alien::MatrixDistribution::MatrixDistribution | ( | Arccore::Integer | global_row_size, |
| Arccore::Integer | global_col_size, | ||
| Arccore::MessagePassing::IMessagePassingMng * | parallel_mng ) |
Constructor.
| [in] | global_row_size | The number of rows in the matrix |
| [in] | global_col_size | The number of cols in the matrix |
| [in] | parallel_mng | The parallel manager |
| Alien::MatrixDistribution::MatrixDistribution | ( | Arccore::Integer | global_row_size, |
| Arccore::Integer | global_col_size, | ||
| std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > | parallel_mng ) |
Constructor.
| [in] | global_row_size | The number of rows in the matrix |
| [in] | global_col_size | The number of cols in the matrix |
| [in] | parallel_mng | The parallel manager |
References MatrixDistribution().
| Alien::MatrixDistribution::MatrixDistribution | ( | const ISpace & | row_space, |
| const ISpace & | col_space, | ||
| Integer | local_row_size, | ||
| IMessagePassingMng * | parallel_mng ) |
Constructor.
| [in] | row_space | The row space of the matrix |
| [in] | col_space | The col space of the matrix |
| [in] | local_row_size | The number of local rows in the matrix |
| [in] | parallel_mng | The parallel manager |
Definition at line 361 of file MatrixDistribution.cc.
References m_internal, and Alien::ISpace::size().
| Alien::MatrixDistribution::MatrixDistribution | ( | const ISpace & | row_space, |
| const ISpace & | col_space, | ||
| Integer | local_row_size, | ||
| Integer | local_col_size, | ||
| IMessagePassingMng * | parallel_mng ) |
Constructor.
| [in] | row_space | The row space of the matrix |
| [in] | col_space | The col space of the matrix |
| [in] | local_row_size | The number of local rows in the matrix |
| [in] | local_col_size | The number of local cols in the matrix |
| [in] | parallel_mng | The parallel manager |
Definition at line 376 of file MatrixDistribution.cc.
References m_internal, and Alien::ISpace::size().
| Alien::MatrixDistribution::MatrixDistribution | ( | Arccore::Integer | global_row_size, |
| Arccore::Integer | global_col_size, | ||
| Arccore::Integer | local_row_size, | ||
| Arccore::MessagePassing::IMessagePassingMng * | parallel_mng ) |
Constructor.
| [in] | global_row_size | The number of rows in the matrix |
| [in] | global_col_size | The number of cols in the matrix |
| [in] | local_row_size | The number of local cols in the matrix |
| [in] | parallel_mng | The parallel manager |
| Alien::MatrixDistribution::MatrixDistribution | ( | Arccore::Integer | global_row_size, |
| Arccore::Integer | global_col_size, | ||
| Arccore::Integer | local_row_size, | ||
| Arccore::Integer | local_col_size, | ||
| Arccore::MessagePassing::IMessagePassingMng * | parallel_mng ) |
Constructor.
| [in] | global_row_size | The number of rows in the matrix |
| [in] | global_col_size | The number of cols in the matrix |
| [in] | local_row_size | The number of local cols in the matrix |
| [in] | local_col_size | The number of local cols in the matrix |
| [in] | parallel_mng | The parallel manager |
| Alien::MatrixDistribution::MatrixDistribution | ( | Arccore::Integer | global_row_size, |
| Arccore::Integer | global_col_size, | ||
| Arccore::Integer | local_row_size, | ||
| std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > | parallel_mng ) |
Constructor.
| [in] | global_row_size | The number of rows in the matrix |
| [in] | global_col_size | The number of cols in the matrix |
| [in] | local_row_size | The number of local cols in the matrix |
| [in] | parallel_mng | The parallel manager |
| Alien::MatrixDistribution::MatrixDistribution | ( | Arccore::Integer | global_row_size, |
| Arccore::Integer | global_col_size, | ||
| Arccore::Integer | local_row_size, | ||
| Arccore::Integer | local_col_size, | ||
| std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > | parallel_mng ) |
Constructor.
| [in] | global_row_size | The number of rows in the matrix |
| [in] | global_col_size | The number of cols in the matrix |
| [in] | local_row_size | The number of local cols in the matrix |
| [in] | local_col_size | The number of local cols in the matrix |
| [in] | parallel_mng | The parallel manager |
|
default |
Copy constructor.
| [in] | dist | The matrix distribution to copy |
References MatrixDistribution().
|
default |
Rvalue constructor.
| [in] | dist | The distribution to take |
References MatrixDistribution().
| std::shared_ptr< MatrixDistribution > Alien::MatrixDistribution::clone | ( | ) | const |
Clone the distribution.
Definition at line 624 of file MatrixDistribution.cc.
Referenced by colOffset(), and Alien::Move::MatrixData::init().
| const VectorDistribution & Alien::MatrixDistribution::colDistribution | ( | ) | const |
Get the col distribution.
Definition at line 484 of file MatrixDistribution.cc.
References m_internal.
Referenced by colSpace(), and operator=().
|
private |
Get the local id of a col with its global id.
| [in] | i | The global id of the col |
|
private |
Get the local id of a non local col with its global id.
| [in] | i | The global id of the non local col |
| [in] | p | The proc which owns the col |
|
private |
Get the global id of a col with its local id.
| [in] | i | The local id of the col |
|
private |
Get the global id of a non local col with its local id.
| [in] | i | The local id of the non local col |
| [in] | p | The proc which owns the col |
References owner().
| Integer Alien::MatrixDistribution::colOffset | ( | ) | const |
Get the col offset.
Definition at line 600 of file MatrixDistribution.cc.
References m_internal.
Referenced by rowOffset().
| Arccore::Integer Alien::MatrixDistribution::colOffset | ( | Arccore::Integer | p | ) | const |
Get the col offset for a specific proc.
| [in] | p | The requested proc |
References clone().
| const ISpace & Alien::MatrixDistribution::colSpace | ( | ) | const |
Get the col space.
Definition at line 495 of file MatrixDistribution.cc.
References colDistribution(), and Alien::VectorDistribution::space().
Referenced by operator=().
| Integer Alien::MatrixDistribution::globalColSize | ( | ) | const |
Get the global col size.
Definition at line 570 of file MatrixDistribution.cc.
References m_internal.
Referenced by Alien::operator<<(), and operator=().
| Integer Alien::MatrixDistribution::globalRowSize | ( | ) | const |
Get the global row size.
Definition at line 561 of file MatrixDistribution.cc.
References m_internal.
Referenced by Alien::computeBlockOffsets(), Alien::operator<<(), and operator=().
| bool Alien::MatrixDistribution::isParallel | ( | ) | const |
Whether or not the run is parallel.
Definition at line 522 of file MatrixDistribution.cc.
References m_internal.
Referenced by Alien::operator<<(), and operator=().
| Integer Alien::MatrixDistribution::localColSize | ( | ) | const |
Get the local col size.
Definition at line 549 of file MatrixDistribution.cc.
References m_internal.
Referenced by operator=().
| Integer Alien::MatrixDistribution::localRowSize | ( | ) | const |
Get the local row size.
Definition at line 540 of file MatrixDistribution.cc.
References m_internal.
Referenced by Alien::operator<<(), operator=(), Alien::VBlockImpl::VBlockImpl(), and Alien::VBlockSizes::VBlockSizes().
|
default |
Operator equal.
| [in] | dist | The matrix distribution to copy |
References MatrixDistribution().
|
default |
Operator equal.
| [in] | dist | The matrix distribution to copy |
References colDistribution(), colSpace(), globalColSize(), globalRowSize(), isParallel(), localColSize(), localRowSize(), MatrixDistribution(), operator==(), parallelMng(), rowDistribution(), rowOffset(), and rowSpace().
| bool Alien::MatrixDistribution::operator== | ( | const MatrixDistribution & | dist | ) | const |
Comparison operator.
| [in] | dist | The matrix distribution to compare |
Definition at line 514 of file MatrixDistribution.cc.
References m_internal, and MatrixDistribution().
Referenced by operator=().
|
private |
Get the owner of an entry.
| [in] | i | The global id of the row |
| [in] | j | The global id of the col |
Definition at line 717 of file MatrixDistribution.cc.
References m_internal.
Referenced by colLocalToGlobal().
| IMessagePassingMng * Alien::MatrixDistribution::parallelMng | ( | ) | const |
Get the parallel manager.
Definition at line 531 of file MatrixDistribution.cc.
References m_internal.
Referenced by Alien::computeBlockOffsets(), operator=(), Alien::LinearSolver< Tag >::solve(), and Alien::VBlockSizes::VBlockSizes().
| const VectorDistribution & Alien::MatrixDistribution::rowDistribution | ( | ) | const |
Get the row distribution.
Definition at line 466 of file MatrixDistribution.cc.
References m_internal.
Referenced by operator=().
|
private |
Get the local id of a row with its global id.
| [in] | i | The global id of the row |
|
private |
Get the local id of a non local row with its global id.
| [in] | i | The global id of the non local row |
| [in] | p | The proc which owns the row |
|
private |
Get the global id of a row with its local id.
| [in] | i | The local id of the row |
|
private |
Get the global id of a non local row with its local id.
| [in] | i | The local id of the non local row |
| [in] | p | The proc which owns the row |
| Integer Alien::MatrixDistribution::rowOffset | ( | ) | const |
Get the row offset.
Definition at line 582 of file MatrixDistribution.cc.
References m_internal.
Referenced by Alien::computeBlockOffsets(), Alien::operator<<(), operator=(), Alien::VBlockImpl::VBlockImpl(), and Alien::VBlockSizes::VBlockSizes().
| Arccore::Integer Alien::MatrixDistribution::rowOffset | ( | Arccore::Integer | p | ) | const |
Get the row offset for a specific proc.
| [in] | p | The requested proc |
References colOffset().
| const ISpace & Alien::MatrixDistribution::rowSpace | ( | ) | const |
Get the row space.
Definition at line 475 of file MatrixDistribution.cc.
References m_internal.
Referenced by operator=().
|
private |
Internal implementation of the matrix distribution.
Definition at line 340 of file MatrixDistribution.h.
Referenced by colDistribution(), colOffset(), globalColSize(), globalRowSize(), isParallel(), localColSize(), localRowSize(), MatrixDistribution(), MatrixDistribution(), MatrixDistribution(), operator==(), owner(), parallelMng(), rowDistribution(), rowOffset(), and rowSpace().