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

Computes a vector distribution. More...

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

Collaboration diagram for Alien::VectorDistribution:

Classes

struct  Internal
 Internal implementation of the vector distribution. More...

Public Member Functions

 VectorDistribution ()
 Constructor.
 VectorDistribution (const ISpace &space, Arccore::MessagePassing::IMessagePassingMng *parallel_mng)
 Constructor.
 VectorDistribution (const ISpace &space, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng)
 Constructor.
 VectorDistribution (Arccore::Integer global_size, Arccore::MessagePassing::IMessagePassingMng *parallel_mng)
 Constructor.
 VectorDistribution (Arccore::Integer global_size, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng)
 Constructor.
 VectorDistribution (const ISpace &space, Arccore::Integer local_size, Arccore::MessagePassing::IMessagePassingMng *parallel_mng)
 Constructor.
 VectorDistribution (const ISpace &space, Arccore::Integer local_size, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng)
 Constructor.
 VectorDistribution (Arccore::Integer global_size, Arccore::Integer local_size, Arccore::MessagePassing::IMessagePassingMng *parallel_mng)
 Constructor.
 VectorDistribution (Arccore::Integer global_size, Arccore::Integer local_size, std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng)
 Constructor.
 VectorDistribution (const VectorDistribution &dist)
 Copy constructor \parm[in] dist The distribution to copy.
 VectorDistribution (VectorDistribution &&dist)
 Rvalue constructor.
 ~VectorDistribution ()
 Free resources.
VectorDistributionoperator= (const VectorDistribution &dist)
 Equal operator.
VectorDistributionoperator= (VectorDistribution &&dist)
 Equal operator.
bool operator== (const VectorDistribution &dist) const
 Comparison operator.
bool isParallel () const
 Whether or not the run is parallel.
std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > sharedParallelMng () const
 Get the parallel manager.
Arccore::MessagePassing::IMessagePassingMng * parallelMng () const
 Get the parallel manager.
const ISpacespace () const
 Get the space.
Arccore::Integer localSize () const
 Get the local size.
Arccore::Integer globalSize () const
 Get the global size.
Arccore::Integer offset () const
 Get the offset.
Arccore::Integer offset (Arccore::Integer p) const
 Get the offset for a specific proc.
Arccore::ConstArrayView< Integer > offsets () const
 Get all the offsets.
Arccore::Integer owner (Arccore::Integer i) const
 Get the owner of an entry.
std::shared_ptr< VectorDistributionclone () const
 Clone the distribution.
Arccore::Integer globalToLocal (Arccore::Integer i) const
 Get the local id of an elements with its global id.

Private Member Functions

Arccore::Integer globalToLocal (Arccore::Integer i, Arccore::Integer p) const
 Get the local id of a non local element with its global id.
Arccore::Integer localToGlobal (Arccore::Integer i) const
 Get the global id of an elements with its local id.
Arccore::Integer localToGlobal (Arccore::Integer i, Arccore::Integer p) const
 Get the global id of a non local element with its local id.

Private Attributes

std::shared_ptr< Internalm_internal
 Internal implementation of the vector distribution.

Friends

class MatrixDistribution

Detailed Description

Computes a vector distribution.

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

Definition at line 33 of file VectorDistribution.h.

Constructor & Destructor Documentation

◆ VectorDistribution() [1/11]

Alien::VectorDistribution::VectorDistribution ( )

Constructor.

Definition at line 382 of file VectorDistribution.cc.

References m_internal.

Referenced by operator=(), operator=(), operator==(), VectorDistribution(), VectorDistribution(), VectorDistribution(), and ~VectorDistribution().

Here is the caller graph for this function:

◆ VectorDistribution() [2/11]

Alien::VectorDistribution::VectorDistribution ( const ISpace & space,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]spaceThe space of the vector
[in]parallel_mngThe parallel manager

References space().

Here is the call graph for this function:

◆ VectorDistribution() [3/11]

Alien::VectorDistribution::VectorDistribution ( const ISpace & space,
std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng )

Constructor.

Parameters
[in]spaceThe space of the vector
[in]parallel_mngThe parallel manager

References space().

Here is the call graph for this function:

◆ VectorDistribution() [4/11]

Alien::VectorDistribution::VectorDistribution ( Arccore::Integer global_size,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]global_sizeThe global size of the vector
[in]parallel_mngThe parallel manager

◆ VectorDistribution() [5/11]

Alien::VectorDistribution::VectorDistribution ( Arccore::Integer global_size,
std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng )

Constructor.

Parameters
[in]global_sizeThe global size of the vector
[in]parallel_mngThe parallel manager

◆ VectorDistribution() [6/11]

Alien::VectorDistribution::VectorDistribution ( const ISpace & space,
Arccore::Integer local_size,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]spaceThe space of the vector
[in]local_sizeThe local size of the vector
[in]parallel_mngThe parallel manager

References space().

Here is the call graph for this function:

◆ VectorDistribution() [7/11]

Alien::VectorDistribution::VectorDistribution ( const ISpace & space,
Arccore::Integer local_size,
std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng )

Constructor.

Parameters
[in]spaceThe space of the vector
[in]local_sizeThe local size of the vector
[in]parallel_mngThe parallel manager

References space().

Here is the call graph for this function:

◆ VectorDistribution() [8/11]

Alien::VectorDistribution::VectorDistribution ( Arccore::Integer global_size,
Arccore::Integer local_size,
Arccore::MessagePassing::IMessagePassingMng * parallel_mng )

