Teuchos - Trilinos Tools Package Version of the Day
Public Member Functions
Teuchos::MpiCommRequest Class Reference

MPI-specific implementation of CommRequest. More...

#include <Teuchos_DefaultMpiComm.hpp>

Inheritance diagram for Teuchos::MpiCommRequest:
Teuchos::CommRequest Teuchos::Describable Teuchos::LabeledObject

List of all members.

Public Member Functions

 MpiCommRequest (MPI_Request rawMpiRequest, const ArrayView< char >::size_type numBytesInMessage)
 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.
ArrayView< char >::size_type numBytes () const
 Number of bytes in the nonblocking send or receive request.

Detailed Description

MPI-specific implementation of CommRequest.

Users would not normally create an instance of this class. Calls to ireceive() and isend() return a CommRequest, which for an MPI implementation of Comm 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, and pass it into one of our wrapper functions like wait() or waitAll().

Definition at line 105 of file Teuchos_DefaultMpiComm.hpp.

Constructor & Destructor Documentation

Teuchos::MpiCommRequest::MpiCommRequest ( MPI_Request  rawMpiRequest,
const ArrayView< char >::size_type  numBytesInMessage 
) [inline]

Constructor (from a raw MPI_Request).

Definition at line 108 of file Teuchos_DefaultMpiComm.hpp.

Member Function Documentation

MPI_Request Teuchos::MpiCommRequest::releaseRawMpiRequest ( ) [inline]

Return and relinquish ownership of the raw MPI_Request.

"Relinquish ownership" means that this object sets its raw MPI_Request to MPI_REQUEST_NULL, but returns the original MPI_Request. This effectively gives the caller ownership of the raw MPI_Request. This prevents hanging requests.

Definition at line 119 of file Teuchos_DefaultMpiComm.hpp.

bool Teuchos::MpiCommRequest::isNull ( ) const [inline]

Whether the raw MPI_Request is MPI_REQUEST_NULL.

Definition at line 127 of file Teuchos_DefaultMpiComm.hpp.

ArrayView<char>::size_type Teuchos::MpiCommRequest::numBytes ( ) const [inline]

Number of bytes in the nonblocking send or receive request.

Remembering this is inexpensive, and is also useful for debugging (e.g., for detecting whether the send and receive have matching message lengths).

Definition at line 136 of file Teuchos_DefaultMpiComm.hpp.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines