rebl-AMR
CommCollective< Type > Class Template Reference

is a template wrapper around MPI functions for collective communicatios More...

#include <communicate.h>

Public Member Functions

 CommCollective (void *buf, uint size, uint root)
 
 CommCollective (void *buff, uint size)
 
void bcast ()
 
void Ibcast ()
 
void getTotalNumber (uint *offset, uint *myvalue, uint *totalvalue)
 
void IgetTotalNumber (uint *offset, uint *myvalue, uint *totalvalue)
 
void waitOnRequest ()
 
 ~CommCollective ()
 
template<>
void getTotalNumber (uint *offset, uint *myvalue, uint *totalvalue)
 
template<>
void IgetTotalNumber (uint *offset, uint *myvalue, uint *totalvalue)
 

Private Attributes

MpiCom Com
 
Message Msg
 

Detailed Description

template<class Type>
class CommCollective< Type >

is a template wrapper around MPI functions for collective communicatios

This class is specialized for collective communications and functions

Constructor & Destructor Documentation

◆ CommCollective() [1/2]

template<class Type >
CommCollective< Type >::CommCollective ( void *  buf,
uint  size,
uint  root 
)

constructor

Parameters
rootanother constructor for Communicator class

◆ CommCollective() [2/2]

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

constructor specialized for root=comsize-1

Parameters
sizeanother constructor for Communicator class, this one sets the root as comsize-1 for hdf5

◆ ~CommCollective()

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

Member Function Documentation

◆ bcast()

template<class Type >
void CommCollective< Type >::bcast ( )

blockin broadcast

◆ getTotalNumber() [1/2]

template<class Type >
void CommCollective< Type >::getTotalNumber ( uint offset,
uint myvalue,
uint totalvalue 
)

calculates the world population for a given variable

◆ getTotalNumber() [2/2]

template<>
void CommCollective< uint >::getTotalNumber ( uint offset,
uint myvalue,
uint totalvalue 
)

< the largest offset belongs to the processor with highest rank, add this to its number of cubes will give us the total value

◆ Ibcast()

template<class Type >
void CommCollective< Type >::Ibcast ( )

non-blocking broadcast

I spoecialized this function since this is only needed for unsigned ints

◆ IgetTotalNumber() [1/2]

template<class Type >
void CommCollective< Type >::IgetTotalNumber ( uint offset,
uint myvalue,
uint totalvalue 
)

calculates the world population for a given variable in a non-blocking fashion

◆ IgetTotalNumber() [2/2]

template<>
void CommCollective< uint >::IgetTotalNumber ( uint offset,
uint myvalue,
uint totalvalue 
)

< the largest offset belongs to the processor with highest rank, add this to its number of cubes will give us the total value

◆ waitOnRequest()

template<class Type >
void CommCollective< Type >::waitOnRequest ( )

Member Data Documentation

◆ Com

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

◆ Msg

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

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