ESyS-Particle  4.0.1
Public Member Functions
CMPISGBufferRoot Class Reference

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

#include <mpisgbuf.h>

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

List of all members.

Public Member Functions

 CMPISGBufferRoot (MPI_Comm, int)
virtual void clear ()
virtual void gather ()
virtual void scatter ()
virtual void append (int, int)
virtual void append (double, int)
virtual void append (const char *, int)
virtual int pop_int (int)
virtual double pop_double (int)
virtual void pop_doubles (int, double *, int)

Detailed Description

Buffer for MPI scatter/gather, root component.

Author:
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

CMPISGBufferRoot::CMPISGBufferRoot ( MPI_Comm  comm,
int  buffersize 
)

Constructor for CMPISGBufferRoot

Parameters:
commthe MPI communicator
buffersizebuffer size per slice

References AMPISGBufferRoot::m_size.


Member Function Documentation

void CMPISGBufferRoot::append ( int  i,
int  nslice 
) [virtual]

Append an integer to a given slice of the buffer.

Parameters:
ithe integer
nslicethe nr. of the slice
Warning:
No check for overflow

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm, and AMPISGBufferRoot::m_size.

void CMPISGBufferRoot::append ( double  d,
int  nslice 
) [virtual]

Append an double to a given slice of the buffer.

Parameters:
dthe double
nslicethe nr. of the slice
Warning:
No check for overflow

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm, and AMPISGBufferRoot::m_size.

void CMPISGBufferRoot::append ( const char *  str,
int  nslice 
) [virtual]

Append an C string (char*) to a given slice of the buffer.

Parameters:
strthe string
nslicethe nr. of the slice
Warning:
No check for overflow

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm, and AMPISGBufferRoot::m_size.

void CMPISGBufferRoot::gather ( ) [virtual]

Get data from all other members of the communicator, using MPI_Gather

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm, and AMPISGBufferRoot::m_rank.

Referenced by CLatticeMaster::checkNeighbors().

Here is the caller graph for this function:

double CMPISGBufferRoot::pop_double ( int  nslice) [virtual]

Pops an double from a given slice of the the buffer.

Parameters:
nslicethe nr. of the slice
Returns:
the double.
Warning:
No check for underflow

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm.

int CMPISGBufferRoot::pop_int ( int  nslice) [virtual]

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

Parameters:
nslicethe nr. of the slice
Returns:
the int.
Warning:
No check for underflow

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm, and AMPISGBufferRoot::m_size.

Referenced by CLatticeMaster::checkNeighbors().

Here is the caller graph for this function:

void CMPISGBufferRoot::scatter ( ) [virtual]

Send data to all other members of the communicator, using MPI_Scatter

Implements AMPISGBufferRoot.

References AMPISGBufferRoot::m_comm, and AMPISGBufferRoot::m_rank.


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