Teuchos - Trilinos Tools Package Version of the Day
|MpiCommRequest (MPI_Request rawMpiRequest, const ArrayRCP< const char > &buffer)|
|Destructor; cancels the request if it is still pending. |
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.
|const ArrayRCP< const char > &||buffer|
|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 |
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.