| Home | Libraries | People | FAQ | More

## 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: |
`first` | first element in the range to check
`last` | last element in the range to check
`compare` | comparison function (by default `less`)
`queue` | command queue to perform the operation
Returns: | `true` if the range [`first`, `last`) is sorted