|
ESyS-Particle
2.3.4
|
Buffer for MPI scatter/gather, leaf component. More...
#include <mpisgbuf.h>


Public Member Functions | |
| CMPISGBufferLeaf (MPI_Comm, int, int) | |
| virtual | ~CMPISGBufferLeaf () |
| 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) | |
| virtual | ~AMPISGBufferLeaf () |
| const MPI_Status & | status () |
Public Member Functions inherited from AMPIBuffer | |
| AMPIBuffer (MPI_Comm comm) | |
| virtual | ~AMPIBuffer () |
| virtual void | append (const Vec3 &) |
| virtual Vec3 | pop_vector () |
| const MPI_Status & | status () |
Private Attributes | |
| char * | m_buffer |
| int | m_buffersize |
| the size of the buffer More... | |
| int | m_position |
| the current end of the content More... | |
Additional Inherited Members | |
Protected Attributes inherited from AMPISGBufferLeaf | |
| int | m_root |
| rank of the root process More... | |
| int | m_int_increment |
| int | m_dbl_increment |
| the "packing size" of int/double More... | |
Protected Attributes inherited from AMPIBuffer | |
| MPI_Comm | m_comm |
| the MPI Communicator used for the send/recv operations More... | |
| MPI_Status | m_status |
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 |
References m_buffer, m_buffersize, and m_position.
|
virtual |
References m_buffer.
|
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 esys::lsm::bpu::len(), m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.

|
virtual |
Append a double to the buffer.
Implements AMPISGBufferLeaf.
References m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.
|
virtual |
Append an integer to the buffer.
Implements AMPISGBufferLeaf.
References m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.
Referenced by TSubLattice< T >::checkNeighbors().

|
virtual |
Implements AMPISGBufferLeaf.
References m_position.
|
virtual |
Pops a double from the buffer.
Implements AMPISGBufferLeaf.
References m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.
|
virtual |
Implements AMPISGBufferLeaf.
References m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.
|
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 m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.
|
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 esys::lsm::bpu::len(), m_buffer, m_buffersize, AMPIBuffer::m_comm, and m_position.

|
virtual |
Receive data from root process, using MPI_Scatter
Implements AMPISGBufferLeaf.
References m_buffer, m_buffersize, AMPIBuffer::m_comm, AMPISGBufferLeaf::m_root, and NULL.
|
virtual |
Send data to the root process, using MPI_Gather
Implements AMPISGBufferLeaf.
References m_buffer, m_buffersize, AMPIBuffer::m_comm, AMPISGBufferLeaf::m_root, and NULL.
Referenced by TSubLattice< T >::checkNeighbors().

|
private |
Referenced by append(), CMPISGBufferLeaf(), pop_double(), pop_doubles(), pop_int(), pop_string(), receive(), send(), and ~CMPISGBufferLeaf().
|
private |
the size of the buffer
Referenced by append(), CMPISGBufferLeaf(), pop_double(), pop_doubles(), pop_int(), pop_string(), receive(), and send().
|
private |
the current end of the content
Referenced by append(), clear(), CMPISGBufferLeaf(), pop_double(), pop_doubles(), pop_int(), and pop_string().