Muster
 All Classes Namespaces Files Functions Variables Typedefs Macros
id_pair< T > Struct Template Reference

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

#include <id_pair.h>

Public Types

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

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. More...
 
size_t id
 Id of the rank where element came from. More...
 

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 59 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 64 of file id_pair.h.

Constructor & Destructor Documentation

id_pair ( )
inline

Definition at line 66 of file id_pair.h.

id_pair ( const T &  elt,
size_t  _id 
)
inline

Definition at line 67 of file id_pair.h.

Member Function Documentation

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

Definition at line 73 of file id_pair.h.

int packed_size ( MPI_Comm  comm) const
inline

Definition at line 69 of file id_pair.h.

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

Definition at line 78 of file id_pair.h.

Member Data Documentation

T element

The object wrapped by this id_pair.

Definition at line 60 of file id_pair.h.

size_t id

Id of the rank where element came from.

Definition at line 61 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 Thu Sep 1 2016 using Doxygen 1.8.5