Input inter-processor communications stream operating on external buffer. More...
Public Member Functions | |
UIPstream (const commsTypes commsType, const int fromProcNo, DynamicList< char > &receiveBuf, label &receiveBufPosition, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm, const bool clearAtEnd=false, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY) | |
UIPstream (const int fromProcNo, PstreamBuffers &buffers) | |
~UIPstream () | |
ios_base::fmtflags | flags () const |
Istream & | read (token &t) |
Istream & | read (char &c) |
Istream & | read (word &str) |
Istream & | read (string &str) |
Istream & | read (label &val) |
Istream & | read (floatScalar &val) |
Istream & | read (doubleScalar &val) |
Istream & | read (char *data, std::streamsize count) |
Istream & | readRaw (char *data, std::streamsize count) |
bool | beginRawRead () |
bool | endRawRead () |
void | rewind () |
ios_base::fmtflags | flags (const ios_base::fmtflags) |
void | print (Ostream &os) const |
![]() | |
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) |
![]() | |
Istream (const Istream &)=default | |
virtual | ~Istream ()=default |
Istream (IOstreamOption streamOpt=IOstreamOption()) | |
Istream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED) | |
const token & | peekBack () const noexcept |
bool | peekBack (token &tok) |
void | putBack (const token &tok) |
bool | getBack (token &tok) |
bool | readBegin (const char *funcName) |
bool | readEnd (const char *funcName) |
char | readBeginList (const char *funcName) |
char | readEndList (const char *funcName) |
Istream & | operator() () const |
![]() | |
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) |
Static Public Member Functions | |
static label | read (const commsTypes commsType, const int fromProcNo, char *buf, const std::streamsize bufSize, const int tag=UPstream::msgType(), const label communicator=UPstream::worldComm) |
![]() | |
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 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) |
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 } |
![]() | |
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 |
![]() | |
bool | hasPutback () const noexcept |
![]() | |
void | setOpened () noexcept |
void | setClosed () noexcept |
void | setState (std::ios_base::iostate state) noexcept |
void | setGood () noexcept |
![]() | |
commsTypes | commsType_ |
![]() | |
std::ios_base::iostate | ioState_ |
streamAccess | openClosed_ |
unsigned char | sizeofLabel_ |
unsigned char | sizeofScalar_ |
label | lineNumber_ |
![]() | |
static fileName | staticName_ |
Input inter-processor communications stream operating on external buffer.
Definition at line 52 of file UIPstream.H.
UIPstream | ( | const commsTypes | commsType, |
const int | fromProcNo, | ||
DynamicList< char > & | receiveBuf, | ||
label & | receiveBufPosition, | ||
const int | tag = UPstream::msgType() , |
||
const label | comm = UPstream::worldComm , |
||
const bool | clearAtEnd = false , |
||
IOstreamOption::streamFormat | fmt = IOstreamOption::BINARY |
||
) |
Definition at line 31 of file UIPread.C.
References NotImplemented.
UIPstream | ( | const int | fromProcNo, |
PstreamBuffers & | buffers | ||
) |
Definition at line 56 of file UIPread.C.
References NotImplemented.
~UIPstream | ( | ) |
Definition at line 140 of file UIPstream.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.
|
inlinevirtual |
Implements IOstream.
Definition at line 126 of file UIPstream.H.
|
static |
Definition at line 75 of file UIPread.C.
References NotImplemented.
Referenced by mapDistributeBase::compact(), Pstream::gather(), Pstream::gatherList(), masterUncollatedFileOperation::NewIFstream(), masterUncollatedFileOperation::read(), Pstream::scatter(), Pstream::scatterList(), syncTools::syncBoundaryFaceList(), syncTools::syncFaceList(), and OFstreamCollator::write().
|
virtual |
Implements Istream.
Definition at line 159 of file UIPstream.C.
References token::ASSIGN, token::BEGIN_BLOCK, token::BEGIN_LIST, token::BEGIN_SQR, Foam::constant::universal::c, Foam::charToWord(), token::COLON, token::COMMA, token::DIVIDE, token::END_BLOCK, token::END_LIST, token::END_SQR, token::END_STATEMENT, token::FLAG, token::flagToken(), Istream::getBack(), token::compound::isCompound(), token::isFlag(), token::lineNumber(), token::MINUS, token::MULTIPLY, token::compound::New(), token::PLUS, Foam::processFlags(), Foam::read(), token::setBad(), and token::setType().
|
virtual |
Implements Istream.
Definition at line 337 of file UIPstream.C.
References Foam::constant::universal::c.
|
virtual |
Implements Istream.
Definition at line 346 of file UIPstream.C.
|
virtual |
Implements Istream.
Definition at line 352 of file UIPstream.C.
|
virtual |
Implements Istream.
Definition at line 358 of file UIPstream.C.
|
virtual |
Implements Istream.
Definition at line 365 of file UIPstream.C.
|
virtual |
Implements Istream.
Definition at line 372 of file UIPstream.C.
|
virtual |
Implements Istream.
Definition at line 379 of file UIPstream.C.
References Foam::BitOps::count().
|
virtual |
Implements Istream.
Definition at line 394 of file UIPstream.C.
References Foam::BitOps::count().
|
virtual |
Implements Istream.
Definition at line 405 of file UIPstream.C.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and format().
|
inlinevirtual |
Implements Istream.
Definition at line 177 of file UIPstream.H.
|
virtual |
Implements Istream.
Definition at line 423 of file UIPstream.C.
|
inlinevirtual |
Implements IOstream.
Definition at line 189 of file UIPstream.H.
|
virtual |
Reimplemented from IOstream.
Definition at line 429 of file UIPstream.C.
References Foam::endl(), and os().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.