| Home | Libraries | People | FAQ | More

## Function template make_counting_iterator

boost::compute::make_counting_iterator

## Synopsis

    // In header: <boost/compute/iterator/counting_iterator.hpp>

    template<typename T>
      counting_iterator< T > make_counting_iterator(const T & init);

## Description

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: |
`init` | the initial value
Returns: | a counting_iterator with `init`.