Opm::MpiBuffer< DataType > Class Template Reference

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

#include <mpibuffer.hh>

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

Public Member Functions

 MpiBuffer ()
 
 MpiBuffer (size_t size)
 
 MpiBuffer (const MpiBuffer &)=default
 
 ~MpiBuffer ()
 
void resize (size_t newSize)
 Set the size of the buffer. More...
 
void send (unsigned peerRank)
 Send the buffer asyncronously to a peer process. More...
 
void wait ()
 Wait until the buffer was send to the peer completely. More...
 
void receive (unsigned 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 Opm::MpiBuffer< DataType >

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

Constructor & Destructor Documentation

◆ MpiBuffer() [1/3]

template<class DataType >
Opm::MpiBuffer< DataType >::MpiBuffer ( )
inline

◆ MpiBuffer() [2/3]

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

◆ MpiBuffer() [3/3]

template<class DataType >
Opm::MpiBuffer< DataType >::MpiBuffer ( const MpiBuffer< DataType > &  )
default

◆ ~MpiBuffer()

template<class DataType >
Opm::MpiBuffer< DataType >::~MpiBuffer ( )
inline

Member Function Documentation

◆ operator[]() [1/2]

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

Provide access to the buffer data.

◆ operator[]() [2/2]

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

Provide access to the buffer data.

◆ receive()

template<class DataType >
void Opm::MpiBuffer< DataType >::receive ( unsigned  peerRank)
inline

◆ request() [1/2]

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

Returns the current MPI_Request object.

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

◆ request() [2/2]

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

Returns the current MPI_Request object.

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

◆ resize()

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

Set the size of the buffer.

◆ send()

template<class DataType >
void Opm::MpiBuffer< DataType >::send ( unsigned  peerRank)
inline

Send the buffer asyncronously to a peer process.

◆ size()

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

Returns the number of data objects in the buffer.

Referenced by Opm::MpiBuffer< DataType >::MpiBuffer().

◆ status() [1/2]

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

Returns the current MPI_Status object.

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

◆ status() [2/2]

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

Returns the current MPI_Status object.

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

◆ wait()

template<class DataType >
void Opm::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: