...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::make_counting_iterator
// In header: <boost/compute/iterator/counting_iterator.hpp> template<typename T> counting_iterator< T > make_counting_iterator(const T & init);
Returns a new counting_iterator
starting at init
.
For example, to create a counting iterator which returns unsigned integers and increments from one:
auto iter = make_counting_iterator<uint_>(1);
Parameters: |
|
||
Returns: |
a counting_iterator with |