| Home | Libraries | People | FAQ | More

## Function template adjacent_find

boost::compute::adjacent_find

## Synopsis

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

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

## Description

Searches the range [`first`, `last`) for two identical adjacent elements and returns an iterator pointing to the first.

Space complexity: \Omega(1)

See Also: find(), adjacent_difference()

Parameters: |
`first` | first element in the range to search
`last` | last element in the range to search
`compare` | binary comparison function
`queue` | command queue to perform the operation
Returns: | `InputIteratorm` to the first element which compares equal to the following element. If none are equal, returns `last`.