Local view of a a distributed communication graph from the perspective of the current rank. Each vertex is a rank and the edges define possible communication links between the vertices. This view provides access to the (potentially weighted) in- and outgoing edges which are represented as a sequence of neighboring ranks. Note that MPI allows this to be a multi-graph. process' rank.
More...
#include <distributed_graph_communicator.hpp>
Local view of a a distributed communication graph from the perspective of the current rank. Each vertex is a rank and the edges define possible communication links between the vertices. This view provides access to the (potentially weighted) in- and outgoing edges which are represented as a sequence of neighboring ranks. Note that MPI allows this to be a multi-graph. process' rank.
◆ CommunicationGraphLocalView() [1/2]
Constructs a view of an unweighted communication graph.
- Template Parameters
-
ContiguousRange | Type of the input range for in and out ranks. |
- Parameters
-
in_ranks | Neighboring in ranks, i.e., ranks i for which there is an edge (i,own_rank). |
out_ranks | Neighboring out ranks, i.e., ranks i for which there is an edge (own_rank, i). |
◆ CommunicationGraphLocalView() [2/2]
Constructs a view of an unweighted communication graph.
- Template Parameters
-
ContiguousRange | Type of the input range for in and out ranks. |
- Parameters
-
in_ranks | Neighboring in ranks, i.e., ranks i for which there is an edge (i,own_rank). |
out_ranks | Neighboring out ranks, i.e., ranks i for which there is an edge (own_rank, i). |
in_weights | Weights associcated to neighboring in ranks. |
out_weights | Weights associcated to neighboring out ranks. |
◆ create_mpi_graph_communicator()
MPI_Comm kamping::CommunicationGraphLocalView::create_mpi_graph_communicator |
( |
MPI_Comm | comm | ) |
const |
|
inline |
Creates a distributed graph communicator based on the view of the given communication graph using MPI_Dist_graph_create_adjacent
.
- Parameters
-
comm | MPI comm on which the graph topology will be applied. |
- Returns
- MPi comm with associated graph topology.
◆ in_degree()
size_t kamping::CommunicationGraphLocalView::in_degree |
( |
| ) |
const |
|
inline |
Returns in degree of the rank, i.e. the number of in-going edges/communication links towards the rank.
- Returns
- In degree of the rank.
◆ in_degree_signed()
int kamping::CommunicationGraphLocalView::in_degree_signed |
( |
| ) |
const |
|
inline |
Returns in degree of the rank, i.e. the number of in-going edges/communication links towards the rank.
- Returns
- Signed in degree of the rank.
◆ out_degree()
size_t kamping::CommunicationGraphLocalView::out_degree |
( |
| ) |
const |
|
inline |
Returns out degree of the rank, i.e. the number of out-going edges/communication links starting at the rank.
- Returns
- Out degree of the rank.
◆ out_degree_signed()
int kamping::CommunicationGraphLocalView::out_degree_signed |
( |
| ) |
const |
|
inline |
Returns out degree of the rank, i.e. the number of out-going edges/communication links starting at the rank.
- Returns
- Signed out degree of the rank.
The documentation for this class was generated from the following file: