MCPcopy Create free account
hub / github.com/boostorg/compute / remove_if

Function remove_if

include/boost/compute/algorithm/remove_if.hpp:32–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30/// \see remove()
31template<class Iterator, class Predicate>
32inline Iterator remove_if(Iterator first,
33 Iterator last,
34 Predicate predicate,
35 command_queue &queue = system::default_queue())
36{
37 BOOST_STATIC_ASSERT(is_device_iterator<Iterator>::value);
38 typedef typename std::iterator_traits<Iterator>::value_type value_type;
39
40 // temporary storage for the input data
41 ::boost::compute::vector<value_type> tmp(first, last, queue);
42
43 return ::boost::compute::copy_if(tmp.begin(),
44 tmp.end(),
45 first,
46 not1(predicate),
47 queue);
48}
49
50} // end compute namespace
51} // end boost namespace

Callers 1

removeFunction · 0.85

Calls 4

copy_ifFunction · 0.85
not1Function · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected