| 25 | /// \see remove() |
| 26 | template<class Iterator, class Predicate> |
| 27 | inline 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 |