| 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:

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

Space complexity: \Omega(1)