libMesh::Parallel::Status Class Reference

#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 339 of file parallel.h.

Constructor & Destructor Documentation

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

Definition at line 554 of file parallel_implementation.h.

554  :
555  _status(),
556  _datatype()
557 {}
libMesh::Parallel::Status::Status ( const data_type type)
inlineexplicit

Definition at line 559 of file parallel_implementation.h.

559  :
560  _status(),
561  _datatype(type)
562 {}
libMesh::Parallel::Status::Status ( const status status)
inlineexplicit

Definition at line 564 of file parallel_implementation.h.

564  :
565  _status(stat),
566  _datatype()
567 {}
libMesh::Parallel::Status::Status ( const status status,
const data_type type 
)
inline

Definition at line 569 of file parallel_implementation.h.

570  :
571  _status(stat),
572  _datatype(type)
573 {}
libMesh::Parallel::Status::Status ( const Status status)
inline

Definition at line 575 of file parallel_implementation.h.

575  :
576  _status(stat._status),
577  _datatype(stat._datatype)
578 {}
libMesh::Parallel::Status::Status ( const Status status,
const data_type type 
)
inline

Definition at line 580 of file parallel_implementation.h.

581  :
582  _status(stat._status),
583  _datatype(type)
584 {}

Member Function Documentation

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

Definition at line 364 of file parallel.h.

References _datatype.

Referenced by size().

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

Definition at line 366 of file parallel.h.

References _datatype.

366 { return _datatype; }
status* libMesh::Parallel::Status::get ( )
inline

Definition at line 356 of file parallel.h.

References _status.

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

356 { return &_status; }
status const* libMesh::Parallel::Status::get ( ) const
inline

Definition at line 358 of file parallel.h.

References _status.

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

Definition at line 606 of file parallel_implementation.h.

References _status.

Referenced by libMesh::Parallel::Communicator::receive().

607 {
608  int msg_size;
609  MPI_Get_count (const_cast<MPI_Status*>(&_status), type, &msg_size);
610  libmesh_assert_greater_equal (msg_size, 0);
611  return msg_size;
612 }
unsigned int libMesh::Parallel::Status::size ( ) const
inline

Definition at line 621 of file parallel_implementation.h.

References datatype().

622 { return this->size (this->datatype()); }
int libMesh::Parallel::Status::source ( ) const
inline

Definition at line 586 of file parallel_implementation.h.

References _status.

Referenced by libMesh::Nemesis_IO::read(), libMesh::System::read_serialized_blocked_dof_objects(), and libMesh::System::write_serialized_blocked_dof_objects().

587 {
588 #ifdef LIBMESH_HAVE_MPI
589  return _status.MPI_SOURCE;
590 #else
591  return 0;
592 #endif
593 }
int libMesh::Parallel::Status::tag ( ) const
inline

Definition at line 595 of file parallel_implementation.h.

References _status.

596 {
597 #ifdef LIBMESH_HAVE_MPI
598  return _status.MPI_TAG;
599 #else
600  libmesh_error();
601  return 0;
602 #endif
603 }

Member Data Documentation

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

Definition at line 375 of file parallel.h.

Referenced by datatype().

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

Definition at line 374 of file parallel.h.

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


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

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:33 UTC

Hosted By:
SourceForge.net Logo