Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

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