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

Function count

compute/include/boost/compute/algorithm/count.hpp:34–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32/// \see count_if()
33template<class InputIterator, class T>
34inline size_t count(InputIterator first,
35 InputIterator last,
36 const T &value,
37 command_queue &queue = system::default_queue())
38{
39 BOOST_STATIC_ASSERT(is_device_iterator<InputIterator>::value);
40 typedef typename std::iterator_traits<InputIterator>::value_type value_type;
41
42 using ::boost::compute::_1;
43 using ::boost::compute::lambda::all;
44
45 if(vector_size<value_type>::value == 1){
46 return ::boost::compute::count_if(first,
47 last,
48 _1 == value,
49 queue);
50 }
51 else {
52 return ::boost::compute::count_if(first,
53 last,
54 all(_1 == value),
55 queue);
56 }
57}
58
59} // end compute namespace
60} // end boost namespace

Callers 6

BOOST_AUTO_TEST_CASEFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
countMethod · 0.85
countMethod · 0.85

Calls 1

count_ifFunction · 0.85

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68