19#include <cuspatial/cuda_utils.hpp>
20#include <cuspatial/traits.hpp>
22#include <thrust/detail/raw_reference_cast.h>
23#include <thrust/distance.h>
42template <
typename IteratorType>
45 using value_type = iterator_value_type<IteratorType>;
49 auto CUSPATIAL_HOST_DEVICE
begin() {
return _begin; }
51 auto CUSPATIAL_HOST_DEVICE
end() {
return _end; }
53 auto CUSPATIAL_HOST_DEVICE
size() {
return thrust::distance(_begin, _end); }
56 template <
typename IndexType>
59 return thrust::raw_reference_cast(_begin[i]);
auto &CUSPATIAL_HOST_DEVICE operator[](IndexType i)
访问范围内的第 i 个元素。
auto CUSPATIAL_HOST_DEVICE end()
返回范围的结束迭代器。
auto CUSPATIAL_HOST_DEVICE begin()
返回范围的起始迭代器。
auto CUSPATIAL_HOST_DEVICE size()
返回范围的大小。