thrust::make_constant_iterator

Defined in thrust/iterator/constant_iterator.h

template<typename V>
inline constant_iterator<V> thrust::make_constant_iterator(V x)

This version of make_constant_iterator creates a constant_iterator using only a parameter for the desired constant value. The value of the returned constant_iterator's index is set to 0.

Parameters

x – The value of the returned constant_iterator's constant value.

Returns

A new constant_iterator with constant value equal to x and index equal to 0.