ESyS-Particle  2.3.4
CMPIA2ABuffer Class Reference

class for a MPI-buffer supporting all-to-all communication More...

#include <mpia2abuf.h>

Public Member Functions

 CMPIA2ABuffer (MPI_Comm, int)
 
virtual ~CMPIA2ABuffer ()
 
virtual void clear ()
 
virtual void all2all ()
 
virtual void append (int, int)
 
virtual void append (double, int)
 
virtual int pop_int (int)
 
virtual double pop_double (int)
 

Private Attributes

MPI_Comm m_comm
 
int m_rank
 the rank in this communicator More...
 
int m_size
 size of the communicator More...
 
int m_int_increment
 
int m_dbl_increment
 the "packing size" of int/double More...
 
MPI_Status m_status
 
char * m_buffer_s
 send buffer More...
 
char * m_buffer_r
 receive buffer More...
 
int m_buffersize
 the size of the buffer per slice More...
 
int * m_position_s
 the current end of the content in each slice of the send buffer More...
 
int * m_position_r
 the current end of the content in each slice of the receive buffer More...
 

Detailed Description

class for a MPI-buffer supporting all-to-all communication

Author
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

◆ CMPIA2ABuffer()

CMPIA2ABuffer::CMPIA2ABuffer ( MPI_Comm  comm,
int  buffersize 
)

◆ ~CMPIA2ABuffer()

CMPIA2ABuffer::~CMPIA2ABuffer ( )
virtual

Member Function Documentation

◆ all2all()

void CMPIA2ABuffer::all2all ( )
virtual

◆ append() [1/2]

void CMPIA2ABuffer::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

References m_buffer_s, m_buffersize, m_comm, m_position_s, and m_size.

◆ append() [2/2]

void CMPIA2ABuffer::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

References m_buffer_s, m_buffersize, m_comm, m_position_s, and m_size.

◆ clear()

void CMPIA2ABuffer::clear ( )
virtual

◆ pop_double()

double CMPIA2ABuffer::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

References m_buffer_r, m_buffersize, m_comm, and m_position_r.

◆ pop_int()

int CMPIA2ABuffer::pop_int ( int  nslice)
virtual

Pops an integer from a given slice of the the buffer

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

References m_buffer_r, m_buffersize, m_comm, m_position_r, and m_size.

Member Data Documentation

◆ m_buffer_r

char* CMPIA2ABuffer::m_buffer_r
private

receive buffer

Referenced by all2all(), CMPIA2ABuffer(), pop_double(), pop_int(), and ~CMPIA2ABuffer().

◆ m_buffer_s

char* CMPIA2ABuffer::m_buffer_s
private

send buffer

Referenced by all2all(), append(), CMPIA2ABuffer(), and ~CMPIA2ABuffer().

◆ m_buffersize

int CMPIA2ABuffer::m_buffersize
private

the size of the buffer per slice

Referenced by all2all(), append(), clear(), CMPIA2ABuffer(), pop_double(), and pop_int().

◆ m_comm

MPI_Comm CMPIA2ABuffer::m_comm
private

◆ m_dbl_increment

int CMPIA2ABuffer::m_dbl_increment
private

the "packing size" of int/double

Referenced by CMPIA2ABuffer().

◆ m_int_increment

int CMPIA2ABuffer::m_int_increment
private

Referenced by CMPIA2ABuffer().

◆ m_position_r

int* CMPIA2ABuffer::m_position_r
private

the current end of the content in each slice of the receive buffer

Referenced by clear(), CMPIA2ABuffer(), pop_double(), pop_int(), and ~CMPIA2ABuffer().

◆ m_position_s

int* CMPIA2ABuffer::m_position_s
private

the current end of the content in each slice of the send buffer

Referenced by append(), clear(), CMPIA2ABuffer(), and ~CMPIA2ABuffer().

◆ m_rank

int CMPIA2ABuffer::m_rank
private

the rank in this communicator

Referenced by CMPIA2ABuffer().

◆ m_size

int CMPIA2ABuffer::m_size
private

size of the communicator

Referenced by append(), clear(), CMPIA2ABuffer(), and pop_int().

◆ m_status

MPI_Status CMPIA2ABuffer::m_status
private

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