|
dune-common 2.11
|
Loading...
Searching...
No Matches
mpipack.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
39 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:100
Definition mpidata.hh:51
Definition mpipack.hh:36
friend MPIPack & operator>>(MPIPack &p, T &t)
Unpacks data from the object.
Definition mpipack.hh:123
friend MPIPack & operator<<(MPIPack &p, const T &t)
Packs the data into the object. Enlarges the internal buffer if necessary.
Definition mpipack.hh:116
friend bool operator!=(const MPIPack &a, const MPIPack &b)
Definition mpipack.hh:193
size_t size() const
Returns the size of the internal buffer.
Definition mpipack.hh:157
MPIPack & operator=(const MPIPack &other)=delete
MPIPack(Communication< MPI_Comm > comm, std::size_t size=0)
Definition mpipack.hh:44
void pack(const T &data)
Packs the data into the object. Enlarges the internal buffer if necessary.
Definition mpipack.hh:62
auto unpack(T &data) -> std::enable_if_t<!decltype(getMPIData(data))::static_size, void >
Unpacks data from the object.
Definition mpipack.hh:99
auto unpack(T &data) -> std::enable_if_t< decltype(getMPIData(data))::static_size, void >
Unpacks data from the object.
Definition mpipack.hh:85
friend bool operator==(const MPIPack &a, const MPIPack &b)
Definition mpipack.hh:190
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:164
bool eof() const
Checks whether the end of the buffer is reached.
Definition mpipack.hh:177
int tell() const
Gets the position in the buffer where the next pack/unpack operation should take place.
Definition mpipack.hh:171
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:184
MPIPack & write(const T &t)
Packs the data into the object. Enlarges the internal buffer if necessary.
Definition mpipack.hh:137
MPI_Datatype type() const
Definition mpipack.hh:217
MPIData(P &t)
Definition mpipack.hh:203
int size()
Definition mpipack.hh:213
void * ptr()
Definition mpipack.hh:209
P & data_
Definition mpipack.hh:225
void resize(int size)
Definition mpipack.hh:221
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