PackUnpack.h File Reference


Detailed Description

pack(field) and unpack(field, rcbp) are used to provide the user with a local 1D view of all the data in a field not including guard layers that belongs to the local processor.

The local data is returned from pack() in a RefCountedBlockPtr which can provide raw pointers to the data via the beginPointer member function. Currently pack and unpack copy the data to and from a separate block of memory. If we need to later, we can perform various optimizations under the hood. For example, if there is only one local patch, and the domain is correct (no guards and it doesn't have unused points because of the centering), we could return the RefCountedBlockPtr to the underlying brick data. Given that this function will typically be applied to compressed data, which we would need to uncompress anyway, the copy is probably not going to be expensive.

#include "Utilities/RefCountedBlockPtr.h"
#include "Engine/RemoteEngine.h"
#include "Pooma/Pooma.h"

Include dependency graph for PackUnpack.h:

This graph shows which files directly or indirectly include this file:


Classes

struct  PackLocalPatches< InputField >
struct  UnPackLocalPatches< InputField >

Functions

template<class InputField>
RefCountedBlockPtr< typename
InputField::Element_t > 
pack (const InputField &field)
template<class InputField, class T>
void unpack (const InputField &field, RefCountedBlockPtr< T > block)

Function Documentation

template<class InputField>
RefCountedBlockPtr<typename InputField::Element_t> pack ( const InputField &  field  )  [inline]

template<class InputField, class T>
void unpack ( const InputField &  field,
RefCountedBlockPtr< T >  block 
) [inline]


Generated on Sun May 17 21:40:42 2009 for FreePOOMA by  doxygen 1.5.5