rebl-AMR
CommPoint2Point< Type > Class Template Reference

A template wrapper around MPI functions for point to point communication. More...

#include <communicate.h>

Public Member Functions

 CommPoint2Point (void *buff, uint size, uint *tg, uint snd, uint rcv, uint type, MPI_Comm com)
 
 CommPoint2Point (void *buff, uint size, uint snd, uint rcv)
 
 CommPoint2Point (void *buff, uint size)
 
void assignSender (uint sndr)
 
void assignReciever (uint rcv)
 
integer myRank ()
 
integer mySize ()
 
void Irecv ()
 
void Isend ()
 
void recv ()
 
void send ()
 
void getOffset (uint myvalue, uint *offset)
 
 ~CommPoint2Point ()
 

Private Attributes

MpiCom Com
 
Message Msg
 

Detailed Description

template<class Type>
class CommPoint2Point< Type >

A template wrapper around MPI functions for point to point communication.

class CommPoint2Point abstracts point to point communications and functions

Constructor & Destructor Documentation

◆ CommPoint2Point() [1/3]

template<class Type >
CommPoint2Point< Type >::CommPoint2Point ( void *  buff,
uint  size,
uint tg,
uint  snd,
uint  rcv,
uint  type,
MPI_Comm  Comm 
)

full constructor

< default tag for message send and recieve is "0", MPI_ANY_TAG is onlu OK for recieve commnad so it can not be used here

Parameters
CommIf communicator is not specified it will be set as MPI_COMM_WORLD by default

◆ CommPoint2Point() [2/3]

template<class Type >
CommPoint2Point< Type >::CommPoint2Point ( void *  buff,
uint  size,
uint  snd,
uint  rcv 
)

default constructor

Parameters
rcvanother constructor for Communicator class

◆ CommPoint2Point() [3/3]

template<class Type >
CommPoint2Point< Type >::CommPoint2Point ( void *  buff,
uint  size 
)

deferring the assigment of sender and reciever

Parameters
sizeanother constructor for Communicator class, deferes assigning sender and reciever

◆ ~CommPoint2Point()

template<class Type >
CommPoint2Point< Type >::~CommPoint2Point ( )
inline

Member Function Documentation

◆ assignReciever()

template<class Type >
void CommPoint2Point< Type >::assignReciever ( uint  rcv)

assigns the sender of the message

◆ assignSender()

template<class Type >
void CommPoint2Point< Type >::assignSender ( uint  sndr)

◆ getOffset()

template<class Type >
void CommPoint2Point< Type >::getOffset ( uint  myvalue,
uint offset 
)

calculates the offset of each processor for variable myvalue

Parameters
offsetgets the number of elements before the current processor, it is needed for globally defining the elements

◆ Irecv()

template<class Type >
void CommPoint2Point< Type >::Irecv ( )

non-blocking recieve

◆ Isend()

template<class Type >
void CommPoint2Point< Type >::Isend ( )

non-blocking send

◆ myRank()

template<class Type >
int CommPoint2Point< Type >::myRank ( )

assigns the destination the message gets the ranl of the processor

◆ mySize()

template<class Type >
int CommPoint2Point< Type >::mySize ( )

◆ recv()

template<class Type >
void CommPoint2Point< Type >::recv ( )

blocking recieve

◆ send()

template<class Type >
void CommPoint2Point< Type >::send ( )

blocking send

Member Data Documentation

◆ Com

template<class Type >
MpiCom CommPoint2Point< Type >::Com
private

◆ Msg

template<class Type >
Message CommPoint2Point< Type >::Msg
private

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