libMesh::Parallel::Status Class Reference

#include <parallel.h>

List of all members.

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


Constructor & Destructor Documentation

libMesh::Parallel::Status::Status (  )  [inline]

Definition at line 533 of file parallel_implementation.h.

00533                        :
00534   _status(),
00535   _datatype()
00536 {}

libMesh::Parallel::Status::Status ( const data_type type  )  [inline, explicit]

Definition at line 538 of file parallel_implementation.h.

00538                                             :
00539   _status(),
00540   _datatype(type)
00541 {}

libMesh::Parallel::Status::Status ( const status status  )  [inline, explicit]

Definition at line 543 of file parallel_implementation.h.

00543                                          :
00544   _status(stat),
00545   _datatype()
00546 {}

libMesh::Parallel::Status::Status ( const status status,
const data_type type 
) [inline]

Definition at line 548 of file parallel_implementation.h.

00549                         :
00550   _status(stat),
00551   _datatype(type)
00552 {}

libMesh::Parallel::Status::Status ( const Status status  )  [inline]

Definition at line 554 of file parallel_implementation.h.

00554                                          :
00555   _status(stat._status),
00556   _datatype(stat._datatype)
00557 {}

libMesh::Parallel::Status::Status ( const Status status,
const data_type type 
) [inline]

Definition at line 559 of file parallel_implementation.h.

00560                                               :
00561   _status(stat._status),
00562   _datatype(type)
00563 {}


Member Function Documentation

const data_type& libMesh::Parallel::Status::datatype (  )  const [inline]

Definition at line 344 of file parallel.h.

References _datatype.

00344 { return _datatype; }

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

Definition at line 342 of file parallel.h.

References _datatype.

Referenced by size().

00342 { return _datatype; }

status const* libMesh::Parallel::Status::get (  )  const [inline]

Definition at line 336 of file parallel.h.

References _status.

00336 { return &_status; }

status* libMesh::Parallel::Status::get (  )  [inline]

Definition at line 334 of file parallel.h.

References _status.

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

00334 { return &_status; }

unsigned int libMesh::Parallel::Status::size (  )  const [inline]

Definition at line 600 of file parallel_implementation.h.

References datatype().

00601 { return this->size (this->datatype()); }

unsigned int libMesh::Parallel::Status::size ( const data_type type  )  const [inline]

Definition at line 585 of file parallel_implementation.h.

References _status.

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

00586 {
00587   int msg_size;
00588   MPI_Get_count (const_cast<MPI_Status*>(&_status), type, &msg_size);
00589   libmesh_assert_greater_equal (msg_size, 0);
00590   return msg_size;
00591 }

int libMesh::Parallel::Status::source (  )  const [inline]

Definition at line 565 of file parallel_implementation.h.

References _status.

00566 {
00567 #ifdef LIBMESH_HAVE_MPI
00568   return _status.MPI_SOURCE;
00569 #else
00570   return 0;
00571 #endif
00572 }

int libMesh::Parallel::Status::tag (  )  const [inline]

Definition at line 574 of file parallel_implementation.h.

References _status.

00575 {
00576 #ifdef LIBMESH_HAVE_MPI
00577   return _status.MPI_TAG;
00578 #else
00579   libmesh_error();
00580   return 0;
00581 #endif
00582 }


Member Data Documentation

Definition at line 353 of file parallel.h.

Referenced by datatype().

Definition at line 352 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 05 2013 19:55:44 UTC

Hosted By:
SourceForge.net Logo