Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
MPI implementation of CommRequest<int>. More...
#include <Teuchos_Details_MpiCommRequest.hpp>
Inherits MpiCommRequestBase< int >.
Public Member Functions | |
MpiCommRequest (MPI_Request rawMpiRequest, const ArrayRCP< const char > &buffer) | |
Constructor. More... | |
virtual | ~MpiCommRequest () |
Destructor; cancels the request if it is still pending. More... | |
Private Member Functions | |
MpiCommRequest () | |
MpiCommRequest (const MpiCommRequest &) | |
MpiCommRequest & | operator= (const MpiCommRequest &) |
Private Attributes | |
ArrayRCP< const char > | buffer_ |
The buffer for the nonblocking communication operation. More... | |
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 16 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.
|
private |
|
private |
|
private |
|
private |
The buffer for the nonblocking communication operation.
Definition at line 64 of file Teuchos_Details_MpiCommRequest.hpp.