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

Function binary_search

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

Source from the content-addressed store, hash-verified

22/// \p last).
23template<class InputIterator, class T>
24inline bool binary_search(InputIterator first,
25 InputIterator last,
26 const T &value,
27 command_queue &queue = system::default_queue())
28{
29 InputIterator position = lower_bound(first, last, value, queue);
30
31 return position != last && position.read(queue) == value;
32}
33
34} // end compute namespace
35} // end boost namespace

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

lower_boundFunction · 0.85
readMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68