99 #ifndef Foam_PstreamBuffers_H 100 #define Foam_PstreamBuffers_H 128 bool finishedSendsCalled_;
131 bool allowClearRecv_;
159 void finalExchange(
labelList& recvSizes,
const bool wait);
173 void finalExchangeGatherScatter(
const bool isGather,
const bool wait);
260 return finishedSendsCalled_;
267 return allowClearRecv_;
347 const bool wait =
true 366 const bool wait =
true 385 const bool wait =
true 401 const bool wait =
true 421 const bool wait =
true void size(const label n)
Older name for setAddressableSize.
int tag() const noexcept
The transfer message type.
commsTypes
Types of communications.
void finishedScatters(const bool wait=true)
Mark all sends to sub-procs as done.
Base class for input inter-processor communications stream (ie, parallel streams). Not to be used directly, thus contructors are protected.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An interval of (signed) integers defined by a start and a size.
IntRange< int > rangeType
Int ranges are used for MPI ranks (processes)
void clearRecv(const label proci)
Clear an individual receive buffer (eg, data not required)
IOstreamOption::streamFormat format() const noexcept
The associated buffer format (ascii | binary)
PstreamBuffers(const UPstream::commsTypes commsType, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Construct given comms type, message tag, communicator, IO format.
static int & msgType() noexcept
Message tag of standard messages.
labelList recvDataCounts() const
Number of unconsumed receive bytes for all processors. Must call finishedSends() or other finished...
static label worldComm
Default world communicator (all processors). May differ from globalComm if local worlds are in use...
label comm() const noexcept
Communicator.
bool allowClearRecv() const noexcept
Is clearStorage of individual receive buffer by external hooks allowed? (default: true) ...
bool hasSendData() const
True if any (local) send buffers have data.
void finishedSends(const bool wait=true)
Mark sends as done.
label sendDataCount(const label proci) const
Number of send bytes for the specified processor.
UPstream::rangeType subProcs() const noexcept
Range of sub-processes indices associated with PstreamBuffers.
~PstreamBuffers()
Destructor - checks that all data have been consumed.
label recvDataCount(const label proci) const
Number of unconsumed receive bytes for the specified processor. Must call finishedSends() or other fi...
void finishedNeighbourSends(const labelUList &neighProcs, const bool wait=true)
Mark sends as done using subset of send/recv ranks and recover the sizes (bytes) received.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
UPstream::commsTypes commsType() const noexcept
The communications type of the stream.
void finishedGathers(const bool wait=true)
Mark all sends to master as done.
bool finished() const noexcept
True if finishedSends() or finishedNeighbourSends() has been called.
void clear()
Clear individual buffers and reset states.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
streamFormat
Data format (ascii | binary)
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
void clearStorage()
Clear individual buffer storage and reset states.
List< label > labelList
A List of labels.
Base class for output inter-processor communications stream (ie, parallel streams). Not to be used directly, thus contructors are protected.
bool hasRecvData() const
True if any (local) recv buffers have unconsumed data. Must call finishedSends() or other finished...
const UList< char > peekRecvData(const label proci) const
Number of unconsumed receive bytes for the specified processor. Must call finishedSends() or other fi...
UPstream::rangeType allProcs() const noexcept
Range of ranks indices associated with PstreamBuffers.