buffer object providing MPI functionality More...
#include <classdescMP.h>
Public Member Functions | |
unsigned | myid () |
unsigned | nprocs () |
current processes taskID | |
MPIbuf (const MPIbuf &x) | |
const MPIbuf & | operator= (const MPIbuf &x) |
bool | sent () |
returns true if previous asyncronous call has been set | |
void | wait () |
wait for previous asyncronous call to complete | |
void | send (unsigned dest, int tag) |
send data to dest with tag tag | |
void | isend (unsigned dest, int tag) |
asyncronously send data to dest with tag tag | |
MPIbuf & | get (int p=MPI_ANY_SOURCE, int t=MPI_ANY_TAG) |
receive a message from p (MPI_ANY_SOURCE) with tag t (MPI_ANY_TAG) | |
void | send_recv (unsigned dest, int sendtag, int source, int recvtag) |
perform a simultaneous send and receive between a pair of processes | |
MPIbuf & | bcast (unsigned root) |
broadcast data from root | |
MPIbuf & | gather (unsigned root) |
gather data (concatenated) into root's buffer | |
MPIbuf & | scatter (unsigned root) |
scatter root's data (that has been marked with mark ) | |
MPIbuf & | reset () |
reset the buffer to send or receive a new message | |
bool | msg_waiting (int source=MPI_ANY_SOURCE, int tag=MPI_ANY_TAG) |
is there a message waiting to be received into the buffe | |
template<class T > | |
MPIbuf & | operator<< (const T &x) |
MPIbuf & | operator<< (classdesc::send s) |
MPIbuf & | operator<< (classdesc::isend s) |
MPIbuf & | operator<< (classdesc::bcast s) |
MPIbuf & | operator<< (mark s) |
![]() | |
const char * | data () const |
actual buffer | |
char * | data () |
actual buffer | |
size_t | size () const |
size of buffer | |
size_t | pos () const |
position of read pointer | |
char * | realloc (char *d, size_t s) |
void | realloc (size_t s) |
virtual void | append (const basic_type &x) |
virtual void | popoff (basic_type &x) |
pack_t (size_t sz=0) | |
pack_t (const char *fname, const char *rw) | |
virtual | operator bool () |
virtual pack_t & | reseti () |
virtual pack_t & | reseto () |
virtual pack_t & | seeki (long offs) |
virtual pack_t & | seeko (long offs) |
void | clear () |
virtual void | packraw (const char *x, size_t s) |
virtual void | unpackraw (char *x, size_t s) |
virtual void | swap (pack_t &other) |
virtual int | cmp (const pack_t &x) const |
bool | operator< (const pack_t &x) const |
bool | operator> (const pack_t &x) const |
bool | operator== (const pack_t &x) const |
bool | operator!= (const pack_t &x) const |
const char * | data () const |
actual buffer | |
char * | data () |
actual buffer | |
size_t | size () const |
size of buffer | |
size_t | pos () const |
position of read pointer | |
char * | realloc (char *d, size_t s) |
void | realloc (size_t s) |
virtual void | append (const basic_type &x) |
virtual void | popoff (basic_type &x) |
pack_t (size_t sz=0) | |
pack_t (const char *fname, const char *rw) | |
virtual | operator bool () |
virtual pack_t & | reseti () |
virtual pack_t & | reseto () |
virtual pack_t & | seeki (long offs) |
virtual pack_t & | seeko (long offs) |
void | clear () |
virtual void | packraw (const char *x, size_t s) |
virtual void | unpackraw (char *x, size_t s) |
virtual void | swap (pack_t &other) |
virtual int | cmp (const pack_t &x) const |
bool | operator< (const pack_t &x) const |
bool | operator> (const pack_t &x) const |
bool | operator== (const pack_t &x) const |
bool | operator!= (const pack_t &x) const |
Public Attributes | |
MPI_Comm | Communicator |
The MPI communicator to be used for subsequent communications. | |
bool | const_buffer |
buffer size is same on all processes in a collective communication More... | |
int | proc |
int | tag |
![]() | |
Ptr_flag | ptr_flag |
unsigned | recur_max |
recursion limit for pack_graph | |
std::vector< PtrStoreRef > | alloced |
Friends | |
class | MPIbuf_array |
Additional Inherited Members | |
![]() | |
enum | mode_t { buf, readf, writef, buf, readf, writef } |
enum | mode_t { buf, readf, writef, buf, readf, writef } |
![]() | |
void | swap_base (pack_t &other) |
void | swap_base (pack_t &other) |
![]() | |
FILE * | f |
mode_t | mode |
char * | m_data |
actual buffer | |
size_t | m_size |
size of buffer | |
size_t | m_pos |
position of read pointer | |
buffer object providing MPI functionality
This class inherits from pack_t
, so full classdesc serialisation is available
bool classdesc::MPIbuf::const_buffer |
buffer size is same on all processes in a collective communication
number of processesset this to true for improved collective communication. Safe to leave as false