thrust
Classes | Functions
Fancy Iterators
Iterators

Classes

class  thrust::constant_iterator< Value, Incrementable, System >
class  thrust::counting_iterator< Incrementable, System, Traversal, Difference >
class  thrust::discard_iterator< System >
class  thrust::iterator_adaptor< Derived, Base, Value, System, Traversal, Reference, Difference >
class  thrust::iterator_core_access
class  thrust::iterator_facade< Derived, Value, System, Traversal, Reference, Difference >
class  thrust::permutation_iterator< ElementIterator, IndexIterator >
class  thrust::reverse_iterator< BidirectionalIterator >
class  thrust::transform_iterator< AdaptableUnaryFunction, Iterator, Reference, Value >
class  thrust::zip_iterator< IteratorTuple >

Functions

template<typename V , typename I >
__host__ __device__
constant_iterator< V, I > 
thrust::make_constant_iterator (V x, I i=int())
template<typename V >
__host__ __device__
constant_iterator< V > 
thrust::make_constant_iterator (V x)
template<typename Incrementable >
__host__ __device__
counting_iterator
< Incrementable > 
thrust::make_counting_iterator (Incrementable x)
__host__ __device__
discard_iterator 
thrust::make_discard_iterator (discard_iterator<>::difference_type i=discard_iterator<>::difference_type(0))
template<typename ElementIterator , typename IndexIterator >
__host__ __device__
permutation_iterator
< ElementIterator,
IndexIterator > 
thrust::make_permutation_iterator (ElementIterator e, IndexIterator i)
template<typename BidirectionalIterator >
__host__ __device__
reverse_iterator
< BidirectionalIterator > 
thrust::make_reverse_iterator (BidirectionalIterator x)
template<class AdaptableUnaryFunction , class Iterator >
__host__ __device__
transform_iterator
< AdaptableUnaryFunction,
Iterator > 
thrust::make_transform_iterator (Iterator it, AdaptableUnaryFunction fun)
template<typename IteratorTuple >
__host__ __device__
zip_iterator< IteratorTuple > 
thrust::make_zip_iterator (IteratorTuple t)

Detailed Description

Function Documentation

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
template<typename V >
__host__ __device__ constant_iterator<V> thrust::make_constant_iterator ( x)
inline

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
xThe 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.
See Also
constant_iterator
template<typename Incrementable >
__host__ __device__ counting_iterator<Incrementable> thrust::make_counting_iterator ( Incrementable  x)
inline

make_counting_iterator creates a counting_iterator using an initial value for its Incrementable counter.

Parameters
xThe initial value of the new counting_iterator's counter.
Returns
A new counting_iterator whose counter has been initialized to x.
__host__ __device__ discard_iterator thrust::make_discard_iterator ( discard_iterator<>::difference_type  i = discard_iterator<>::difference_type(0))
inline

make_discard_iterator creates a discard_iterator from an optional index parameter.

Parameters
iThe index of the returned discard_iterator within a range. In the default case, the value of this parameter is 0.
Returns
A new discard_iterator with index as given by i.
See Also
constant_iterator
template<typename ElementIterator , typename IndexIterator >
__host__ __device__ permutation_iterator<ElementIterator,IndexIterator> thrust::make_permutation_iterator ( ElementIterator  e,
IndexIterator  i 
)

make_permutation_iterator creates a permutation_iterator from an ElementIterator pointing to a range of elements to "permute" and an IndexIterator pointing to a range of indices defining an indexing scheme on the values.

Parameters
eAn ElementIterator pointing to a range of values.
iAn IndexIterator pointing to an indexing scheme to use on e.
Returns
A new permutation_iterator which permutes the range e by i.
See Also
permutation_iterator
template<typename BidirectionalIterator >
__host__ __device__ reverse_iterator<BidirectionalIterator> thrust::make_reverse_iterator ( BidirectionalIterator  x)

make_reverse_iterator creates a reverse_iterator from a BidirectionalIterator pointing to a range of elements to reverse.

Parameters
xA BidirectionalIterator pointing to a range to reverse.
Returns
A new reverse_iterator which reverses the range x.
template<class AdaptableUnaryFunction , class Iterator >
__host__ __device__ transform_iterator<AdaptableUnaryFunction, Iterator> thrust::make_transform_iterator ( Iterator  it,
AdaptableUnaryFunction  fun 
)
inline

make_transform_iterator creates a transform_iterator from an Iterator and AdaptableUnaryFunction.

Parameters
itThe Iterator pointing to the input range of the newly created transform_iterator.
funThe AdaptableUnaryFunction used to transform the range pointed to by it in the newly created transform_iterator.
Returns
A new transform_iterator which transforms the range at it by fun.
See Also
transform_iterator
template<typename IteratorTuple >
__host__ __device__ zip_iterator<IteratorTuple> thrust::make_zip_iterator ( IteratorTuple  t)
inline

make_zip_iterator creates a zip_iterator from a tuple of iterators.

Parameters
tThe tuple of iterators to copy.
Returns
A newly created zip_iterator which zips the iterators encapsulated in t.
See Also
zip_iterator