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 transform_if

boost::compute::transform_if

Synopsis

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


template<typename InputIterator, typename OutputIterator, 
         typename UnaryFunction, typename Predicate> 
  OutputIterator 
  transform_if(InputIterator first, InputIterator last, OutputIterator result, 
               UnaryFunction function, 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: O(2n)


PrevUpHomeNext