libMesh
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
libMesh::Parallel::MessageTag Class Reference

Encapsulates the MPI tag integers. More...

#include <parallel.h>

Public Member Functions

 MessageTag (int tagvalue=invalid_tag)
 Explicit constructor, to discourage using "magic numbers" as tags. More...
 
 MessageTag (const MessageTag &other)
 Copy constructor. More...
 
 ~MessageTag ()
 Destructor. More...
 
int value () const
 

Static Public Attributes

static const int invalid_tag = INT_MIN
 Invalid tag, to allow for default construction. More...
 

Private Member Functions

 MessageTag (int tagvalue, const Communicator *comm)
 

Private Attributes

int _tagvalue
 
const Communicator_comm
 

Friends

class Communicator
 

Detailed Description

Encapsulates the MPI tag integers.

Definition at line 227 of file parallel.h.

Constructor & Destructor Documentation

libMesh::Parallel::MessageTag::MessageTag ( int  tagvalue = invalid_tag)
explicit

Explicit constructor, to discourage using "magic numbers" as tags.

Communicator::get_unique_tag is recommended instead.

Definition at line 240 of file parallel.h.

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

241  : _tagvalue(tagvalue), _comm(libmesh_nullptr) {}
const class libmesh_nullptr_t libmesh_nullptr
const Communicator * _comm
Definition: parallel.h:261
libMesh::Parallel::MessageTag::MessageTag ( const MessageTag other)

Copy constructor.

Helps Communicator do reference counting on unique tags

Definition at line 1339 of file parallel_implementation.h.

References _comm, _tagvalue, and libMesh::Parallel::Communicator::reference_unique_tag().

1340  : _tagvalue(other._tagvalue), _comm(other._comm)
1341 {
1342  if (_comm)
1344 }
void reference_unique_tag(int tagvalue) const
Reference an already-acquired tag, so that we know it will be dereferenced multiple times before we c...
const Communicator * _comm
Definition: parallel.h:261
libMesh::Parallel::MessageTag::~MessageTag ( )

Destructor.

Helps Communicator do reference counting on unique tags

Definition at line 1331 of file parallel_implementation.h.

1332 {
1333  if (_comm)
1335 }
void dereference_unique_tag(int tagvalue) const
Dereference an already-acquired tag, and see if we can re-release it.
const Communicator * _comm
Definition: parallel.h:261
libMesh::Parallel::MessageTag::MessageTag ( int  tagvalue,
const Communicator comm 
)
private

Definition at line 264 of file parallel.h.

265  : _tagvalue(tagvalue), _comm(comm) {}
const Communicator * _comm
Definition: parallel.h:261

Member Function Documentation

int libMesh::Parallel::MessageTag::value ( ) const

Friends And Related Function Documentation

friend class Communicator
friend

Definition at line 268 of file parallel.h.

Member Data Documentation

const Communicator* libMesh::Parallel::MessageTag::_comm
private

Definition at line 261 of file parallel.h.

Referenced by MessageTag().

int libMesh::Parallel::MessageTag::_tagvalue
private

Definition at line 260 of file parallel.h.

Referenced by MessageTag().

const int libMesh::Parallel::MessageTag::invalid_tag = INT_MIN
static

Invalid tag, to allow for default construction.

Definition at line 234 of file parallel.h.


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