40#ifndef Foam_IPstream_H
41#define Foam_IPstream_H
68 const int bufferSize = 0,
148 template<
class Type,
class... Args>
151 const int communicator,
streamFormat
Data format (ascii | binary | coherent).
static void recv(Type &value, const int communicator=UPstream::worldComm)
Receive (from broadcast, root == UPstream::masterNo()) and deserialize a value. Uses operator>> for d...
IPBstream(const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct with optional communicator and read format. Uses UPstream::masterNo() root.
static void recvs(const int communicator, Type &value, Args &&... values)
Receive (from broadcast) a buffer and deserialize multiple items. Uses operator>> for de-serializatio...
static void recv(Type &value, const int fromProcNo, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Receive and deserialize a value. Uses operator>> for de-serialization.
IPstream(const UPstream::commsTypes commsType, const int fromProcNo, const int bufferSize=0, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct given process index to read from.
Pstream(const UPstream::commsTypes commsType) noexcept
Construct for communication type with empty buffer.
UIPBstream(DynamicList< char > &receiveBuf, label &receiveBufPosition, const int communicator=UPstream::worldComm, const bool clearAtEnd=false, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct using the given attached receive buffer,.
UIPstream(const UPstream::commsTypes commsType, const int fromProcNo, DynamicList< char > &receiveBuf, label &receiveBufPosition, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, const bool clearAtEnd=false, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct given process index to read from using the given attached receive buffer,...
Wrapper for internally indexed communicator label. Always invokes UPstream::allocateCommunicatorCompo...
commsTypes
Communications types.
@ scheduled
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
static int & msgType() noexcept
Message tag of standard messages.
commsTypes commsType() const noexcept
Get the communications type of the stream.
static label worldComm
Communicator for all ranks. May differ from commGlobal() if local worlds are in use.
void inputLoop(IS &is, Type &arg1, Args &&... args)
Input looping. Read into first parameter and recurse.