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 copy_if

boost::compute::copy_if

Synopsis

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


template<typename InputIterator, typename OutputIterator, typename Predicate> 
  OutputIterator 
  copy_if(InputIterator first, InputIterator last, OutputIterator result, 
          Predicate predicate, 
          command_queue & queue = system::default_queue());

Description

Copies each element in the range [first, last) for which predicate returns true to the range beginning at result.

Space complexity: (2n)


PrevUpHomeNext