libMesh
Public Member Functions | Private Attributes | List of all members
libMesh::Parallel::Status Class Reference

Encapsulates the MPI_Status struct. More...

#include <parallel.h>

Public Member Functions

 Status ()
 
 Status (const data_type &type)
 
 Status (const status &status)
 
 Status (const status &status, const data_type &type)
 
 Status (const Status &status)
 
 Status (const Status &status, const data_type &type)
 
statusget ()
 
status const * get () const
 
int source () const
 
int tag () const
 
data_typedatatype ()
 
const data_typedatatype () const
 
unsigned int size (const data_type &type) const
 
unsigned int size () const
 

Private Attributes

status _status
 
data_type _datatype
 

Detailed Description

Encapsulates the MPI_Status struct.

Allows the source and size of the message to be determined.

Definition at line 461 of file parallel.h.

Constructor & Destructor Documentation

libMesh::Parallel::Status::Status ( )

Definition at line 751 of file parallel_implementation.h.

751  :
752  _status(),
753  _datatype()
754 {}
libMesh::Parallel::Status::Status ( const data_type type)
explicit

Definition at line 756 of file parallel_implementation.h.

756  :
757  _status(),
758  _datatype(type)
759 {}
libMesh::Parallel::Status::Status ( const status status)
explicit

Definition at line 761 of file parallel_implementation.h.

761  :
762  _status(stat),
763  _datatype()
764 {}
libMesh::Parallel::Status::Status ( const status status,
const data_type type 
)

Definition at line 766 of file parallel_implementation.h.

767  :
768  _status(stat),
769  _datatype(type)
770 {}
libMesh::Parallel::Status::Status ( const Status status)

Definition at line 772 of file parallel_implementation.h.

772  :
773  _status(stat._status),
774  _datatype(stat._datatype)
775 {}
libMesh::Parallel::Status::Status ( const Status status,
const data_type type 
)

Definition at line 777 of file parallel_implementation.h.

778  :
779  _status(stat._status),
780  _datatype(type)
781 {}

Member Function Documentation

data_type& libMesh::Parallel::Status::datatype ( )

Definition at line 486 of file parallel.h.

Referenced by size().

486 { return _datatype; }
const data_type& libMesh::Parallel::Status::datatype ( ) const

Definition at line 488 of file parallel.h.

488 { return _datatype; }
status* libMesh::Parallel::Status::get ( )
status const* libMesh::Parallel::Status::get ( ) const

Definition at line 480 of file parallel.h.

480 { return &_status; }
unsigned int libMesh::Parallel::Status::size ( const data_type type) const

Definition at line 803 of file parallel_implementation.h.

References _status, and size().

Referenced by libMesh::MeshCommunication::gather_neighboring_elements(), libMesh::Parallel::Communicator::nonblocking_receive_packed_range(), and libMesh::Parallel::Communicator::receive().

804 {
805  int msg_size;
806  libmesh_call_mpi
807  (MPI_Get_count (const_cast<MPI_Status*>(&_status), type,
808  &msg_size));
809 
810  libmesh_assert_greater_equal (msg_size, 0);
811  return msg_size;
812 }
unsigned int libMesh::Parallel::Status::size ( ) const

Definition at line 821 of file parallel_implementation.h.

References datatype().

Referenced by size().

822 { return this->size (this->datatype()); }
data_type & datatype()
Definition: parallel.h:486
int libMesh::Parallel::Status::source ( ) const
int libMesh::Parallel::Status::tag ( ) const

Definition at line 792 of file parallel_implementation.h.

References _status.

Referenced by libMesh::Parallel::Communicator::receive(), and libMesh::Parallel::Communicator::receive_packed_range().

793 {
794 #ifdef LIBMESH_HAVE_MPI
795  return _status.MPI_TAG;
796 #else
797  libmesh_not_implemented();
798  return 0;
799 #endif
800 }

Member Data Documentation

data_type libMesh::Parallel::Status::_datatype
private

Definition at line 497 of file parallel.h.

status libMesh::Parallel::Status::_status
private

Definition at line 496 of file parallel.h.

Referenced by size(), source(), and tag().


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