Boost C++ Libraries 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.

Function test_some

boost::mpi::test_some — Test whether some non-blocking requests have completed.


template<typename BidirectionalIterator, typename OutputIterator> 
  std::pair< OutputIterator, BidirectionalIterator > 
  test_some(BidirectionalIterator first, BidirectionalIterator last, 
            OutputIterator out);
template<typename BidirectionalIterator> 
  test_some(BidirectionalIterator first, BidirectionalIterator last);


This routine takes in a set of requests stored in the iterator range [first,last) and tests to see if any of the requests has completed. It completes all of the requests it can, partitioning the input sequence into pending requests followed by completed requests. If an output iterator is provided, status objects will be emitted for each of the completed requests. This routine is similar to wait_some, but does not wait until any requests have completed. This routine provides functionality equivalent to MPI_Testsome.



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


The iterator that denotes the end of the sequence of request objects. This may not be equal to first.


If provided, the status objects corresponding to completed requests will be emitted through this output iterator.


If the out parameter was provided, a pair containing the output iterator out after all of the status objects have been written through it and an iterator referencing the first completed request. If no out parameter was provided, only the iterator referencing the first completed request will be emitted.