Ewoms::MpiBuffer< DataType > Class Template Reference

Simplifies handling of buffers to be used in conjunction with MPI. More...

#include <mpibuffer.hh>

Inheritance diagram for Ewoms::MpiBuffer< DataType >:
Inheritance graph

Public Member Functions

 MpiBuffer ()
 
 MpiBuffer (int size)
 
 ~MpiBuffer ()
 
void resize (size_t newSize)
 Set the size of the buffer. More...
 
void send (int peerRank, bool setNoAccess=true)
 Send the buffer asyncronously to a peer process. More...
 
void wait ()
 Wait until the buffer was send to the peer completely. More...
 
void receive (int peerRank)
 Receive the buffer syncronously from a peer rank. More...
 
MPI_Request & request ()
 Returns the current MPI_Request object. More...
 
const MPI_Request & request () const
 Returns the current MPI_Request object. More...
 
MPI_Status & status ()
 Returns the current MPI_Status object. More...
 
const MPI_Status & status () const
 Returns the current MPI_Status object. More...
 
size_t size () const
 Returns the number of data objects in the buffer. More...
 
DataType & operator[] (size_t i)
 Provide access to the buffer data. More...
 
const DataType & operator[] (size_t i) const
 Provide access to the buffer data. More...
 

Detailed Description

template<class DataType>
class Ewoms::MpiBuffer< DataType >

Simplifies handling of buffers to be used in conjunction with MPI.

Constructor & Destructor Documentation

template<class DataType>
Ewoms::MpiBuffer< DataType >::MpiBuffer ( )
inline
template<class DataType>
Ewoms::MpiBuffer< DataType >::MpiBuffer ( int  size)
inline
template<class DataType>
Ewoms::MpiBuffer< DataType >::~MpiBuffer ( )
inline

Member Function Documentation

template<class DataType>
DataType& Ewoms::MpiBuffer< DataType >::operator[] ( size_t  i)
inline

Provide access to the buffer data.

template<class DataType>
const DataType& Ewoms::MpiBuffer< DataType >::operator[] ( size_t  i) const
inline

Provide access to the buffer data.

template<class DataType>
void Ewoms::MpiBuffer< DataType >::receive ( int  peerRank)
inline
template<class DataType>
MPI_Request& Ewoms::MpiBuffer< DataType >::request ( )
inline

Returns the current MPI_Request object.

This object is only well defined after the send() method.

template<class DataType>
const MPI_Request& Ewoms::MpiBuffer< DataType >::request ( ) const
inline

Returns the current MPI_Request object.

This object is only well defined after the send() method.

template<class DataType>
void Ewoms::MpiBuffer< DataType >::resize ( size_t  newSize)
inline

Set the size of the buffer.

template<class DataType>
void Ewoms::MpiBuffer< DataType >::send ( int  peerRank,
bool  setNoAccess = true 
)
inline

Send the buffer asyncronously to a peer process.

template<class DataType>
size_t Ewoms::MpiBuffer< DataType >::size ( ) const
inline

Returns the number of data objects in the buffer.

Referenced by Ewoms::MpiBuffer< Ewoms::Linear::IndexDistanceNpeers >::MpiBuffer().

template<class DataType>
MPI_Status& Ewoms::MpiBuffer< DataType >::status ( )
inline

Returns the current MPI_Status object.

This object is only well defined after the receive() and wait() methods.

template<class DataType>
const MPI_Status& Ewoms::MpiBuffer< DataType >::status ( ) const
inline

Returns the current MPI_Status object.

This object is only well defined after the receive() and wait() methods.

template<class DataType>
void Ewoms::MpiBuffer< DataType >::wait ( )
inline

Wait until the buffer was send to the peer completely.


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