28 #ifndef STRIDED_ITERATOR_H_
29 #define STRIDED_ITERATOR_H_
31 #include <thrust/iterator/counting_iterator.h>
32 #include <thrust/iterator/transform_iterator.h>
33 #include <thrust/iterator/permutation_iterator.h>
34 #include <thrust/functional.h>
39 template<
typename Iterator>
57 const difference_type& i)
const
64 typedef typename thrust::transform_iterator<stride_functor, CountingIterator>
TransformIterator;
72 first(first), last(last), stride(stride)
82 iterator
end(
void)
const
thrust::transform_iterator< stride_functor, CountingIterator > TransformIterator
iterator begin(void) const
__host__ __device__ difference_type operator()(const difference_type &i) const
stride_functor(difference_type stride)
thrust::counting_iterator< difference_type > CountingIterator
Strided range iterator original code: https://github.com/thrust/thrust/blob/master/examples/strided_r...
thrust::iterator_difference< Iterator >::type difference_type
PermutationIterator iterator
type of the strided_range iterator
strided_range(Iterator first, Iterator last, difference_type stride)
construct strided_range for the range [first,last)
thrust::permutation_iterator< Iterator, TransformIterator > PermutationIterator