Playa::MPIComm Class Reference

Object representation of an MPI communicator. More...

#include <PlayaMPIComm.hpp>

List of all members.

Public Member Functions

 MPIComm ()
 Empty constructor builds an object for MPI_COMM_WORLD.
int getRank () const
 Return process rank.
int getNProc () const
 Return number of processors in the communicator.
void synchronize () const
 Synchronize all the processors in the communicator.
Collective communications
void allToAll (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int recvCount, const MPIDataType &recvType) const
 All-to-all gather-scatter.
void allToAllv (void *sendBuf, int *sendCount, int *sendDisplacements, const MPIDataType &sendType, void *recvBuf, int *recvCount, int *recvDisplacements, const MPIDataType &recvType) const
 Variable-length gather-scatter.
void allReduce (void *input, void *result, int inputCount, const MPIDataType &type, const MPIOp &op) const
 Do a collective operation, scattering the results to all processors.
void gather (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int recvCount, const MPIDataType &recvType, int root) const
 Gather to root.
void gatherv (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int *recvCount, int *displacements, const MPIDataType &recvType, int root) const
 Gather variable-sized arrays to root.
void allGather (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int recvCount, const MPIDataType &recvType) const
 Gather to all processors.
void allGatherv (void *sendBuf, int sendCount, const MPIDataType &sendType, void *recvBuf, int *recvCount, int *recvDisplacements, const MPIDataType &recvType) const
 Variable-length gather to all processors.
void bcast (void *msg, int length, const MPIDataType &type, int src) const
 Broadcast.

Static Public Member Functions

static MPICommworld ()
 Get an object representing MPI_COMM_WORLD.
static MPICommself ()
 Get an object representing MPI_COMM_SELF.


Detailed Description

Object representation of an MPI communicator.

At present, groups are not implemented so the only communicators are MPI_COMM_WORLD and MPI_COMM_SELF

Definition at line 34 of file PlayaMPIComm.hpp.


Constructor & Destructor Documentation

Playa::MPIComm::MPIComm (  ) 

Empty constructor builds an object for MPI_COMM_WORLD.

Definition at line 18 of file PlayaMPIComm.cpp.


Member Function Documentation

MPIComm & Playa::MPIComm::world (  )  [static]

Get an object representing MPI_COMM_WORLD.

Definition at line 112 of file PlayaMPIComm.cpp.

MPIComm & Playa::MPIComm::self (  )  [static]

Get an object representing MPI_COMM_SELF.

Definition at line 119 of file PlayaMPIComm.cpp.

int Playa::MPIComm::getRank (  )  const [inline]

Return process rank.

Definition at line 52 of file PlayaMPIComm.hpp.

int Playa::MPIComm::getNProc (  )  const [inline]

Return number of processors in the communicator.

Definition at line 55 of file PlayaMPIComm.hpp.

void Playa::MPIComm::synchronize (  )  const

Synchronize all the processors in the communicator.

Definition at line 130 of file PlayaMPIComm.cpp.

void Playa::MPIComm::allToAll ( void *  sendBuf,
int  sendCount,
const MPIDataType sendType,
void *  recvBuf,
int  recvCount,
const MPIDataType recvType 
) const

All-to-all gather-scatter.

Definition at line 149 of file PlayaMPIComm.cpp.

void Playa::MPIComm::allToAllv ( void *  sendBuf,
int *  sendCount,
int *  sendDisplacements,
const MPIDataType sendType,
void *  recvBuf,
int *  recvCount,
int *  recvDisplacements,
const MPIDataType recvType 
) const

Variable-length gather-scatter.

Definition at line 183 of file PlayaMPIComm.cpp.

void Playa::MPIComm::allReduce ( void *  input,
void *  result,
int  inputCount,
const MPIDataType type,
const MPIOp op 
) const

Do a collective operation, scattering the results to all processors.

Definition at line 352 of file PlayaMPIComm.cpp.

void Playa::MPIComm::gather ( void *  sendBuf,
int  sendCount,
const MPIDataType sendType,
void *  recvBuf,
int  recvCount,
const MPIDataType recvType,
int  root 
) const

Gather to root.

Definition at line 219 of file PlayaMPIComm.cpp.

void Playa::MPIComm::gatherv ( void *  sendBuf,
int  sendCount,
const MPIDataType sendType,
void *  recvBuf,
int *  recvCount,
int *  displacements,
const MPIDataType recvType,
int  root 
) const

Gather variable-sized arrays to root.

Definition at line 246 of file PlayaMPIComm.cpp.

void Playa::MPIComm::allGather ( void *  sendBuf,
int  sendCount,
const MPIDataType sendType,
void *  recvBuf,
int  recvCount,
const MPIDataType recvType 
) const

Gather to all processors.

Definition at line 272 of file PlayaMPIComm.cpp.

void Playa::MPIComm::allGatherv ( void *  sendBuf,
int  sendCount,
const MPIDataType sendType,
void *  recvBuf,
int *  recvCount,
int *  recvDisplacements,
const MPIDataType recvType 
) const

Variable-length gather to all processors.

Definition at line 300 of file PlayaMPIComm.cpp.

void Playa::MPIComm::bcast ( void *  msg,
int  length,
const MPIDataType type,
int  src 
) const

Broadcast.

Definition at line 330 of file PlayaMPIComm.cpp.


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

doxygen