#include <part_descriptor.hpp>
◆ PartDescriptor()
| MLCommon::Matrix::PartDescriptor::PartDescriptor |
( |
size_t |
_M, |
|
|
size_t |
_N, |
|
|
const std::vector< RankSizePair * > & |
_partsToRanks, |
|
|
int |
rank, |
|
|
Layout |
_layout = LayoutColMajor |
|
) |
| |
For a given matrix and block-sizes construct the corresponding descriptor for it. This is useful when we are dealing with standard row/column-wise block-cyclic data distribution, as seen in other popular multi-node packages like magma etc.
- Parameters
-
| _M | total number of rows of this matrix |
| _N | total number of columns |
| _partsToRanks | mapping of ranks to parts and sizes |
| rank | MPI rank of the process |
| _layout | data layout (row or column major) |
◆ blocksOwnedBy()
| std::vector<RankSizePair*> MLCommon::Matrix::PartDescriptor::blocksOwnedBy |
( |
int |
rank | ) |
const |
Returns the vector of blocks (each identified by linearBLockIndex) owned by the given rank.
◆ startIndices() [1/2]
| std::vector<size_t> MLCommon::Matrix::PartDescriptor::startIndices |
( |
| ) |
const |
◆ startIndices() [2/2]
| std::vector<size_t> MLCommon::Matrix::PartDescriptor::startIndices |
( |
int |
rank | ) |
const |
◆ totalBlocks()
| int MLCommon::Matrix::PartDescriptor::totalBlocks |
( |
| ) |
const |
|
inline |
total number of blocks across all workers
◆ totalBlocksOwnedBy()
| int MLCommon::Matrix::PartDescriptor::totalBlocksOwnedBy |
( |
int |
rank | ) |
const |
Count the total number of blocks owned by a given rank
◆ totalElementsOwnedBy()
| size_t MLCommon::Matrix::PartDescriptor::totalElementsOwnedBy |
( |
int |
rank | ) |
const |
Count the total number of matrix elements owned by a given rank
◆ uniqueRanks()
| std::set<int> MLCommon::Matrix::PartDescriptor::uniqueRanks |
( |
| ) |
|
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const PartDescriptor & |
desc |
|
) |
| |
|
friend |
Print matrix descriptor in human readable form
◆ operator==
compare 2 descriptor objects
◆ layout
| Layout MLCommon::Matrix::PartDescriptor::layout |
| size_t MLCommon::Matrix::PartDescriptor::M |
| size_t MLCommon::Matrix::PartDescriptor::N |
◆ partsToRanks
| std::vector<RankSizePair*> MLCommon::Matrix::PartDescriptor::partsToRanks |
mapping of each block (in col-major order) to the device that owns it
◆ rank
| int MLCommon::Matrix::PartDescriptor::rank |
The documentation for this struct was generated from the following file: