ESyS-Particle  4.0.1
Public Member Functions
CMPISGBufferLeaf Class Reference

Buffer for MPI scatter/gather, leaf component. More...

#include <mpisgbuf.h>

Inheritance diagram for CMPISGBufferLeaf:
Inheritance graph
[legend]
Collaboration diagram for CMPISGBufferLeaf:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CMPISGBufferLeaf (MPI_Comm, int, int)
virtual void clear ()
virtual void send ()
virtual void receive ()
virtual void append (int)
virtual void append (double)
virtual void append (const char *)
virtual int pop_int ()
virtual double pop_double ()
virtual void pop_doubles (double *, int)
virtual std::string pop_string ()
- Public Member Functions inherited from AMPISGBufferLeaf
 AMPISGBufferLeaf (MPI_Comm, int)
const MPI_Status & status ()
- Public Member Functions inherited from AMPIBuffer
 AMPIBuffer (MPI_Comm comm)
virtual void append (const Vec3 &)
virtual Vec3 pop_vector ()

Additional Inherited Members

- Protected Attributes inherited from AMPISGBufferLeaf
int m_root
 rank of the root process
int m_int_increment
int m_dbl_increment
 the "packing size" of int/double
- Protected Attributes inherited from AMPIBuffer
MPI_Comm m_comm
 the MPI Communicator used for the send/recv operations
MPI_Status m_status

Detailed Description

Buffer for MPI scatter/gather, leaf component.

Author:
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

CMPISGBufferLeaf::CMPISGBufferLeaf ( MPI_Comm  comm,
int  root,
int  buffersize 
)

Constuctor for CMPISGBufferLeaf

Parameters:
commthe MPI communicator
rootrank of the root process
buffersizesize of the communication buffer

Member Function Documentation

void CMPISGBufferLeaf::append ( int  i)
virtual

Append an integer to the buffer.

Warning:
No check for overflow

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm.

Referenced by TSubLattice< T >::checkNeighbors().

Here is the caller graph for this function:

void CMPISGBufferLeaf::append ( double  d)
virtual

Append a double to the buffer.

Warning:
No check for overflow

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm.

void CMPISGBufferLeaf::append ( const char *  str)
virtual

Append a string to the buffer. The string appended is a normal (zero-terminated) C-string, but is internally handeled by packing the length frist and then the string.

Warning:
No check for overflow

Implements AMPIBuffer.

References AMPIBuffer::m_comm.

double CMPISGBufferLeaf::pop_double ( )
virtual

Pops a double from the buffer.

Warning:
No check for underflow
Returns:
the double.
See also:
CMPIBuffer::pop_int()

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm.

int CMPISGBufferLeaf::pop_int ( )
virtual

Pops an integer from the buffer, i.e. it pops the last sizeof(MPI_INT) bytes of the buffer, interpreting them as an int.

Warning:
No check for underflow
Returns:
the int.

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm.

std::string CMPISGBufferLeaf::pop_string ( )
virtual

Pops a string from the buffer. The first for bytes are interpreted as int, giving the length of the string (without terminating '\0'), the rest as the characters.

Warning:
no consistency check, i.e. it is not checked if the length is smaller than the buffersize.
Returns:
the double.
See also:
CMPISingle::pop_int()

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm.

void CMPISGBufferLeaf::receive ( )
virtual

Receive data from root process, using MPI_Scatter

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm, and AMPISGBufferLeaf::m_root.

void CMPISGBufferLeaf::send ( )
virtual

Send data to the root process, using MPI_Gather

Implements AMPISGBufferLeaf.

References AMPIBuffer::m_comm, and AMPISGBufferLeaf::m_root.

Referenced by TSubLattice< T >::checkNeighbors().

Here is the caller graph for this function:


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