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

Change MultiObj current representation to another communicator. More...

#include <core/alien/kernels/redistributor/Redistributor.h>

Collaboration diagram for Alien::Redistributor:

Public Types

enum class  Method { dok , csr }

Public Member Functions

 Redistributor (int globalSize, IMessagePassingMng *super, IMessagePassingMng *target, Method method=Method::dok)
std::shared_ptr< MultiMatrixImplredistribute (MultiMatrixImpl *mat)
 Convert a Matrix from its communicator to the target communicator. Matrix initial communicator must be the same than the one used when creating the Redistributor object.
std::shared_ptr< MultiVectorImplredistribute (MultiVectorImpl *vect)
 Convert a Vector from its communicator to the target communicator. Vector initial communicator must be the same than the one used when creating the Redistributor object.
void redistributeBack (MultiVectorImpl *vect)
 Convert back a Vector : from the target to its original communicator. Vector original communicator must be the same than the one used when creating the Redistributor object.
const RedistributorCommPlancommPlan () const

Private Attributes

IMessagePassingMng * m_super_pm
std::unique_ptr< RedistributorCommPlanm_distributor
Method m_method = Method::dok

Detailed Description

Change MultiObj current representation to another communicator.

This object is used to defined the input communicator and create another, included, communicator, depending on the user wish to keep or not the current process. It also provides functions to convert Matrix and Vector from their original communicator (input) to the target communicator. And the other way as well for Vectors.

Definition at line 30 of file Redistributor.h.

Member Enumeration Documentation

◆ Method

enum class Alien::Redistributor::Method
strong

Definition at line 33 of file Redistributor.h.

Constructor & Destructor Documentation

◆ Redistributor()

Alien::Redistributor::Redistributor ( int globalSize,
IMessagePassingMng * super,
IMessagePassingMng * target,
Method method = Method::dok )

Definition at line 27 of file Redistributor.cc.

Member Function Documentation

◆ commPlan()

const RedistributorCommPlan * Alien::Redistributor::commPlan ( ) const

Definition at line 61 of file Redistributor.cc.

◆ redistribute() [1/2]

std::shared_ptr< MultiMatrixImpl > Alien::Redistributor::redistribute ( MultiMatrixImpl * mat)

Convert a Matrix from its communicator to the target communicator. Matrix initial communicator must be the same than the one used when creating the Redistributor object.

Definition at line 36 of file Redistributor.cc.

References Alien::MultiMatrixImpl::get(), and redistribute().

Referenced by redistribute(), and redistribute().

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

◆ redistribute() [2/2]

std::shared_ptr< MultiVectorImpl > Alien::Redistributor::redistribute ( MultiVectorImpl * vect)

Convert a Vector from its communicator to the target communicator. Vector initial communicator must be the same than the one used when creating the Redistributor object.

Definition at line 46 of file Redistributor.cc.

References Alien::MultiVectorImpl::get(), and redistribute().

Here is the call graph for this function:

◆ redistributeBack()

void Alien::Redistributor::redistributeBack ( MultiVectorImpl * vect)

Convert back a Vector : from the target to its original communicator. Vector original communicator must be the same than the one used when creating the Redistributor object.

Definition at line 52 of file Redistributor.cc.

References redistributeBack().

Referenced by redistributeBack().

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

Member Data Documentation

◆ m_distributor

std::unique_ptr<RedistributorCommPlan> Alien::Redistributor::m_distributor
private

Definition at line 63 of file Redistributor.h.

◆ m_method

Method Alien::Redistributor::m_method = Method::dok
private

Definition at line 64 of file Redistributor.h.

◆ m_super_pm

IMessagePassingMng* Alien::Redistributor::m_super_pm
private

Definition at line 62 of file Redistributor.h.


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