COMBINATORIAL_BLAS  1.6
combblas::CommGrid Class Reference

#include <CommGrid.h>

Public Member Functions

 CommGrid (MPI_Comm world, int nrowproc, int ncolproc)
 
 ~CommGrid ()
 
 CommGrid (const CommGrid &rhs)
 
CommGridoperator= (const CommGrid &rhs)
 
void CreateDiagWorld ()
 
bool operator== (const CommGrid &rhs) const
 
bool operator!= (const CommGrid &rhs) const
 
bool OnSameProcCol (int rhsrank)
 
bool OnSameProcRow (int rhsrank)
 
int GetRank (int rowrank, int colrank)
 
int GetRank (int diagrank)
 
int GetRank ()
 
int GetRankInProcRow ()
 
int GetRankInProcCol ()
 
int GetDiagRank ()
 
int GetRankInProcRow (int wholerank)
 Return rank in the row world. More...
 
int GetRankInProcCol (int wholerank)
 Return rank in the column world. More...
 
int GetDiagOfProcRow ()
 
int GetDiagOfProcCol ()
 
int GetComplementRank ()
 
MPI_Comm & GetWorld ()
 
MPI_Comm & GetRowWorld ()
 
MPI_Comm & GetColWorld ()
 
MPI_Comm & GetDiagWorld ()
 
MPI_Comm GetWorld () const
 
MPI_Comm GetRowWorld () const
 
MPI_Comm GetColWorld () const
 
MPI_Comm GetDiagWorld () const
 
int GetGridRows ()
 
int GetGridCols ()
 
int GetSize ()
 
int GetDiagSize ()
 
void OpenDebugFile (std::string prefix, std::ofstream &output) const
 

Friends

template<class IT , class NT , class DER >
class SpParMat
 
template<class IT , class NT >
class FullyDistSpVec
 
std::shared_ptr< CommGridProductGrid (CommGrid *gridA, CommGrid *gridB, int &innerdim, int &Aoffset, int &Boffset)
 

Detailed Description

Definition at line 44 of file CommGrid.h.

Constructor & Destructor Documentation

◆ CommGrid() [1/2]

combblas::CommGrid::CommGrid ( MPI_Comm  world,
int  nrowproc,
int  ncolproc 
)

Create row and column communicators (must be collectively called) C syntax: int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm) C++ syntax: MPI::Intercomm MPI::Intercomm::Split(int color, int key) consts Semantics: Processes with the same color are in the same new communicator

Definition at line 37 of file CommGrid.cpp.

◆ ~CommGrid()

combblas::CommGrid::~CommGrid ( )
inline

Definition at line 49 of file CommGrid.h.

◆ CommGrid() [2/2]

combblas::CommGrid::CommGrid ( const CommGrid rhs)
inline

Definition at line 56 of file CommGrid.h.

Member Function Documentation

◆ CreateDiagWorld()

void combblas::CommGrid::CreateDiagWorld ( )

Definition at line 77 of file CommGrid.cpp.

◆ GetColWorld() [1/2]

MPI_Comm& combblas::CommGrid::GetColWorld ( )
inline

Definition at line 129 of file CommGrid.h.

◆ GetColWorld() [2/2]

MPI_Comm combblas::CommGrid::GetColWorld ( ) const
inline

Definition at line 133 of file CommGrid.h.

◆ GetComplementRank()

int combblas::CommGrid::GetComplementRank ( )
inline

Definition at line 122 of file CommGrid.h.

◆ GetDiagOfProcCol()

int combblas::CommGrid::GetDiagOfProcCol ( )

Get the rank of the diagonal processor in that particular col In the ith processor col, the diagonal processor is the ith processor within that col

Definition at line 134 of file CommGrid.cpp.

◆ GetDiagOfProcRow()

int combblas::CommGrid::GetDiagOfProcRow ( )

Get the rank of the diagonal processor in that particular row In the ith processor row, the diagonal processor is the ith processor within that row

Definition at line 127 of file CommGrid.cpp.

◆ GetDiagRank()

int combblas::CommGrid::GetDiagRank ( )
inline

Definition at line 109 of file CommGrid.h.

◆ GetDiagSize()

int combblas::CommGrid::GetDiagSize ( )
inline

