Output inter-processor communications stream. More...
Public Member Functions | |
OPstream (const commsTypes commsType, const int toProcNo, const label bufSize=0, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY) | |
![]() | |
ClassName ("Pstream") | |
Pstream (const commsTypes commsType, const label bufSize=0) | |
![]() | |
ClassName ("UPstream") | |
UPstream (const commsTypes commsType) | |
commsTypes | commsType () const noexcept |
commsTypes | commsType (const commsTypes ct) noexcept |
template<class T > | |
Foam::List< T > | listGatherValues (const T &localValue, const label comm) |
![]() | |
UOPstream (const commsTypes commsType, const int toProcNo, DynamicList< char > &sendBuf, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool sendAtDestruct=true, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY) | |
UOPstream (const int toProcNo, PstreamBuffers &buffers) | |
~UOPstream () | |
virtual ios_base::fmtflags | flags () const |
virtual bool | write (const token &tok) |
virtual Ostream & | write (const char c) |
virtual Ostream & | write (const char *str) |
virtual Ostream & | write (const word &str) |
virtual Ostream & | write (const string &str) |
virtual Ostream & | writeQuoted (const std::string &str, const bool quoted=true) |
virtual Ostream & | write (const int32_t val) |
virtual Ostream & | write (const int64_t val) |
virtual Ostream & | write (const floatScalar val) |
virtual Ostream & | write (const doubleScalar val) |
virtual Ostream & | write (const char *data, std::streamsize count) |
virtual Ostream & | writeRaw (const char *data, std::streamsize count) |
virtual bool | beginRawWrite (std::streamsize count) |
virtual bool | endRawWrite () |
virtual void | indent () |
virtual void | flush () |
virtual void | endl () |
virtual char | fill () const |
virtual char | fill (const char) |
virtual int | width () const |
virtual int | width (const int) |
virtual int | precision () const |
virtual int | precision (const int) |
ios_base::fmtflags | flags (const ios_base::fmtflags) |
void | print (Ostream &os) const |
![]() | |
Ostream (const Ostream &)=default | |
virtual | ~Ostream ()=default |
Ostream (IOstreamOption streamOpt=IOstreamOption()) | |
Ostream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
virtual Ostream & | write (const keyType &kw) |
unsigned short | indentSize () const noexcept |
unsigned short | indentSize (unsigned short val) noexcept |
unsigned short | indentLevel () const noexcept |
unsigned short | indentLevel (unsigned short val) noexcept |
void | incrIndent () noexcept |
void | decrIndent () |
virtual Ostream & | writeKeyword (const keyType &kw) |
virtual Ostream & | beginBlock (const keyType &kw) |
virtual Ostream & | beginBlock () |
virtual Ostream & | endBlock () |
virtual Ostream & | endEntry () |
template<class T > | |
Ostream & | writeEntry (const keyType &key, const T &value) |
template<class T > | |
Ostream & | writeEntryIfDifferent (const word &key, const T &value1, const T &value2) |
Ostream & | operator() () const |
unsigned short & | indentLevel () noexcept |
unsigned short & | indentSize () noexcept |
![]() | |
IOstream (const IOstream &)=default | |
virtual | ~IOstream ()=default |
IOstream (IOstreamOption streamOpt=IOstreamOption()) | |
IOstream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
virtual const fileName & | name () const |
virtual fileName & | name () |
fileName | relativeName () const |
virtual bool | check (const char *operation) const |
bool | fatalCheck (const char *operation) const |
bool | opened () const noexcept |
bool | closed () const noexcept |
bool | good () const noexcept |
bool | eof () const noexcept |
bool | fail () const noexcept |
bool | bad () const noexcept |
operator bool () const noexcept | |
bool | operator! () const noexcept |
unsigned | labelByteSize () const noexcept |
unsigned | scalarByteSize () const noexcept |
void | setLabelByteSize (unsigned nbytes) noexcept |
void | setScalarByteSize (unsigned nbytes) noexcept |
template<class T = label> | |
std::enable_if< std::is_integral< T >::value, bool >::type | checkLabelSize () const noexcept |
template<class T = scalar> | |
std::enable_if< std::is_floating_point< T >::value, bool >::type | checkScalarSize () const noexcept |
label | lineNumber () const noexcept |
label & | lineNumber () noexcept |
label | lineNumber (const label num) noexcept |
void | setEof () noexcept |
void | setFail () noexcept |
void | setBad () |
ios_base::fmtflags | setf (const ios_base::fmtflags f) |
ios_base::fmtflags | setf (const ios_base::fmtflags f, const ios_base::fmtflags mask) |
void | unsetf (const ios_base::fmtflags f) |
void | print (Ostream &os, const int streamState) const |
InfoProxy< IOstream > | info () const |
![]() | |
constexpr | IOstreamOption (streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept |
constexpr | IOstreamOption (streamFormat fmt, compressionType comp, versionNumber ver) noexcept |
constexpr | IOstreamOption (streamFormat fmt, versionNumber ver, compressionType comp=compressionType::UNCOMPRESSED) noexcept |
IOstreamOption (const IOstreamOption &opt, streamFormat fmt) noexcept | |
streamFormat | format () const noexcept |
streamFormat | format (const streamFormat fmt) noexcept |
streamFormat | format (const word &formatName) |
compressionType | compression () const noexcept |
compressionType | compression (const compressionType comp) noexcept |
compressionType | compression (const word &compName) |
versionNumber | version () const noexcept |
versionNumber | version (const versionNumber ver) noexcept |
versionNumber | version (const token &tok) |
Additional Inherited Members | |
![]() | |
enum | commsTypes : char { blocking, scheduled, nonBlocking } |
typedef IntRange< int > | rangeType |
![]() | |
enum | streamAccess : char { CLOSED = 0, OPENED } |
![]() | |
enum | streamFormat : char { ASCII = 0, BINARY } |
enum | compressionType : char { UNCOMPRESSED = 0, COMPRESSED } |
![]() | |
template<class T , class BinaryOp > | |
static void | gather (const List< commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm) |
template<class T , class BinaryOp > | |
static void | gather (T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=Pstream::worldComm) |
template<class T > | |
static void | scatter (const List< commsStruct > &comms, T &Value, const int tag, const label comm) |
template<class T > | |
static void | scatter (T &Value, const int tag=Pstream::msgType(), const label comm=Pstream::worldComm) |
template<class T , class CombineOp > | |
static void | combineGather (const List< commsStruct > &comms, T &Value, const CombineOp &cop, const int tag, const label comm) |
template<class T , class CombineOp > | |
static void | combineGather (T &Value, const CombineOp &cop, const int tag=Pstream::msgType(), const label comm=Pstream::worldComm) |
template<class T > | |
static void | combineScatter (const List< commsStruct > &comms, T &Value, const int tag, const label comm) |
template<class T > | |
static void | combineScatter (T &Value, const int tag=Pstream::msgType(), const label comm=Pstream::worldComm) |
template<class T , class CombineOp > | |
static void | listCombineGather (const List< commsStruct > &comms, List< T > &Value, const CombineOp &cop, const int tag, const label comm) |
template<class T , class CombineOp > | |
static void | listCombineGather (List< T > &Value, const CombineOp &cop, const int tag=Pstream::msgType(), const label comm=Pstream::worldComm) |
template<class T > | |
static void | listCombineScatter (const List< commsStruct > &comms, List< T > &Value, const int tag, const label comm) |
template<class T > | |
static void | listCombineScatter (List< T > &Value, const int tag=Pstream::msgType(), const label comm=Pstream::worldComm) |
template<class Container , class CombineOp > | |
static void | mapCombineGather (const List< commsStruct > &comms, Container &Values, const CombineOp &cop, const int tag, const label comm) |
template<class Container , class CombineOp > | |
static void | mapCombineGather (Container &Values, const CombineOp &cop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) |
template<class Container > | |
static void | mapCombineScatter (const List< commsStruct > &comms, Container &Values, const int tag, const label comm) |
template<class Container > | |
static void | mapCombineScatter (Container &Values, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) |
template<class T > | |
static void | gatherList (const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm) |
template<class T > | |
static void | gatherList (List< T > &Values, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) |
template<class T > | |
static void | scatterList (const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm) |
template<class T > | |
static void | scatterList (List< T > &Values, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm) |
template<class Container , class T > | |
static void | exchange (const UList< Container > &sendData, const labelUList &recvSizes, List< Container > &recvData, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool block=true) |
template<class Container > | |
static void | exchangeSizes (const Container &sendData, labelList &sizes, const label comm=UPstream::worldComm) |
template<class Container , class T > | |
static void | exchange (const UList< Container > &sendData, List< Container > &recvData, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool block=true) |
![]() | |
static label | allocateCommunicator (const label parent, const labelList &subRanks, const bool doPstream=true) |
static void | freeCommunicator (const label communicator, const bool doPstream=true) |
static void | freeCommunicators (const bool doPstream) |
static int | baseProcNo (const label myComm, const int procID) |
static label | procNo (const label comm, const int baseProcID) |
static label | procNo (const label myComm, const label currentComm, const int currentProcID) |
static void | addValidParOptions (HashTable< string > &validParOptions) |
static bool | init (int &argc, char **&argv, const bool needsThread) |
static bool | initNull () |
static label | nRequests () |
static void | resetRequests (const label sz) |
static void | waitRequests (const label start=0) |
static void | waitRequest (const label i) |
static bool | finishedRequest (const label i) |
static int | allocateTag (const char *) |
static int | allocateTag (const word &) |
static void | freeTag (const char *, const int tag) |
static void | freeTag (const word &, const int tag) |
static bool | parRun (const bool on) noexcept |
static bool & | parRun () noexcept |
static bool | haveThreads () noexcept |
static label | nProcs (const label communicator=worldComm) |
static constexpr int | masterNo () noexcept |
static bool | master (const label communicator=worldComm) |
static int | myProcNo (const label communicator=worldComm) |
static label | parent (const label communicator) |
static List< int > & | procID (label communicator) |
static const wordList & | allWorlds () noexcept |
static const labelList & | worldIDs () noexcept |
static label | myWorldID () |
static const word & | myWorld () |
static rangeType | allProcs (const label communicator=worldComm) |
static rangeType | subProcs (const label communicator=worldComm) |
static const List< commsStruct > & | linearCommunication (const label communicator=worldComm) |
static const List< commsStruct > & | treeCommunication (const label communicator=worldComm) |
static int & | msgType () noexcept |
static void | shutdown (int errNo=0) |
static void | abort () |
static void | exit (int errNo=1) |
static void | allToAll (const labelUList &sendData, labelUList &recvData, const label communicator=worldComm) |
static void | allToAll (const char *sendData, const UList< int > &sendSizes, const UList< int > &sendOffsets, char *recvData, const UList< int > &recvSizes, const UList< int > &recvOffsets, const label communicator=worldComm) |
static void | mpiGather (const char *sendData, int sendSize, char *recvData, int recvSize, const label communicator=worldComm) |
static void | mpiScatter (const char *sendData, int sendSize, char *recvData, int recvSize, const label communicator=worldComm) |
static void | gather (const char *sendData, int sendSize, char *recvData, const UList< int > &recvSizes, const UList< int > &recvOffsets, const label communicator=worldComm) |
static void | scatter (const char *sendData, const UList< int > &sendSizes, const UList< int > &sendOffsets, char *recvData, int recvSize, const label communicator=worldComm) |
template<class T > | |
static List< T > | listGatherValues (const T &localValue, const label communicator=worldComm) |
template<class T > | |
static T | listScatterValues (const UList< T > &allValues, const label communicator=worldComm) |
static constexpr int | firstSlave () noexcept |
static int | lastSlave (const label communicator=worldComm) |
![]() | |
static bool | write (const commsTypes commsType, const int toProcNo, const char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=UPstream::worldComm) |
![]() | |
static unsigned int | defaultPrecision () noexcept |
static unsigned int | defaultPrecision (unsigned int prec) noexcept |
![]() | |
static streamFormat | formatEnum (const word &formatName, const streamFormat deflt=streamFormat::ASCII) |
static streamFormat | formatEnum (const word &key, const dictionary &dict, const streamFormat deflt=streamFormat::ASCII) |
static compressionType | compressionEnum (const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED) |
static compressionType | compressionEnum (const word &key, const dictionary &dict, const compressionType deflt=compressionType::UNCOMPRESSED) |
![]() | |
static const Enum< commsTypes > | commsTypeNames |
static bool | floatTransfer |
static int | nProcsSimpleSum |
static commsTypes | defaultCommsType |
static int | nPollProcInterfaces |
static int | maxCommsSize |
static const int | mpiBufferSize |
static label | worldComm |
static label | warnComm |
![]() | |
static unsigned int | precision_ |
![]() | |
static const Enum< streamFormat > | formatNames |
static const versionNumber | currentVersion |
![]() | |
void | setOpened () noexcept |
void | setClosed () noexcept |
void | setState (std::ios_base::iostate state) noexcept |
void | setGood () noexcept |
![]() | |
DynamicList< char > | transferBuf_ |
![]() | |
commsTypes | commsType_ |
![]() | |
unsigned short | indentSize_ = 4 |
unsigned short | indentLevel_ = 0 |
![]() | |
std::ios_base::iostate | ioState_ |
streamAccess | openClosed_ |
unsigned char | sizeofLabel_ |
unsigned char | sizeofScalar_ |
label | lineNumber_ |
![]() | |
static constexpr const unsigned short | entryIndentation_ = 16 |
![]() | |
static fileName | staticName_ |
Output inter-processor communications stream.
Definition at line 49 of file OPstream.H.
OPstream | ( | const commsTypes | commsType, |
const int | toProcNo, | ||
const label | bufSize = 0 , |
||
const int | tag = UPstream::msgType() , |
||
const label | comm = UPstream::worldComm , |
||
IOstreamOption::streamFormat | fmt = IOstreamOption::BINARY |
||
) |
Definition at line 27 of file OPstream.C.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.