thrust::make_constant_iterator#
Overloads#
make_constant_iterator(x, i=int())#
-
template<typename ValueT, typename IndexT>
inline constant_iterator<ValueT, IndexT> thrust::make_constant_iterator(
)# This version of
make_constant_iteratorcreates aconstant_iteratorfrom values given for both value and index.The type of
constant_iteratormay be inferred by the compiler from the types of its parameters.See also
- Parameters:
x – The value of the returned
constant_iterator'sconstant value.i – The index of the returned
constant_iteratorwithin a sequence. The type of this parameter defaults toint. In the default case, the value of this parameter is0.
- Returns:
A new
constant_iteratorwith constant value & index as given byx&i.
make_constant_iterator(x)#
-
template<typename V>
inline constant_iterator<V> thrust::make_constant_iterator( - V x,
This version of
make_constant_iteratorcreates aconstant_iteratorusing only a parameter for the desired constant value.The value of the returned
constant_iterator'sindex is set to0.See also
- Parameters:
x – The value of the returned
constant_iterator'sconstant value.- Returns:
A new
constant_iteratorwith constant value equal toxand index equal to0.