Definition at line 139 of file CommGrid.h.

◆ GetDiagWorld() [1/2]

MPI_Comm& combblas::CommGrid::GetDiagWorld ( )
inline

Definition at line 130 of file CommGrid.h.

◆ GetDiagWorld() [2/2]

MPI_Comm combblas::CommGrid::GetDiagWorld ( ) const
inline

Definition at line 134 of file CommGrid.h.

◆ GetGridCols()

int combblas::CommGrid::GetGridCols ( )
inline

Definition at line 137 of file CommGrid.h.

◆ GetGridRows()

int combblas::CommGrid::GetGridRows ( )
inline

Definition at line 136 of file CommGrid.h.

◆ GetRank() [1/3]

int combblas::CommGrid::GetRank ( int  rowrank,
int  colrank 
)
inline

Definition at line 104 of file CommGrid.h.

◆ GetRank() [2/3]

int combblas::CommGrid::GetRank ( int  diagrank)
inline

Definition at line 105 of file CommGrid.h.

◆ GetRank() [3/3]

int combblas::CommGrid::GetRank ( )
inline

Definition at line 106 of file CommGrid.h.

◆ GetRankInProcCol() [1/2]

int combblas::CommGrid::GetRankInProcCol ( )
inline

Definition at line 108 of file CommGrid.h.

◆ GetRankInProcCol() [2/2]

int combblas::CommGrid::GetRankInProcCol ( int  wholerank)

Return rank in the column world.

Definition at line 114 of file CommGrid.cpp.

◆ GetRankInProcRow() [1/2]

int combblas::CommGrid::GetRankInProcRow ( )
inline

Definition at line 107 of file CommGrid.h.

◆ GetRankInProcRow() [2/2]

int combblas::CommGrid::GetRankInProcRow ( int  wholerank)

Return rank in the row world.

Definition at line 120 of file CommGrid.cpp.

◆ GetRowWorld() [1/2]

MPI_Comm& combblas::CommGrid::GetRowWorld ( )
inline

Definition at line 128 of file CommGrid.h.

◆ GetRowWorld() [2/2]

MPI_Comm combblas::CommGrid::GetRowWorld ( ) const
inline

Definition at line 132 of file CommGrid.h.

◆ GetSize()

int combblas::CommGrid::GetSize ( )
inline

Definition at line 138 of file CommGrid.h.

◆ GetWorld() [1/2]

MPI_Comm& combblas::CommGrid::GetWorld ( )
inline

Definition at line 127 of file CommGrid.h.

◆ GetWorld() [2/2]

MPI_Comm combblas::CommGrid::GetWorld ( ) const
inline

Definition at line 131 of file CommGrid.h.

◆ OnSameProcCol()

bool combblas::CommGrid::OnSameProcCol ( int  rhsrank)

Definition at line 103 of file CommGrid.cpp.

◆ OnSameProcRow()

bool combblas::CommGrid::OnSameProcRow ( int  rhsrank)

Definition at line 108 of file CommGrid.cpp.

◆ OpenDebugFile()

void combblas::CommGrid::OpenDebugFile ( std::string  prefix,
std::ofstream &  output 
) const

Definition at line 153 of file CommGrid.cpp.

◆ operator!=()

bool combblas::CommGrid::operator!= ( const CommGrid rhs) const
inline

Definition at line 97 of file CommGrid.h.

◆ operator=()

CommGrid& combblas::CommGrid::operator= ( const CommGrid rhs)
inline

Definition at line 71 of file CommGrid.h.

◆ operator==()

bool combblas::CommGrid::operator== ( const CommGrid rhs) const

Definition at line 139 of file CommGrid.cpp.

Friends And Related Function Documentation

◆ FullyDistSpVec

template<class IT , class NT >
friend class FullyDistSpVec
friend

Definition at line 163 of file CommGrid.h.

◆ ProductGrid

std::shared_ptr<CommGrid> ProductGrid ( CommGrid gridA,
CommGrid gridB,
int &  innerdim,
int &  Aoffset,
int &  Boffset 
)
friend

Definition at line 164 of file CommGrid.cpp.

◆ SpParMat

template<class IT , class NT , class DER >
friend class SpParMat
friend

Definition at line 160 of file CommGrid.h.


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