thrust::strided_iterator

Defined in thrust/iterator/strided_iterator.h

template<typename RandomAccessIterator, typename StrideHolder>
class strided_iterator : public thrust::iterator_adaptor<strided_iterator<RandomAccessIterator, StrideHolder>, RandomAccessIterator>, private StrideHolder

A strided_iterator wraps another iterator and moves it by a specified stride each time it is incremented or decremented.

Param RandomAccessIterator

A random access iterator

Param StrideHolder

Either a runtime_value or a compile_time_value specifying the stride

Public Types

using base_type = RandomAccessIterator

The type of iterator this iterator_adaptor's adapts.

Public Functions

inline RandomAccessIterator const &base() const
Returns

A const reference to the Base iterator this iterator_adaptor adapts.

Protected Functions

inline RandomAccessIterator const &base_reference() const
Returns

A const reference to the Base iterator this iterator_adaptor adapts.

inline RandomAccessIterator &base_reference()
Returns

A mutable reference to the Base iterator this iterator_adaptor adapts.