|
dune-common 2.8.0
|
Loading...
Searching...
No Matches
mpipack.hh
Go to the documentation of this file.
33 MPI_Comm _comm;
Interface class to translate objects to a MPI_Datatype, void* and size used for MPI calls.
Implements an utility class that provides MPI's collective communication methods.
STL namespace.
Collective communication interface and sequential default implementation.
Definition communication.hh:98
Definition mpidata.hh:48
Definition mpipack.hh:30
friend MPIPack & operator>>(MPIPack &p, T &t)
Unpacks data from the object.
Definition mpipack.hh:117
friend MPIPack & operator<<(MPIPack &p, const T &t)
Packs the data into the object. Enlarges the internal buffer if necessary.
Definition mpipack.hh:110
friend bool operator!=(const MPIPack &a, const MPIPack &b)
Definition mpipack.hh:187
size_t size() const
Returns the size of the internal buffer.
Definition mpipack.hh:151
MPIPack & operator=(const MPIPack &other)=delete
MPIPack(Communication< MPI_Comm > comm, std::size_t size=0)
Definition mpipack.hh:38
void pack(const T &data)
Packs the data into the object. Enlarges the internal buffer if necessary.
Definition mpipack.hh:56
auto unpack(T &data) -> std::enable_if_t<!decltype(getMPIData(data))::static_size, void >
Unpacks data from the object.
Definition mpipack.hh:93
auto unpack(T &data) -> std::enable_if_t< decltype(getMPIData(data))::static_size, void >
Unpacks data from the object.
Definition mpipack.hh:79
friend bool operator==(const MPIPack &a, const MPIPack &b)
Definition mpipack.hh:184
MPIPack(const MPIPack &)=delete
void seek(int p)
Sets the position in the buffer where the next pack/unpack operation should take place.
Definition mpipack.hh:158
bool eof() const
Checks whether the end of the buffer is reached.
Definition mpipack.hh:171
int tell() const
Gets the position in the buffer where the next pack/unpack operation should take place.
Definition mpipack.hh:165
MPIPack(MPIPack &&)=default
static int getPackSize(int len, const MPI_Comm &comm, const MPI_Datatype &dt)
Returns the size of the data needed to store the data in an MPIPack. See MPI_Pack_size.
Definition mpipack.hh:178
MPIPack & write(const T &t)
Packs the data into the object. Enlarges the internal buffer if necessary.
Definition mpipack.hh:131
MPI_Datatype type() const
Definition mpipack.hh:211
MPIData(P &t)
Definition mpipack.hh:197
int size()
Definition mpipack.hh:207
void * ptr()
Definition mpipack.hh:203
P & data_
Definition mpipack.hh:219
void resize(int size)
Definition mpipack.hh:215
T data(T... args)
T resize(T... args)
T size(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8