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

Function find

include/boost/compute/algorithm/find.hpp:26–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24/// [\p first, \p last) that equals \p value.
25template<class InputIterator, class T>
26inline InputIterator find(InputIterator first,
27 InputIterator last,
28 const T &value,
29 command_queue &queue = system::default_queue())
30{
31 typedef typename std::iterator_traits<InputIterator>::value_type value_type;
32
33 using ::boost::compute::_1;
34 using ::boost::compute::lambda::all;
35
36 if(vector_size<value_type>::value == 1){
37 return ::boost::compute::find_if(
38 first,
39 last,
40 _1 == value,
41 queue
42 );
43 }
44 else {
45 return ::boost::compute::find_if(
46 first,
47 last,
48 all(_1 == value),
49 queue
50 );
51 }
52}
53
54} // end compute namespace
55} // end boost namespace

Callers 15

BOOST_AUTO_TEST_CASEFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
supports_partition_typeFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
supports_extensionMethod · 0.85
supports_extensionMethod · 0.85
eraseMethod · 0.85
findMethod · 0.85
countMethod · 0.85
atMethod · 0.85

Calls 1

find_ifFunction · 0.85

Tested by 4

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68
supports_partition_typeFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68