11 #include "arch/mpi/mpi.h" 48 int globalBatchDimension,
51 int blockBatchDimension);
90 MPI_Comm
getComm()
const {
return mComm; }
141 int getSize()
const {
return mNumRows * mNumColumns * mBatchDimension; }
195 int const globalNumRows,
196 int const globalNumColumns,
197 int const globalBatchDimension);
210 int const blockNumRows,
211 int const blockNumColumns,
212 int const globalBatchDimension);
273 MPI_Comm mGlobalComm;
277 int mGlobalNumRows = 0;
278 int mGlobalNumColumns = 0;
279 int mGlobalBatchDimension = 0;
282 int mBatchDimension = 0;
284 int mStartColumn = 0;
287 int mColumnIndex = 0;
294 #endif // MPIBLOCK_HPP_ void initGlobalDimensions(MPI_Comm comm, int const globalNumRows, int const globalNumColumns, int const globalBatchDimension)
int getGlobalNumColumns() const
void initBlockDimensions(int const blockNumRows, int const blockNumColumns, int const globalBatchDimension)
MPIBlock(MPI_Comm comm, int globalNumRows, int globalNumColumns, int globalBatchDimension, int blockNumRows, int blockNumColumns, int blockBatchDimension)
int getNumColumns() const
void checkRankInBounds(int const rank) const
int calcRankFromRowColBatch(int const rowIndex, int const columnIndex, int const batchIndex) const
MPI_Comm getGlobalComm() const
int getStartColumn() const
int getGlobalBatchDimension() const
int getGlobalRank() const
int getColumnIndex() const
int getBatchDimension() const
void initBlockLocation(MPI_Comm comm)
void createBlockComm(MPI_Comm comm)
int calcBatchIndexFromRank(int const rank) const
int getGlobalNumRows() const
int calcBatchIndexFromRankInternal(int const rank) const
int calcColumnFromRank(int const rank) const
int calcColumnFromRankInternal(int const rank) const
void calcRowColBatchFromRank(int const rank, int &rowIndex, int &columnIndex, int &batchIndex) const
int getBatchIndex() const
int getStartBatch() const
int calcRowFromRank(int const rank) const
int calcRowFromRankInternal(int const rank) const
static int calcNumCells(int cellSize, int overallSize)