Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

id_pair< T > Struct Template Reference

MPI-packable struct for an MPI-packable type plus its object id. More...

#include <id_pair.h>

List of all members.

Public Types

typedef std::vector< id_pair< T > > vector
 Template typedef for declaring vectors of id_pair<T>

Public Member Functions

 id_pair ()
 id_pair (const T &elt, size_t _id)
int packed_size (MPI_Comm comm) const
void pack (void *buf, int bufsize, int *position, MPI_Comm comm) const

Static Public Member Functions

static id_pair unpack (void *buf, int bufsize, int *position, MPI_Comm comm)

Public Attributes

element
 The object wrapped by this id_pair.
size_t id
 Id of the rank where element came from.

Detailed Description

template<class T>
struct cluster::id_pair< T >

MPI-packable struct for an MPI-packable type plus its object id.

Each id_pair<T> has an element and an id for that element and supports packed_size(), pack(), and unpack() methods for transferring these things with MPI.

Template Parameters:
TType of contained element. T Must support MPI pack(), packed_size(), and unpack() methods.

Definition at line 55 of file id_pair.h.


Member Typedef Documentation

typedef std::vector< id_pair<T> > vector

Template typedef for declaring vectors of id_pair<T>

Definition at line 47 of file id_pair.h.


Constructor & Destructor Documentation

id_pair (  ) [inline]

Definition at line 49 of file id_pair.h.

id_pair ( const T &  elt,
size_t  _id 
) [inline]

Definition at line 50 of file id_pair.h.


Member Function Documentation

void pack ( void *  buf,
int  bufsize,
int *  position,
MPI_Comm  comm 
) const [inline]

Definition at line 56 of file id_pair.h.

int packed_size ( MPI_Comm  comm ) const [inline]

Definition at line 52 of file id_pair.h.

static id_pair unpack ( void *  buf,
int  bufsize,
int *  position,
MPI_Comm  comm 
) [inline, static]

Definition at line 61 of file id_pair.h.


Member Data Documentation

The object wrapped by this id_pair.

Definition at line 43 of file id_pair.h.

size_t id

Id of the rank where element came from.

Definition at line 44 of file id_pair.h.


The documentation for this struct was generated from the following file:
Muster. Copyright © 2010, Lawrence Livermore National Laboratory, LLNL-CODE-433662.
Distribution of Muster and its documentation is subject to terms of the Muster LICENSE.
Generated on Mon Dec 20 2010 using Doxygen 1.7.2