| 28 | /// Space complexity: \Omega(1) |
| 29 | template<class InputIterator, class UnaryPredicate> |
| 30 | inline bool is_partitioned(InputIterator first, |
| 31 | InputIterator last, |
| 32 | UnaryPredicate predicate, |
| 33 | command_queue &queue = system::default_queue()) |
| 34 | { |
| 35 | BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value); |
| 36 | return ::boost::compute::find_if( |
| 37 | ::boost::compute::find_if_not(first, |
| 38 | last, |
| 39 | predicate, |
| 40 | queue), |
| 41 | last, |
| 42 | predicate, |
| 43 | queue) == last; |
| 44 | } |
| 45 | |
| 46 | } // end compute namespace |
| 47 | } // end boost namespace |