ESyS-Particle
4.0.1
|
Buffer for MPI scatter/gather, leaf component. More...
#include <mpisgbuf.h>
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 () |
Buffer for MPI scatter/gather, leaf component.
CMPISGBufferLeaf::CMPISGBufferLeaf | ( | MPI_Comm | comm, |
int | root, | ||
int | buffersize | ||
) |
Constuctor for CMPISGBufferLeaf
comm | the MPI communicator |
root | rank of the root process |
buffersize | size of the communication buffer |
void CMPISGBufferLeaf::append | ( | int | i | ) | [virtual] |
Append an integer to the buffer.
Implements AMPISGBufferLeaf.
References AMPIBuffer::m_comm.
Referenced by TSubLattice< T >::checkNeighbors().
void CMPISGBufferLeaf::append | ( | double | d | ) | [virtual] |
Append a double to the buffer.
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.
Implements AMPIBuffer.
References AMPIBuffer::m_comm.
double CMPISGBufferLeaf::pop_double | ( | ) | [virtual] |
Pops a double from the buffer.
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.
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.
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().