Function template iota

| Home | Libraries | People | FAQ | More

## Function template iota

boost::compute::iota

## Synopsis

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

    template<typename BufferIterator, typename T>
      void iota(BufferIterator first, BufferIterator last, const T & value,
                command_queue & queue = system::default_queue());

## Description

Fills the range [`first`, `last`) with sequential values starting at `value`.

For example, the following code:

    boost::compute::iota(vec.begin(), vec.end(), 0, queue);

Will fill `vec` with the values (`0`, `1`, `2`, ``...).