thrust

◆ make_constant_iterator() [1/2]

template<typename V , typename I >
__host__ __device__ constant_iterator<V,I> thrust::make_constant_iterator ( x,
i = int() 
)
inline

This version of make_constant_iterator creates a constant_iterator from values given for both value and index. The type of constant_iterator may be inferred by the compiler from the types of its parameters.

Parameters
xThe value of the returned constant_iterator's constant value.
iThe index of the returned constant_iterator within a sequence. The type of this parameter defaults to int. In the default case, the value of this parameter is 0.
Returns
A new constant_iterator with constant value & index as given by x & i.
See also
constant_iterator