Constructor.

Parameters
[in]global_sizeThe global size of the vector
[in]local_sizeThe local size of the vector
[in]parallel_mngThe parallel manager

◆ VectorDistribution() [9/11]

Alien::VectorDistribution::VectorDistribution ( Arccore::Integer global_size,
Arccore::Integer local_size,
std::shared_ptr< Arccore::MessagePassing::IMessagePassingMng > parallel_mng )

Constructor.

Parameters
[in]global_sizeThe global size of the vector
[in]local_sizeThe local size of the vector
[in]parallel_mngThe parallel manager

References VectorDistribution().

Here is the call graph for this function:

◆ VectorDistribution() [10/11]

Alien::VectorDistribution::VectorDistribution ( const VectorDistribution & dist)

Copy constructor \parm[in] dist The distribution to copy.

Definition at line 476 of file VectorDistribution.cc.

References m_internal, and VectorDistribution().

Here is the call graph for this function:

◆ VectorDistribution() [11/11]

Alien::VectorDistribution::VectorDistribution ( VectorDistribution && dist)

Rvalue constructor.

Parameters
[in]distThe distribution to take

Definition at line 483 of file VectorDistribution.cc.

References m_internal, and VectorDistribution().

Here is the call graph for this function:

Member Function Documentation

◆ clone()

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

◆ globalSize()

Integer Alien::VectorDistribution::globalSize ( ) const

Get the global size.

Returns
The global size

Definition at line 577 of file VectorDistribution.cc.

References m_internal.

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

Here is the caller graph for this function:

◆ globalToLocal() [1/2]

Arccore::Integer Alien::VectorDistribution::globalToLocal ( Arccore::Integer i) const

Get the local id of an elements with its global id.

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

◆ globalToLocal() [2/2]

Arccore::Integer Alien::VectorDistribution::globalToLocal ( Arccore::Integer i,
Arccore::Integer p ) const
private

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

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

◆ isParallel()

bool Alien::VectorDistribution::isParallel ( ) const

Whether or not the run is parallel.

Returns
Whether or not the run is parallel

Definition at line 532 of file VectorDistribution.cc.

References m_internal.

Referenced by Alien::operator<<(), and ~VectorDistribution().

Here is the caller graph for this function:

◆ localSize()

Integer Alien::VectorDistribution::localSize ( ) const

◆ localToGlobal() [1/2]

Arccore::Integer Alien::VectorDistribution::localToGlobal ( Arccore::Integer i) const
private

Get the global id of an elements with its local id.

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

◆ localToGlobal() [2/2]

Arccore::Integer Alien::VectorDistribution::localToGlobal ( Arccore::Integer i,
Arccore::Integer p ) const
private

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

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

◆ offset() [1/2]

Integer Alien::VectorDistribution::offset ( ) const

◆ offset() [2/2]

Arccore::Integer Alien::VectorDistribution::offset ( Arccore::Integer p) const

Get the offset for a specific proc.

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

References clone(), offsets(), and owner().

Here is the call graph for this function:

◆ offsets()

ConstArrayView< Integer > Alien::VectorDistribution::offsets ( ) const

Get all the offsets.

Returns
Offsets array

Definition at line 604 of file VectorDistribution.cc.

References m_internal.

Referenced by offset().

Here is the caller graph for this function:

◆ operator=() [1/2]

VectorDistribution & Alien::VectorDistribution::operator= ( const VectorDistribution & dist)

Equal operator.

Parameters
[in]distThe distribution to copy
Returns
The copied distribution

Definition at line 505 of file VectorDistribution.cc.

References m_internal, and VectorDistribution().

Referenced by ~VectorDistribution().

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

◆ operator=() [2/2]

VectorDistribution & Alien::VectorDistribution::operator= ( VectorDistribution && dist)

Equal operator.

Parameters
[in]distThe distribution to copy
Returns
The copied distribution

Definition at line 515 of file VectorDistribution.cc.

References m_internal, and VectorDistribution().

Here is the call graph for this function:

◆ operator==()

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

Comparison operator.

Parameters
[in]distThe distribution to compare
Returns
Whether or not the distribution are identical

Definition at line 524 of file VectorDistribution.cc.

References m_internal, and VectorDistribution().

Referenced by ~VectorDistribution().

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

◆ owner()

Integer Alien::VectorDistribution::owner ( Arccore::Integer i) const

Get the owner of an entry.

Parameters
[in]iThe global id of the element
Returns
The proc owner

Definition at line 541 of file VectorDistribution.cc.

References m_internal.

Referenced by offset().

Here is the caller graph for this function:

◆ parallelMng()

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

Get the parallel manager.

Returns
The parallel manager

Definition at line 559 of file VectorDistribution.cc.

References m_internal.

Referenced by Alien::computeBlockOffsets(), Alien::VBlockSizes::VBlockSizes(), and ~VectorDistribution().

Here is the caller graph for this function:

◆ sharedParallelMng()

std::shared_ptr< IMessagePassingMng > Alien::VectorDistribution::sharedParallelMng ( ) const

Get the parallel manager.

Returns
The parallel manager

Definition at line 550 of file VectorDistribution.cc.

References m_internal.

Referenced by ~VectorDistribution().

Here is the caller graph for this function:

◆ space()

◆ MatrixDistribution

friend class MatrixDistribution
friend

Definition at line 246 of file VectorDistribution.h.

Member Data Documentation

◆ m_internal

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

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