My Project
|
Struct handling packing of serialization for MPI communication. More...
#include <MPIPacker.hpp>
Public Member Functions | |
Packer (Parallel::Communication comm) | |
Constructor. | |
template<class T > | |
std::size_t | packSize (const T &data) const |
Calculates the pack size for a variable. | |
template<class T > | |
std::size_t | packSize (const T *data, std::size_t n) const |
Calculates the pack size for an array. | |
template<class T > | |
void | pack (const T &data, std::vector< char > &buffer, int &position) const |
Pack a variable. | |
template<class T > | |
void | pack (const T *data, std::size_t n, std::vector< char > &buffer, int &position) const |
Pack an array. | |
template<class T > | |
void | unpack (T &data, std::vector< char > &buffer, int &position) const |
Unpack a variable. | |
template<class T > | |
void | unpack (T *data, std::size_t n, std::vector< char > &buffer, int &position) const |
Unpack an array. | |
Struct handling packing of serialization for MPI communication.
|
inline |
Constructor.
comm | The communicator to use |
|
inline |
Pack a variable.
T | The type of the data to be packed |
data | The variable to pack |
buffer | Buffer to pack into |
position | Position in buffer to use |
|
inline |
Pack an array.
T | The type of the data to be packed |
data | The array to pack |
n | Length of array |
buffer | Buffer to pack into |
position | Position in buffer to use |
Calculates the pack size for a variable.
T | The type of the data to be packed |
data | The data to pack |
|
inline |
Calculates the pack size for an array.
T | The type of the data to be packed |
data | The array to pack |
n | Length of array |
|
inline |
Unpack a variable.
T | The type of the data to be unpacked |
data | The variable to unpack |
buffer | Buffer to unpack from |
position | Position in buffer to use |
|
inline |
Unpack an array.
T | The type of the data to be unpacked |
data | The array to unpack |
n | Length of array |
buffer | Buffer to unpack from |
position | Position in buffer to use |