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 is_sorted

boost::compute::is_sorted

Synopsis

// In header: <boost/compute/algorithm/is_sorted.hpp>


template<typename InputIterator, typename Compare> 
  bool is_sorted(InputIterator first, InputIterator last, Compare compare, 
                 command_queue & queue = system::default_queue());

Description

Returns true if the values in the range [first, last) are in sorted order.

Space complexity: \Omega(1)

See Also:

sort()

Parameters:

compare

comparison function (by default less)

first

first element in the range to check

last

last element in the range to check

queue

command queue to perform the operation

Returns:

true if the range [first, last) is sorted


PrevUpHomeNext