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

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template test_any

boost::mpi::test_any — Test whether any non-blocking request has completed.

Synopsis

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


template<typename ForwardIterator> 
  optional< std::pair< status, ForwardIterator > > 
  test_any(ForwardIterator first, ForwardIterator last);

Description

This routine takes in a set of requests stored in the iterator range [first,last) and tests whether any of these requests has been completed. This routine is similar to wait_any, but will not block waiting for requests to completed. It provides functionality equivalent to MPI_Testany.

Parameters:

first

The iterator that denotes the beginning of the sequence of request objects.

last

The iterator that denotes the end of the sequence of request objects.

Returns:

If any outstanding requests have completed, a pair containing the status object that corresponds to the completed operation and the iterator referencing the completed request. Otherwise, an empty optional<>.


PrevUpHomeNext