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 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());
template<typename InputIterator> 
  InputIterator 
  adjacent_find(InputIterator first, InputIterator last, 
                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:

compare

binary comparison function

first

first element in the range to search

last

last element in the range to search

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.


PrevUpHomeNext