Alien  1.3.0
Developer documentation
Loading...
Searching...
No Matches
Alien::MatrixDistribution Class Reference

Computes a matrix distribution. More...

#include <core/alien/distribution/MatrixDistribution.h>

Collaboration diagram for Alien::MatrixDistribution:

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.
MatrixDistributionoperator= (const MatrixDistribution &dist)
 Operator equal.
MatrixDistributionoperator= (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 VectorDistributionrowDistribution () const
 Get the row distribution.
const VectorDistributioncolDistribution () const
 Get the col distribution.
const ISpacerowSpace () const
 Get the row space.
const ISpacecolSpace () 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< MatrixDistributionclone () 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< Internalm_internal
 Internal implementation of the matrix distribution.

Detailed Description

Computes a matrix distribution.

Computes or use a pre-existing block row distribution for matrices

Definition at line 40 of file MatrixDistribution.h.

Constructor & Destructor Documentation

◆ MatrixDistribution() [1/12]

Alien::MatrixDistribution::MatrixDistribution ( )

Constructor.

Definition at line 313 of file MatrixDistribution.cc.

References m_internal.

Referenced by MatrixDistribution(), MatrixDistribution(), MatrixDistribution(), operator=(), operator=(), and operator==().

Here is the caller graph for this function:

◆ MatrixDistribution() [2/12]

Alien::MatrixDistribution::MatrixDistribution ( const ISpace & row_space,
const ISpace & col_space,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]row_spaceThe row space of the matrix
[in]col_spaceThe col space of the matrix
[in]parallel_mngThe parallel manager

◆ MatrixDistribution() [3/12]

Alien::MatrixDistribution::MatrixDistribution ( Arccore::Integer global_row_size,
Arccore::Integer global_col_size,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]global_row_sizeThe number of rows in the matrix
[in]global_col_sizeThe number of cols in the matrix
[in]parallel_mngThe parallel manager

◆ MatrixDistribution() [4/12]

Alien::MatrixDistribution::MatrixDistribution ( Arccore::Integer global_row_size,
Arccore::Integer global_col_size,
std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng )

Constructor.

Parameters
[in]global_row_sizeThe number of rows in the matrix
[in]global_col_sizeThe number of cols in the matrix
[in]parallel_mngThe parallel manager

References MatrixDistribution().

Here is the call graph for this function:

◆ MatrixDistribution() [5/12]

Alien::MatrixDistribution::MatrixDistribution ( const ISpace & row_space,
const ISpace & col_space,
Integer local_row_size,
IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]row_spaceThe row space of the matrix
[in]col_spaceThe col space of the matrix
[in]local_row_sizeThe number of local rows in the matrix
[in]parallel_mngThe parallel manager

Definition at line 361 of file MatrixDistribution.cc.

References m_internal, and Alien::ISpace::size().

Here is the call graph for this function:

◆ MatrixDistribution() [6/12]

Alien::MatrixDistribution::MatrixDistribution ( const ISpace & row_space,
const ISpace & col_space,
Integer local_row_size,
Integer local_col_size,
IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]row_spaceThe row space of the matrix
[in]col_spaceThe col space of the matrix
[in]local_row_sizeThe number of local rows in the matrix
[in]local_col_sizeThe number of local cols in the matrix
[in]parallel_mngThe parallel manager

Definition at line 376 of file MatrixDistribution.cc.

References m_internal, and Alien::ISpace::size().

Here is the call graph for this function:

◆ MatrixDistribution() [7/12]

Alien::MatrixDistribution::MatrixDistribution ( Arccore::Integer global_row_size,
Arccore::Integer global_col_size,
Arccore::Integer local_row_size,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]global_row_sizeThe number of rows in the matrix
[in]global_col_sizeThe number of cols in the matrix
[in]local_row_sizeThe number of local cols in the matrix
[in]parallel_mngThe parallel manager

◆ MatrixDistribution() [8/12]

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.

Parameters
[in]global_row_sizeThe number of rows in the matrix
[in]global_col_sizeThe number of cols in the matrix
[in]local_row_sizeThe number of local cols in the matrix
[in]local_col_sizeThe number of local cols in the matrix
[in]parallel_mngThe parallel manager

◆ MatrixDistribution() [9/12]

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.

Parameters
[in]global_row_sizeThe number of rows in the matrix
[in]global_col_sizeThe number of cols in the matrix
[in]local_row_sizeThe number of local cols in the matrix
[in]parallel_mngThe parallel manager

◆ MatrixDistribution() [10/12]

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.

Parameters
[in]global_row_sizeThe number of rows in the matrix
[in]global_col_sizeThe number of cols in the matrix
[in]local_row_sizeThe number of local cols in the matrix
[in]local_col_sizeThe number of local cols in the matrix
[in]parallel_mngThe parallel manager

◆ MatrixDistribution() [11/12]

Alien::MatrixDistribution::MatrixDistribution ( const MatrixDistribution & dist)
default

Copy constructor.

Parameters
[in]distThe matrix distribution to copy

References MatrixDistribution().

Here is the call graph for this function:

◆ MatrixDistribution() [12/12]

Alien::MatrixDistribution::MatrixDistribution ( MatrixDistribution && dist)
default

Rvalue constructor.

Parameters
[in]distThe distribution to take

References MatrixDistribution().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

std::shared_ptr< MatrixDistribution > Alien::MatrixDistribution::clone ( ) const

Clone the distribution.

Returns
A clone of this distribution

Definition at line 624 of file MatrixDistribution.cc.

Referenced by colOffset(), and Alien::Move::MatrixData::init().

Here is the caller graph for this function:

◆ colDistribution()

const VectorDistribution & Alien::MatrixDistribution::colDistribution ( ) const

Get the col distribution.

Returns
The col distribution

Definition at line 484 of file MatrixDistribution.cc.

References m_internal.

Referenced by colSpace(), and operator=().

Here is the caller graph for this function:

◆ colGlobalToLocal() [1/2]

Arccore::Integer Alien::MatrixDistribution::colGlobalToLocal ( Arccore::Integer i) const
private

Get the local id of a col with its global id.

Parameters
[in]iThe global id of the col
Returns
The local id of the col

◆ colGlobalToLocal() [2/2]

Arccore::Integer Alien::MatrixDistribution::colGlobalToLocal ( Arccore::Integer i,
Arccore::Integer p ) const
private

Get the local id of a non local col with its global id.

Parameters
[in]iThe global id of the non local col
[in]pThe proc which owns the col
Returns
The local id of the col

◆ colLocalToGlobal() [1/2]

Arccore::Integer Alien::MatrixDistribution::colLocalToGlobal ( Arccore::Integer i) const
private

Get the global id of a col with its local id.

Parameters
[in]iThe local id of the col
Returns
The global id of the col

◆ colLocalToGlobal() [2/2]

Arccore::Integer Alien::MatrixDistribution::colLocalToGlobal ( Arccore::Integer i,
Arccore::Integer p ) const
private

Get the global id of a non local col with its local id.

Parameters
[in]iThe local id of the non local col
[in]pThe proc which owns the col
Returns
The global id of the col

References owner().

Here is the call graph for this function:

◆ colOffset() [1/2]

Integer Alien::MatrixDistribution::colOffset ( ) const

Get the col offset.

Returns
The col offset

Definition at line 600 of file MatrixDistribution.cc.

References m_internal.

Referenced by rowOffset().

Here is the caller graph for this function:

◆ colOffset() [2/2]

Arccore::Integer Alien::MatrixDistribution::colOffset ( Arccore::Integer p) const

Get the col offset for a specific proc.

Parameters
[in]pThe requested proc
Returns
The col offset for the specific proc

References clone().

Here is the call graph for this function:

◆ colSpace()

const ISpace & Alien::MatrixDistribution::colSpace ( ) const

Get the col space.

Returns
The col space

Definition at line 495 of file MatrixDistribution.cc.

References colDistribution(), and Alien::VectorDistribution::space().

Referenced by operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ globalColSize()

Integer Alien::MatrixDistribution::globalColSize ( ) const

Get the global col size.

Returns
The global col size

Definition at line 570 of file MatrixDistribution.cc.

References m_internal.

Referenced by Alien::operator<<(), and operator=().

Here is the caller graph for this function:

◆ globalRowSize()

Integer Alien::MatrixDistribution::globalRowSize ( ) const

Get the global row size.

Returns
The global row size

Definition at line 561 of file MatrixDistribution.cc.

References m_internal.

Referenced by Alien::computeBlockOffsets(), Alien::operator<<(), and operator=().

Here is the caller graph for this function:

◆ isParallel()

bool Alien::MatrixDistribution::isParallel ( ) const

Whether or not the run is parallel.

Returns
Whether or not the run is parallel

Definition at line 522 of file MatrixDistribution.cc.

References m_internal.

Referenced by Alien::operator<<(), and operator=().

Here is the caller graph for this function:

◆ localColSize()

Integer Alien::MatrixDistribution::localColSize ( ) const

Get the local col size.

Returns
The local col size

Definition at line 549 of file MatrixDistribution.cc.

References m_internal.

Referenced by operator=().

Here is the caller graph for this function:

◆ localRowSize()

Integer Alien::MatrixDistribution::localRowSize ( ) const

Get the local row size.

Returns
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().

Here is the caller graph for this function:

◆ operator=() [1/2]

MatrixDistribution & Alien::MatrixDistribution::operator= ( const MatrixDistribution & dist)
default

Operator equal.

Parameters
[in]distThe matrix distribution to copy
Returns
The new matrix distribution

References MatrixDistribution().

Here is the call graph for this function:

◆ operator=() [2/2]

MatrixDistribution & Alien::MatrixDistribution::operator= ( MatrixDistribution && dist)
default

Operator equal.

Parameters
[in]distThe matrix distribution to copy
Returns
The new matrix distribution

References colDistribution(), colSpace(), globalColSize(), globalRowSize(), isParallel(), localColSize(), localRowSize(), MatrixDistribution(), operator==(), parallelMng(), rowDistribution(), rowOffset(), and rowSpace().

Here is the call graph for this function:

◆ operator==()

bool Alien::MatrixDistribution::operator== ( const MatrixDistribution & dist) const

Comparison operator.

Parameters
[in]distThe matrix distribution to compare
Returns
Whether or not the matrices distribution are the same

Definition at line 514 of file MatrixDistribution.cc.

References m_internal, and MatrixDistribution().

Referenced by operator=().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ owner()

Integer Alien::MatrixDistribution::owner ( Arccore::Integer i,
Arccore::Integer j ) const
private

Get the owner of an entry.

Parameters
[in]iThe global id of the row
[in]jThe global id of the col
Returns
The proc owner

Definition at line 717 of file MatrixDistribution.cc.

References m_internal.

Referenced by colLocalToGlobal().

Here is the caller graph for this function:

◆ parallelMng()

IMessagePassingMng * Alien::MatrixDistribution::parallelMng ( ) const

Get the parallel manager.

Returns
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().

Here is the caller graph for this function:

◆ rowDistribution()

const VectorDistribution & Alien::MatrixDistribution::rowDistribution ( ) const

Get the row distribution.

Returns
The row distribution

Definition at line 466 of file MatrixDistribution.cc.

References m_internal.

Referenced by operator=().

Here is the caller graph for this function:

◆ rowGlobalToLocal() [1/2]

Arccore::Integer Alien::MatrixDistribution::rowGlobalToLocal ( Arccore::Integer i) const
private

Get the local id of a row with its global id.

Parameters
[in]iThe global id of the row
Returns
The local id of the row

◆ rowGlobalToLocal() [2/2]

Arccore::Integer Alien::MatrixDistribution::rowGlobalToLocal ( Arccore::Integer i,
Arccore::Integer p ) const
private

Get the local id of a non local row with its global id.

Parameters
[in]iThe global id of the non local row
[in]pThe proc which owns the row
Returns
The local id of the row

◆ rowLocalToGlobal() [1/2]

Arccore::Integer Alien::MatrixDistribution::rowLocalToGlobal ( Arccore::Integer i) const
private

Get the global id of a row with its local id.

Parameters
[in]iThe local id of the row
Returns
The global id of the row

◆ rowLocalToGlobal() [2/2]

Arccore::Integer Alien::MatrixDistribution::rowLocalToGlobal ( Arccore::Integer i,
Arccore::Integer p ) const
private

Get the global id of a non local row with its local id.

Parameters
[in]iThe local id of the non local row
[in]pThe proc which owns the row
Returns
The global id of the row

◆ rowOffset() [1/2]

Integer Alien::MatrixDistribution::rowOffset ( ) const

Get the row offset.

Returns
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().

Here is the caller graph for this function:

◆ rowOffset() [2/2]

Arccore::Integer Alien::MatrixDistribution::rowOffset ( Arccore::Integer p) const

Get the row offset for a specific proc.

Parameters
[in]pThe requested proc
Returns
The row offset for the specific proc

References colOffset().

Here is the call graph for this function:

◆ rowSpace()

const ISpace & Alien::MatrixDistribution::rowSpace ( ) const

Get the row space.

Returns
The row space

Definition at line 475 of file MatrixDistribution.cc.

References m_internal.

Referenced by operator=().

Here is the caller graph for this function:

Member Data Documentation

◆ m_internal

std::shared_ptr<Internal> Alien::MatrixDistribution::m_internal
private

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