openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Public Member Functions | Public Attributes | List of all members
SF::commgraph< T > Class Template Reference

The class holds the communication graph for a MPI_Exchange() call. More...

#include <SF_container.h>

Inheritance diagram for SF::commgraph< T >:
Collaboration diagram for SF::commgraph< T >:

Public Member Functions

void resize (size_t size)
 Resize all vectors to size. More...
 
template<class V >
void scale (V fac)
 scale comm graph layout data More...
 
void transpose ()
 transpose comm graph (receive becomes send, and vice versa) More...
 
template<class V >
void configure (const vector< V > &dest, MPI_Comm comm)
 Set up the communication graph. More...
 
template<class V >
void configure (const vector< V > &dest, const vector< T > &cnt, MPI_Comm comm)
 Set up the communication graph. More...
 
template<class V >
void source_ranks (vector< V > &source)
 For every received data element, get the rank indices it was receive from. More...
 

Public Attributes

vector< T > scnt
 Number of elements sent to each rank. More...
 
vector< T > sdsp
 Displacements w.r.t. scnt. More...
 
vector< T > rcnt
 Number of elements received from each rank. More...
 
vector< T > rdsp
 Displacements w.r.t. rcnt. More...
 

Detailed Description

template<class T>
class SF::commgraph< T >

The class holds the communication graph for a MPI_Exchange() call.

Definition at line 625 of file SF_container.h.

Member Function Documentation

◆ configure() [1/2]

template<class T>
template<class V >
void SF::commgraph< T >::configure ( const vector< V > &  dest,
MPI_Comm  comm 
)
inline

Set up the communication graph.

Parameters
[in]destThe destination of each local element to communicate.
[in]commThe MPI_Comm used for the communcation.
Postcondition
All vectors in the class have been configured.

Definition at line 667 of file SF_container.h.

Here is the caller graph for this function:

◆ configure() [2/2]

template<class T>
template<class V >
void SF::commgraph< T >::configure ( const vector< V > &  dest,
const vector< T > &  cnt,
MPI_Comm  comm 
)
inline

Set up the communication graph.

Parameters
[in]destThe destination of each logical element to communicate.
[in]cntThe number of entries of each logical element.
[in]commThe MPI_Comm used for the communcation.
Postcondition
All vectors in the class have been configured.

Definition at line 689 of file SF_container.h.

◆ resize()

template<class T>
void SF::commgraph< T >::resize ( size_t  size)
inline

Resize all vectors to size.

Definition at line 634 of file SF_container.h.

Here is the caller graph for this function:

◆ scale()

template<class T>
template<class V >
void SF::commgraph< T >::scale ( fac)
inline

scale comm graph layout data

Definition at line 641 of file SF_container.h.

Here is the caller graph for this function:

◆ source_ranks()

template<class T>
template<class V >
void SF::commgraph< T >::source_ranks ( vector< V > &  source)
inline

For every received data element, get the rank indices it was receive from.

Note: The commgraph class needs to be configured in order for this function to produce a meaningful result.

Parameters
[out]sourceA vector holding the source rank index to every element of data received.

Definition at line 714 of file SF_container.h.

Here is the caller graph for this function:

◆ transpose()

template<class T>
void SF::commgraph< T >::transpose ( )
inline

transpose comm graph (receive becomes send, and vice versa)

Definition at line 651 of file SF_container.h.

Here is the caller graph for this function:

Member Data Documentation

◆ rcnt

template<class T>
vector<T> SF::commgraph< T >::rcnt

Number of elements received from each rank.

Definition at line 630 of file SF_container.h.

◆ rdsp

template<class T>
vector<T> SF::commgraph< T >::rdsp

Displacements w.r.t. rcnt.

Definition at line 631 of file SF_container.h.

◆ scnt

template<class T>
vector<T> SF::commgraph< T >::scnt

Number of elements sent to each rank.

Definition at line 628 of file SF_container.h.

◆ sdsp

template<class T>
vector<T> SF::commgraph< T >::sdsp

Displacements w.r.t. scnt.

Definition at line 629 of file SF_container.h.


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