Struct handling packing of serialization for MPI communication.
More...
#include <MPIPacker.hpp>
|
| Packer (Parallel::Communication comm) |
| Constructor. More...
|
|
template<class T > |
std::size_t | packSize (const T &data) const |
| Calculates the pack size for a variable. More...
|
|
template<class T > |
std::size_t | packSize (const T *data, std::size_t n) const |
| Calculates the pack size for an array. More...
|
|
template<class T > |
void | pack (const T &data, std::vector< char > &buffer, std::size_t &position) const |
| Pack a variable. More...
|
|
template<class T > |
void | pack (const T *data, std::size_t n, std::vector< char > &buffer, std::size_t &position) const |
| Pack an array. More...
|
|
template<class T > |
void | unpack (T &data, const std::vector< char > &buffer, std::size_t &position) const |
| Unpack a variable. More...
|
|
template<class T > |
void | unpack (T *data, std::size_t n, const std::vector< char > &buffer, std::size_t &position) const |
| Unpack an array. More...
|
|
Struct handling packing of serialization for MPI communication.
◆ Packer()
Constructor.
- Parameters
-
comm | The communicator to use |
◆ pack() [1/2]
template<class T >
void Opm::Mpi::Packer::pack |
( |
const T & |
data, |
|
|
std::vector< char > & |
buffer, |
|
|
std::size_t & |
position |
|
) |
| const |
|
inline |
Pack a variable.
- Template Parameters
-
T | The type of the data to be packed |
- Parameters
-
data | The variable to pack |
buffer | Buffer to pack into |
position | Position in buffer to use |
References pack().
Referenced by pack().
◆ pack() [2/2]
template<class T >
void Opm::Mpi::Packer::pack |
( |
const T * |
data, |
|
|
std::size_t |
n, |
|
|
std::vector< char > & |
buffer, |
|
|
std::size_t & |
position |
|
) |
| const |
|
inline |
Pack an array.
- Template Parameters
-
T | The type of the data to be packed |
- Parameters
-
data | The array to pack |
n | Length of array |
buffer | Buffer to pack into |
position | Position in buffer to use |
References Opm::Mpi::detail::Packing< pod, T >::pack().
◆ packSize() [1/2]
template<class T >
std::size_t Opm::Mpi::Packer::packSize |
( |
const T & |
data | ) |
const |
|
inline |
Calculates the pack size for a variable.
- Template Parameters
-
T | The type of the data to be packed |
- Parameters
-
References packSize().
Referenced by packSize().
◆ packSize() [2/2]
template<class T >
std::size_t Opm::Mpi::Packer::packSize |
( |
const T * |
data, |
|
|
std::size_t |
n |
|
) |
| const |
|
inline |
◆ unpack() [1/2]
template<class T >
void Opm::Mpi::Packer::unpack |
( |
T & |
data, |
|
|
const std::vector< char > & |
buffer, |
|
|
std::size_t & |
position |
|
) |
| const |
|
inline |
Unpack a variable.
- Template Parameters
-
T | The type of the data to be unpacked |
- Parameters
-
data | The variable to unpack |
buffer | Buffer to unpack from |
position | Position in buffer to use |
References unpack().
Referenced by unpack().
◆ unpack() [2/2]
template<class T >
void Opm::Mpi::Packer::unpack |
( |
T * |
data, |
|
|
std::size_t |
n, |
|
|
const std::vector< char > & |
buffer, |
|
|
std::size_t & |
position |
|
) |
| const |
|
inline |
Unpack an array.
- Template Parameters
-
T | The type of the data to be unpacked |
- Parameters
-
data | The array to unpack |
n | Length of array |
buffer | Buffer to unpack from |
position | Position in buffer to use |
References Opm::Mpi::detail::Packing< pod, T >::unpack().
The documentation for this struct was generated from the following file: