Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Teuchos::Details::MpiCommRequest Class Reference

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 &)
 
MpiCommRequestoperator= (const MpiCommRequest &)
 

Private Attributes

ArrayRCP< const char > buffer_
 The buffer for the nonblocking communication operation. More...
 

Detailed Description

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 70 of file Teuchos_Details_MpiCommRequest.hpp.

Constructor & Destructor Documentation

Teuchos::Details::MpiCommRequest::MpiCommRequest ( MPI_Request  rawMpiRequest,
const ArrayRCP< const char > &  buffer 
)

Constructor.

Parameters
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 48 of file Teuchos_Details_MpiCommRequest.cpp.

Teuchos::Details::MpiCommRequest::~MpiCommRequest ( )
virtual

Destructor; cancels the request if it is still pending.

Definition at line 54 of file Teuchos_Details_MpiCommRequest.cpp.

Teuchos::Details::MpiCommRequest::MpiCommRequest ( )
private
Teuchos::Details::MpiCommRequest::MpiCommRequest ( const MpiCommRequest )
private

Member Function Documentation

MpiCommRequest& Teuchos::Details::MpiCommRequest::operator= ( const MpiCommRequest )
private

Member Data Documentation

ArrayRCP<const char> Teuchos::Details::MpiCommRequest::buffer_
private

The buffer for the nonblocking communication operation.

Definition at line 96 of file Teuchos_Details_MpiCommRequest.hpp.


The documentation for this class was generated from the following files: