| Home | Libraries | People | FAQ | More

## Function template stable_partition

boost::compute::stable_partition — Partitioning algorithm.

## Synopsis

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

    template<typename Iterator, typename UnaryPredicate>
      Iterator stable_partition(Iterator first, Iterator last,
                                UnaryPredicate predicate,
                                command_queue & queue = system::default_queue());

## Description

Partitions the elements in the range [`first`, `last`) according to `predicate`. The order of the elements is preserved. Space complexity: \Omega(3n)

See Also:

is_partitioned() and partition()

Parameters: |
`first` | Iterator pointing to start of range
`last` | Iterator pointing to end of range
`predicate` | Unary predicate to be applied on each element
`queue` | Queue on which to execute
Returns: | Iterator pointing to end of true values