#include "Utilities/RefCountedBlockPtr.h"
#include "Engine/RemoteEngine.h"
#include "Pooma/Pooma.h"
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) |
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.
RefCountedBlockPtr<typename InputField::Element_t> pack | ( | const InputField & | field | ) | [inline] |
void unpack | ( | const InputField & | field, | |
RefCountedBlockPtr< T > | block | |||
) | [inline] |