Opm::Mpi::detail::Packing< true, T > Struct Template Reference

Packaging for pod data. More...

#include <MPIPacker.hpp>

Static Public Member Functions

static std::size_t packSize (const T &data, Parallel::MPIComm comm)
 Calculates the pack size for a POD. More...
 
static std::size_t packSize (const T *, std::size_t n, Parallel::MPIComm comm)
 Calculates the pack size for an array of POD. More...
 
static void pack (const T &data, std::vector< char > &buffer, int &position, Parallel::MPIComm comm)
 Pack a POD. More...
 
static void pack (const T *data, std::size_t n, std::vector< char > &buffer, int &position, Parallel::MPIComm comm)
 Pack an array of POD. More...
 
static void unpack (T &data, std::vector< char > &buffer, int &position, Parallel::MPIComm comm)
 Unpack a POD. More...
 
static void unpack (T *data, std::size_t n, std::vector< char > &buffer, int &position, Parallel::MPIComm comm)
 Unpack an array of POD. More...
 

Detailed Description

template<class T>
struct Opm::Mpi::detail::Packing< true, T >

Packaging for pod data.

Member Function Documentation

◆ pack() [1/2]

template<class T >
static void Opm::Mpi::detail::Packing< true, T >::pack ( const T &  data,
std::vector< char > &  buffer,
int &  position,
Parallel::MPIComm  comm 
)
inlinestatic

Pack a POD.

Parameters
dataThe variable to pack
bufferBuffer to pack into
positionPosition in buffer to use
commThe communicator to use

References Opm::Mpi::detail::Packing< pod, T >::pack().

◆ pack() [2/2]

template<class T >
static void Opm::Mpi::detail::Packing< true, T >::pack ( const T *  data,
std::size_t  n,
std::vector< char > &  buffer,
int &  position,
Parallel::MPIComm  comm 
)
inlinestatic

Pack an array of POD.

Parameters
dataThe array to pack
nLength of array
bufferBuffer to pack into
positionPosition in buffer to use
commThe communicator to use

References Opm::detail::getType().

◆ packSize() [1/2]

template<class T >
static std::size_t Opm::Mpi::detail::Packing< true, T >::packSize ( const T &  data,
Parallel::MPIComm  comm 
)
inlinestatic

Calculates the pack size for a POD.

Parameters
dataThe data to pack
commThe communicator to use

References Opm::Mpi::detail::Packing< pod, T >::packSize().

◆ packSize() [2/2]

template<class T >
static std::size_t Opm::Mpi::detail::Packing< true, T >::packSize ( const T *  ,
std::size_t  n,
Parallel::MPIComm  comm 
)
inlinestatic

Calculates the pack size for an array of POD.

Parameters
dataThe array to pack
nLength of array
commThe communicator to use

References Opm::detail::getType().

◆ unpack() [1/2]

template<class T >
static void Opm::Mpi::detail::Packing< true, T >::unpack ( T &  data,
std::vector< char > &  buffer,
int &  position,
Parallel::MPIComm  comm 
)
inlinestatic

Unpack a POD.

Parameters
dataThe variable to unpack
bufferBuffer to unpack from
positionPosition in buffer to use
commThe communicator to use

References Opm::Mpi::detail::Packing< pod, T >::unpack().

◆ unpack() [2/2]

template<class T >
static void Opm::Mpi::detail::Packing< true, T >::unpack ( T *  data,
std::size_t  n,
std::vector< char > &  buffer,
int &  position,
Parallel::MPIComm  comm 
)
inlinestatic

Unpack an array of POD.

Parameters
dataThe array to unpack
nLength of array
bufferBuffer to unpack from
positionPosition in buffer to use
commThe communicator to use

References Opm::detail::getType().


The documentation for this struct was generated from the following file: