Representation of a 2D processor grid, similar to a BLACS grid, but not requiring ScaLAPACK. More...
#include <BLRMatrixMPI.hpp>
Public Member Functions | |
ProcessorGrid2D (const MPIComm &comm) | |
ProcessorGrid2D (const MPIComm &comm, int P) | |
const MPIComm & | Comm () const |
int | nprows () const |
int | npcols () const |
int | prow () const |
int | pcol () const |
int | rank () const |
int | npactives () const |
bool | active () const |
const MPIComm & | row_comm () const |
const MPIComm & | col_comm () const |
bool | is_local_row (int i) const |
bool | is_local_col (int i) const |
bool | is_local (int i, int j) const |
int | rg2p (int i) const |
int | cg2p (int j) const |
int | g2p (int i, int j) const |
void | print () const |
Representation of a 2D processor grid, similar to a BLACS grid, but not requiring ScaLAPACK.
strumpack::BLR::ProcessorGrid2D::ProcessorGrid2D | ( | const MPIComm & | comm | ) |
Main constructor. This will construct a 2d processor grid, as square as possible.
comm | MPI communicator |
strumpack::BLR::ProcessorGrid2D::ProcessorGrid2D | ( | const MPIComm & | comm, |
int | P | ||
) |
Some processes might not have a valid MPIComm (MPI_COMM_NULL) for this grid, but would still want to construct a conceptual 2D processor grid. This constructor allows this, by passing the number of processors in the communicator used to construct the grid.