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 an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template partition

boost::compute::partition

Synopsis

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


template<typename Iterator, typename UnaryPredicate> 
  Iterator 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. Order of the elements need not be preserved.

Space complexity: \Omega(3n)

See Also:

is_partitioned() and stable_partition()


PrevUpHomeNext