Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Function template count

boost::compute::count

Synopsis

// In header: <boost/compute/algorithm/count.hpp>


template<typename InputIterator, typename T> 
  size_t count(InputIterator first, InputIterator last, const T & value, 
               command_queue & queue = system::default_queue());

Description

Returns the number of occurrences of value in the range [first, last).

Space complexity on CPUs: \Omega(1)
Space complexity on GPUs: \Omega(n)

See Also:

count_if()


PrevUpHomeNext