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 a snapshot of the develop branch, built from commit f5a2dc2871.
PrevUpHomeNext

Function template unique

boost::compute::unique

Synopsis

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


template<typename InputIterator, typename BinaryPredicate> 
  InputIterator 
  unique(InputIterator first, InputIterator last, BinaryPredicate op, 
         command_queue & queue = system::default_queue());

Description

Removes all consecutive duplicate elements (determined by op) from the range [first, last). If op is not provided, the equality operator is used.

Space complexity: \Omega(4n)

See Also:

unique_copy()

Parameters:

first

first element in the input range

last

last element in the input range

op

binary operator used to check for uniqueness

queue

command queue to perform the operation

Returns:

InputIterator to the new logical end of the range


PrevUpHomeNext