| 27 | /// Space complexity: \Omega(1) |
| 28 | template<class InputIterator, class T> |
| 29 | inline bool binary_search(InputIterator first, |
| 30 | InputIterator last, |
| 31 | const T &value, |
| 32 | command_queue &queue = system::default_queue()) |
| 33 | { |
| 34 | BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value); |
| 35 | InputIterator position = lower_bound(first, last, value, queue); |
| 36 | |
| 37 | return position != last && position.read(queue) == value; |
| 38 | } |
| 39 | |
| 40 | } // end compute namespace |
| 41 | } // end boost namespace |