Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class status

boost::mpi::status — Contains information about a message that has been or can be received.

Synopsis

// In header: <boost/mpi/status.hpp>


class status {
public:

  // public member functions
  status();
  status(MPI_Status const &);
  int source() const;
  int tag() const;
  int error() const;
  bool cancelled() const;
  template<typename T> optional< int > count() const;
  operator MPI_Status &();
  operator const MPI_Status &() const;

  // public data members
  mutable int m_count;
};

Description

This structure contains status information about messages that have been received (with communicator::recv) or can be received (returned from communicator::probe or communicator::iprobe). It permits access to the source of the message, message tag, error code (rarely used), or the number of elements that have been transmitted.

status public member functions

  1. status();
  2. status(MPI_Status const & s);
  3. int source() const;

    Retrieve the source of the message.

  4. int tag() const;

    Retrieve the message tag.

  5. int error() const;

    Retrieve the error code.

  6. bool cancelled() const;

    Determine whether the communication associated with this object has been successfully cancelled.

  7. template<typename T> optional< int > count() const;

    Determines the number of elements of type T contained in the message. The type T must have an associated data type, i.e., is_mpi_datatype<T> must derive mpl::true_. In cases where the type T does not match the transmitted type, this routine will return an empty optional<int>.

    Returns:

    the number of T elements in the message, if it can be determined.

  8. operator MPI_Status &();

    References the underlying MPI_Status

  9. operator const MPI_Status &() const;

    References the underlying MPI_Status


PrevUpHomeNext