MALOC 0.1
Classes | Files | Typedefs | Functions

Vmpi class

A Virtual MPI communication lawyer object. More...

Classes

struct  sVmpi
 Class Vmpi: Definition. More...

Files

file  vmpi.h
 

Class Vmpi: a Virtual MPI communication layer object.


Typedefs

typedef struct sVmpi Vmpi
 Declaration of the Vmpi class as the Vmpi structure.

Functions

int Vmpi_init (int *argc, char ***argv)
 The Vmp initializer.
int Vmpi_finalize (void)
 The Vmp finalizer.
VmpiVmpi_ctor (void)
 The Vmpi constructor.
void Vmpi_dtor (Vmpi **thee)
 The Vmpi destructor.
int Vmpi_rank (Vmpi *thee)
 Return my processor ID.
int Vmpi_size (Vmpi *thee)
 Return the number of processors involved.
int Vmpi_barr (Vmpi *thee)
 An MPI barrier.
int Vmpi_send (Vmpi *thee, int des, char *buf, int bufsize)
 An MPI blocking send.
int Vmpi_recv (Vmpi *thee, int src, char *buf, int bufsize)
 An MPI blocking receive.
int Vmpi_bcast (Vmpi *thee, char *buf, int bufsize)
 An MPI broadcast.
int Vmpi_reduce (Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
 An MPI reduce.
int Vmpi_isend (Vmpi *thee, int des, char *buf, int bufsize)
 An MPI non-blocking send.

Detailed Description

A Virtual MPI communication lawyer object.


Typedef Documentation

typedef struct sVmpi Vmpi

Declaration of the Vmpi class as the Vmpi structure.

Author:
Michael Holst

Function Documentation

int Vmpi_barr ( Vmpi thee)

An MPI barrier.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
int Vmpi_bcast ( Vmpi thee,
char *  buf,
int  bufsize 
)

An MPI broadcast.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
bufbuffer containing message
bufsizenumber of items (of declared type) in buffer
Vmpi* Vmpi_ctor ( void  )

The Vmpi constructor.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
void Vmpi_dtor ( Vmpi **  thee)

The Vmpi destructor.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
None
Parameters:
theePointer to pointer of the Vmpi object
int Vmpi_finalize ( void  )

The Vmp finalizer.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
int Vmpi_init ( int *  argc,
char ***  argv 
)

The Vmp initializer.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
argcnumber of the command line arguments
argvthe command line arguments
int Vmpi_isend ( Vmpi thee,
int  des,
char *  buf,
int  bufsize 
)

An MPI non-blocking send.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
desrank of receiving processor
bufbuffer containing message
bufsizenumber of items (of declared type) in buffer
int Vmpi_rank ( Vmpi thee)

Return my processor ID.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
int Vmpi_recv ( Vmpi thee,
int  src,
char *  buf,
int  bufsize 
)

An MPI blocking receive.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
srcrank of receiving processor
bufbuffer containing message
bufsizenumber of items (of declared type) in buffer
int Vmpi_reduce ( Vmpi thee,
char *  sbuf,
char *  rbuf,
int  bufsize 
)

An MPI reduce.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
sbufaddress of send buffer (choice)
rbufaddress of receiving buffer (choice)
bufsizenumber of items (of declared type) in buffer
int Vmpi_send ( Vmpi thee,
int  des,
char *  buf,
int  bufsize 
)

An MPI blocking send.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object
desrank of receiving processor
bufbuffer containing message
bufsizenumber of items (of declared type) in buffer
int Vmpi_size ( Vmpi thee)

Return the number of processors involved.

Author:
Michael Holst
Note:
Class Vmpi: Non-inlineable method (vmpi.c)
Returns:
Success enumeration
Parameters:
theePointer to the Vmpi object