TIMPI
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
TIMPI::Status Class Reference

Encapsulates the MPI_Status struct. More...

#include <status.h>

Public Member Functions

 Status ()=default
 
 ~Status ()=default
 
 Status (const Status &)=default
 
 Status (Status &&)=default
 
Statusoperator= (const Status &)=default
 
Statusoperator= (Status &&)=default
 
 Status (const data_type &type)
 
 Status (const status &status)
 
 Status (const status &status, const data_type &type)
 
 Status (const Status &status, const data_type &type)
 
statusget ()
 
status constget () const
 
int source () const
 
int tag () const
 
data_typedatatype ()
 
const data_typedatatype () const
 
CountType size (const data_type &type) const
 
CountType 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 75 of file status.h.

Constructor & Destructor Documentation

◆ Status() [1/7]

TIMPI::Status::Status ( )
default

◆ ~Status()

TIMPI::Status::~Status ( )
default

◆ Status() [2/7]

TIMPI::Status::Status ( const Status )
default

◆ Status() [3/7]

TIMPI::Status::Status ( Status &&  )
default

◆ Status() [4/7]

TIMPI::Status::Status ( const data_type type)
inlineexplicit

Definition at line 120 of file status.h.

120 :
121 _status(),
122 _datatype(type)
123{}
status _status
Definition status.h:113
data_type _datatype
Definition status.h:114

◆ Status() [5/7]

TIMPI::Status::Status ( const status status)
inlineexplicit

Definition at line 125 of file status.h.

125 :
126 _status(stat),
127 _datatype()
128{}
Tnew cast_int(Told oldvar)

◆ Status() [6/7]

TIMPI::Status::Status ( const status status,
const data_type type 
)
inline

Definition at line 130 of file status.h.

131 :
132 _status(stat),
133 _datatype(type)
134{}

◆ Status() [7/7]

TIMPI::Status::Status ( const Status status,
const data_type type 
)
inline

Definition at line 136 of file status.h.

137 :
138 _status(stat._status),
139 _datatype(type)
140{}

Member Function Documentation

◆ datatype() [1/2]

data_type & TIMPI::Status::datatype ( )
inline

Definition at line 103 of file status.h.

103{ return _datatype; }

References _datatype.

Referenced by size().

◆ datatype() [2/2]

const data_type & TIMPI::Status::datatype ( ) const
inline

Definition at line 105 of file status.h.

105{ return _datatype; }

References _datatype.

◆ get() [1/2]

status * TIMPI::Status::get ( )
inline

Definition at line 95 of file status.h.

95{ return &_status; }

References _status.

◆ get() [2/2]

status const * TIMPI::Status::get ( ) const
inline

Definition at line 97 of file status.h.

97{ return &_status; }

References _status.

◆ operator=() [1/2]

Status & TIMPI::Status::operator= ( const Status )
default

◆ operator=() [2/2]

Status & TIMPI::Status::operator= ( Status &&  )
default

◆ size() [1/2]

CountType TIMPI::Status::size ( ) const
inline

Definition at line 173 of file status.h.

174{ return this->size (this->datatype()); }
data_type & datatype()
Definition status.h:103
CountType size() const
Definition status.h:173

References datatype(), and size().

Referenced by size().

◆ size() [2/2]

CountType TIMPI::Status::size ( const data_type type) const
inline

Definition at line 161 of file status.h.

162{
163 ignore(type); // We don't use this ifndef TIMPI_HAVE_MPI
166 (TIMPI_GET_COUNT(const_cast<MPI_Status*>(&_status), type,
167 &msg_size));
168
170 return msg_size;
171}
MPI_Count CountType
Definition status.h:47
void ignore(const Args &...)

References _status, TIMPI::cast_int(), and TIMPI::ignore().

◆ source()

int TIMPI::Status::source ( ) const
inline

Definition at line 142 of file status.h.

143{
144#ifdef TIMPI_HAVE_MPI
145 return _status.MPI_SOURCE;
146#else
147 return 0;
148#endif
149}

References _status.

Referenced by TIMPI::Communicator::receive_packed_range().

◆ tag()

int TIMPI::Status::tag ( ) const
inline

Definition at line 151 of file status.h.

152{
153#ifdef TIMPI_HAVE_MPI
154 return _status.MPI_TAG;
155#else
157 return 0;
158#endif
159}

References _status, and TIMPI::cast_int().

Member Data Documentation

◆ _datatype

data_type TIMPI::Status::_datatype
private

Definition at line 114 of file status.h.

Referenced by datatype(), and datatype().

◆ _status

status TIMPI::Status::_status
private

Definition at line 113 of file status.h.

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


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