MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / find

Function find

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

Source from the content-addressed store, hash-verified

29/// Space complexity: \Omega(1)
30template<class InputIterator, class T>
31inline InputIterator find(InputIterator first,
32 InputIterator last,
33 const T &value,
34 command_queue &queue = system::default_queue())
35{
36 BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
37 typedef typename std::iterator_traits<InputIterator>::value_type value_type;
38
39 using ::boost::compute::_1;
40 using ::boost::compute::lambda::all;
41
42 if(vector_size<value_type>::value == 1){
43 return ::boost::compute::find_if(
44 first,
45 last,
46 _1 == value,
47 queue
48 );
49 }
50 else {
51 return ::boost::compute::find_if(
52 first,
53 last,
54 all(_1 == value),
55 queue
56 );
57 }
58}
59
60} // end compute namespace
61} // 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