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 master branch, built from commit c6a8213e9b.
PrevUpHomeNext

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


PrevUpHomeNext