| Home | Libraries | People | FAQ | More

## Function template unique_copy

boost::compute::unique_copy

## Synopsis

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

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

## Description

Makes a copy of the range [first, last) and removes all consecutive duplicate elements (determined by `op`) from the copy. If `op` is not provided, the equality operator is used.

Space complexity: \Omega(4n)

See Also: unique()

Parameters: |
`first` | first element in the input range
`last` | last element in the input range
`result` | first element in the result range
`op` | binary operator used to check for uniqueness
`queue` | command queue to perform the operation
Returns: | `OutputIterator` to the end of the result range