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

This class allows a vector of packable objects to be packed as though it were a packable object itself. More...

#include <packable_vector.h>

Public Member Functions

 packable_vector (std::vector< T > *packables, bool owned=true)
 
 packable_vector (const packable_vector &other)
 
 packable_vector ()
 
 ~packable_vector ()
 
packable_vectoroperator= (const packable_vector &other)
 Assignment. More...
 
int packed_size (MPI_Comm comm) const
 get the number of bytes required to pack this buffer. More...
 
void pack (void *buf, int bufsize, int *pos, MPI_Comm comm) const
 Pack onto an MPI buffer. More...
 

Static Public Member Functions

static packable_vector unpack (void *buf, int bufsize, int *pos, MPI_Comm comm)
 Unpack from an input buffer. More...
 

Public Attributes

boost::shared_ptr< std::vector
< T > > 
_packables
 

Detailed Description

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

This class allows a vector of packable objects to be packed as though it were a packable object itself.

Definition at line 23 of file packable_vector.h.

Constructor & Destructor Documentation

packable_vector ( std::vector< T > *  packables,
bool  owned = true 
)
inline

Definition at line 26 of file packable_vector.h.

packable_vector ( const packable_vector< T > &  other)
inline

Definition at line 35 of file packable_vector.h.

packable_vector ( )
inline

Definition at line 36 of file packable_vector.h.

~packable_vector ( )
inline

Definition at line 38 of file packable_vector.h.

Member Function Documentation

packable_vector& operator= ( const packable_vector< T > &  other)
inline

Assignment.

Definition at line 43 of file packable_vector.h.

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

Pack onto an MPI buffer.

Definition at line 65 of file packable_vector.h.

int packed_size ( MPI_Comm  comm) const
inline

get the number of bytes required to pack this buffer.

Definition at line 52 of file packable_vector.h.

static packable_vector unpack ( void *  buf,
int  bufsize,
int *  pos,
MPI_Comm  comm 
)
inlinestatic

Unpack from an input buffer.

Note that this creates a new vector.

Definition at line 77 of file packable_vector.h.

Member Data Documentation

boost::shared_ptr< std::vector<T> > _packables

Definition at line 24 of file packable_vector.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