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

Function remove_if

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

Source from the content-addressed store, hash-verified

25/// \see remove()
26template<class Iterator, class Predicate>
27inline Iterator remove_if(Iterator first,
28 Iterator last,
29 Predicate predicate,
30 command_queue &queue = system::default_queue())
31{
32 typedef typename std::iterator_traits<Iterator>::value_type value_type;
33
34 // temporary storage for the input data
35 ::boost::compute::vector<value_type> tmp(first, last, queue);
36
37 return ::boost::compute::copy_if(tmp.begin(),
38 tmp.end(),
39 first,
40 not1(predicate),
41 queue);
42}
43
44} // end compute namespace
45} // 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