Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
Teuchos::CommStatus< OrdinalType > Class Template Referenceabstract

Encapsulation of the result of a receive (blocking or nonblocking). More...

#include <Teuchos_Comm.hpp>

Inheritance diagram for Teuchos::CommStatus< OrdinalType >:
Teuchos::SerialCommStatus< OrdinalType >

Public Member Functions

virtual ~CommStatus ()
 Destructor (declared virtual for memory safety) More...
 
virtual OrdinalType getSourceRank ()=0
 The source rank that sent the message. More...
 
virtual OrdinalType getTag ()=0
 The tag of the received message. More...
 

Detailed Description

template<class OrdinalType>
class Teuchos::CommStatus< OrdinalType >

Encapsulation of the result of a receive (blocking or nonblocking).

An instance of this class encapsulates the result of a receive. (An MPI implementation would wrap MPI_Status.) You can query it for information like the rank of the process that sent you the message. (This is useful if your receive specified a negative source rank, indicating that you would accept a message from any process in the communicator.)

Template Parameters
OrdinalTypeThe same template parameter as Comm. Only use int here. We only make this a template class for compatibility with Comm.
Note
For now, this class only exposes the rank of the process that sent the message (the "source rank") and its tag. Later, we might expose other fields of MPI_Status in this interface. For now, you can attempt a dynamic cast to MpiCommStatus to access all three fields (MPI_SOURCE, MPI_TAG, and MPI_ERROR).

Definition at line 71 of file Teuchos_Comm.hpp.

Constructor & Destructor Documentation

template<class OrdinalType >
virtual Teuchos::CommStatus< OrdinalType >::~CommStatus ( )
inlinevirtual

Destructor (declared virtual for memory safety)

Definition at line 74 of file Teuchos_Comm.hpp.

Member Function Documentation

template<class OrdinalType >
virtual OrdinalType Teuchos::CommStatus< OrdinalType >::getSourceRank ( )
pure virtual

The source rank that sent the message.

Implemented in Teuchos::SerialCommStatus< OrdinalType >.

template<class OrdinalType >
virtual OrdinalType Teuchos::CommStatus< OrdinalType >::getTag ( )
pure virtual

The tag of the received message.

Implemented in Teuchos::SerialCommStatus< OrdinalType >.


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