|
Teuchos - Trilinos Tools Package Version of the Day
|
MPI implementation of CommRequest<int>. More...
#include <Teuchos_Details_MpiCommRequest.hpp>
Public Member Functions | |
| MpiCommRequest (MPI_Request rawMpiRequest, const ArrayRCP< const char > &buffer) | |
| Constructor. | |
| virtual | ~MpiCommRequest () |
| Destructor; cancels the request if it is still pending. | |
Public Member Functions inherited from Teuchos::MpiCommRequestBase< int > | |
| MpiCommRequestBase () | |
| Default constructor. | |
| MpiCommRequestBase (MPI_Request rawMpiRequest) | |
| Constructor (from a raw MPI_Request). | |
| MPI_Request | releaseRawMpiRequest () |
| Return and relinquish ownership of the raw MPI_Request. | |
| bool | isNull () const |
Whether the raw MPI_Request is MPI_REQUEST_NULL. | |
| RCP< CommStatus< int > > | wait () |
| Wait on this communication request to complete. | |
| RCP< CommStatus< int > > | cancel () |
| Cancel the communication request, and return its status. | |
| virtual | ~MpiCommRequestBase () |
| Destructor; cancels the request if it is still pending. | |
Public Member Functions inherited from Teuchos::CommRequest< OrdinalType > | |
| virtual | ~CommRequest () |
| Destructor; cancels the request if it is still pending. | |
Public Member Functions inherited from Teuchos::Describable | |
| virtual std::string | description () const |
| Return a simple one-line description of this object. | |
| virtual void | describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
| Print the object with some verbosity level to a FancyOStream. | |
| void | describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const |
| Version of describe() that takes an std::ostream instead of a FancyOStream. | |
| virtual | ~Describable () |
| Destructor (marked virtual for memory safety of derived classes). | |
Public Member Functions inherited from Teuchos::LabeledObject | |
| LabeledObject () | |
| Construct with an empty label. | |
| virtual | ~LabeledObject () |
| virtual void | setObjectLabel (const std::string &objectLabel) |
| Set the object label (see LabeledObject). | |
| virtual std::string | getObjectLabel () const |
| Get the object label (see LabeledObject). | |
Additional Inherited Members | |
Static Public Attributes inherited from Teuchos::Describable | |
| static const EVerbosityLevel | verbLevel_default = VERB_DEFAULT |
Default value for the verbLevel argument of describe(). | |
Related Symbols inherited from Teuchos::Describable | |
| DescribableStreamManipulatorState | describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default) |
| Describable output stream manipulator. | |
| std::ostream & | operator<< (std::ostream &os, const DescribableStreamManipulatorState &d) |
| Output stream operator for Describable manipulator. | |
MPI implementation of CommRequest<int>.
This class wraps MPI_Request, which is MPI's reification of a nonblocking communication operation.
Users would not normally create an instance of this class. Calls to nonblocking communication operations (such as ireceive() or isend()) return a pointer to a CommRequest. If the Comm is an MpiComm, then the returned CommRequest is an MpiCommRequest.
Users might wish to create an MpiCommRequest directly if they want to encapsulate an MPI_Request returned by an external library or by their own code.
The releaseRawMpiRequest() method (inherited from the base class) does not free (decrement the reference count of) the buffer, because relinquishing ownership does not actually force the nonblocking operation to complete. The destructor will free the buffer automatically.
Definition at line 38 of file Teuchos_Details_MpiCommRequest.hpp.
| Teuchos::Details::MpiCommRequest::MpiCommRequest | ( | MPI_Request | rawMpiRequest, |
| const ArrayRCP< const char > & | buffer | ||
| ) |
Constructor.
| rawMpiRequest | [in/out] Raw MPI_Request created by the nonblocking communication operation. |
| buffer | [in] Buffer used by the nonblocking communication operation. We keep this only to delay its deallocation until after the communication operation completes. This may be null if the message length is zero or if rawMpiRequest is MPI_REQUEST_NULL. |
We do not template the buffer type on the Packet type (the type of the data being communicated). You must do an rcp_reinterpret_cast on input of the buffer. We require this because this class does not need to access the buffer; it merely needs to retain a reference to prevent premature deallocation.
Definition at line 15 of file Teuchos_Details_MpiCommRequest.cpp.
|
virtual |
Destructor; cancels the request if it is still pending.
Definition at line 22 of file Teuchos_Details_MpiCommRequest.cpp.