Playa::MPIContainerComm< T > Class Template Reference

Object representation of an MPI communicator for templated containers. More...

List of all members.

Static Public Member Functions

static void bcast (T &x, int src, const MPIComm &comm)
 Broadcast a single object.
static void bcast (Array< T > &x, int src, const MPIComm &comm)
 Broadcast an array of objects.
static void bcast (Array< Array< T > > &x, int src, const MPIComm &comm)
 Broadcast an array of arrays.
static void allGather (const T &outgoing, Array< T > &incoming, const MPIComm &comm)
 Gather to all processors.
static void allToAll (const Array< T > &outgoing, Array< Array< T > > &incoming, const MPIComm &comm)
 All-to-all scatter/gather for an array of objects.
static void allToAll (const Array< Array< T > > &outgoing, Array< Array< T > > &incoming, const MPIComm &comm)
 All-to-all scatter/gather for an array of arrays.
static void gatherv (const Array< T > &outgoing, Array< Array< T > > &incoming, int rootRank, const MPIComm &comm)
static void accumulate (const T &localValue, Array< T > &sums, T &total, const MPIComm &comm)
 Sum local values from all processors with rank < myRank.

Static Private Member Functions

static void getBigArray (const Array< Array< T > > &x, Array< T > &bigArray, Array< int > &offsets)
 Build a 1D array and an offset list from a 2D array.
static void getSmallArrays (const Array< T > &bigArray, const Array< int > &offsets, Array< Array< T > > &x)
 Reassemble a 2D array from a 1D array and an offset table.


Detailed Description

template<class T>
class Playa::MPIContainerComm< T >

Object representation of an MPI communicator for templated containers.

Note:
Template specialization exists for std::string.
Author:
Kevin Long

Definition at line 24 of file PlayaMPIContainerComm.hpp.


Member Function Documentation

template<class T >
void Playa::MPIContainerComm< T >::accumulate ( const T &  localValue,
Array< T > &  sums,
T &  total,
const MPIComm comm 
) [inline, static]

Sum local values from all processors with rank < myRank.

Definition at line 355 of file PlayaMPIContainerComm.hpp.

References Playa::MPIContainerComm< T >::allGather(), and Playa::MPIComm::getNProc().

template<class T >
void Playa::MPIContainerComm< T >::allGather ( const T &  outgoing,
Array< T > &  incoming,
const MPIComm comm 
) [inline, static]

Gather to all processors.

Definition at line 337 of file PlayaMPIContainerComm.hpp.

References Playa::MPIComm::allGather(), and Playa::MPIComm::getNProc().

Referenced by Playa::MPIContainerComm< T >::accumulate().

template<class T >
void Playa::MPIContainerComm< T >::allToAll ( const Array< Array< T > > &  outgoing,
Array< Array< T > > &  incoming,
const MPIComm comm 
) [inline, static]

All-to-all scatter/gather for an array of arrays.

Definition at line 244 of file PlayaMPIContainerComm.hpp.

References Playa::MPIComm::allToAll(), Playa::MPIComm::allToAllv(), Playa::MPIComm::getNProc(), and Playa::MPIDataType::intType().

template<class T >
void Playa::MPIContainerComm< T >::allToAll ( const Array< T > &  outgoing,
Array< Array< T > > &  incoming,
const MPIComm comm 
) [inline, static]

All-to-all scatter/gather for an array of objects.

Definition at line 189 of file PlayaMPIContainerComm.hpp.

References Playa::MPIComm::allToAll(), and Playa::MPIComm::getNProc().

template<class T >
void Playa::MPIContainerComm< T >::bcast ( Array< Array< T > > &  x,
int  src,
const MPIComm comm 
) [inline, static]

template<class T >
void Playa::MPIContainerComm< T >::bcast ( Array< T > &  x,
int  src,
const MPIComm comm 
) [inline, static]

Broadcast an array of objects.

Definition at line 146 of file PlayaMPIContainerComm.hpp.

References Playa::MPIComm::bcast(), Playa::MPIContainerComm< T >::bcast(), and Playa::MPIComm::getRank().

template<class T >
void Playa::MPIContainerComm< T >::bcast ( T &  x,
int  src,
const MPIComm comm 
) [inline, static]

Broadcast a single object.

Definition at line 136 of file PlayaMPIContainerComm.hpp.

References Playa::MPIComm::bcast().

Referenced by Playa::MPIContainerComm< std::string >::bcast(), and Playa::MPIContainerComm< T >::bcast().

template<class T >
static void Playa::MPIContainerComm< T >::gatherv ( const Array< T > &  outgoing,
Array< Array< T > > &  incoming,
int  rootRank,
const MPIComm comm 
) [static]

Gatherv: gather arrays of data to the root processor

template<class T >
void Playa::MPIContainerComm< T >::getBigArray ( const Array< Array< T > > &  x,
Array< T > &  bigArray,
Array< int > &  offsets 
) [inline, static, private]

Build a 1D array and an offset list from a 2D array.

Definition at line 376 of file PlayaMPIContainerComm.hpp.

Referenced by Playa::MPIContainerComm< std::string >::bcast(), and Playa::MPIContainerComm< T >::bcast().

template<class T >
void Playa::MPIContainerComm< T >::getSmallArrays ( const Array< T > &  bigArray,
const Array< int > &  offsets,
Array< Array< T > > &  x 
) [inline, static, private]

Reassemble a 2D array from a 1D array and an offset table.

Definition at line 401 of file PlayaMPIContainerComm.hpp.

Referenced by Playa::MPIContainerComm< T >::bcast().

Site Contact