加载中...
搜索中...
无匹配项
cuspatial::range< IteratorType > 类模板参考

表示任何可以用起始和结束迭代器表示的容器的抽象数据类型 (ADT)。更多...

公共类型

using value_type = iterator_value_type<IteratorType>
 

公共成员函数

 range (IteratorType begin, IteratorType end)
 
auto CUSPATIAL_HOST_DEVICE begin ()
 返回范围的起始迭代器。
 
auto CUSPATIAL_HOST_DEVICE end ()
 返回范围的结束迭代器。
 
auto CUSPATIAL_HOST_DEVICE size ()
 返回范围的大小。
 
template<typename IndexType>
auto &CUSPATIAL_HOST_DEVICE operator[] (IndexType i)
 访问范围中的第 i 个元素。
 

详细描述

template<typename IteratorType>
class cuspatial::range< IteratorType >

表示任何可以用起始和结束迭代器表示的容器的抽象数据类型 (ADT)。

这类似于 span,但迭代器可以由生成器构成。

注意
虽然此结构可用于设备和主机代码,但此结构不提供隐式的设备-主机传输。开发者应谨慎,不要从主机访问设备内存或反之亦然。
模板参数
类型起始迭代器和结束迭代器。IteratorType 必须满足 LegacyRandomAccessIteratorLinkLRAI 要求。

定义于文件第 43range.cuh.

成员类型定义文档

◆ value_type

template<typename IteratorType>
using cuspatial::range< IteratorType >::value_type = iterator_value_type<IteratorType>

定义于文件第 45range.cuh.

构造函数和析构函数文档

◆ range()

template<typename IteratorType>
cuspatial::range< IteratorType >::range ( IteratorType begin,
IteratorType end )
inline

定义于文件第 46range.cuh.

成员函数文档

◆ begin()

template<typename IteratorType>
auto CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::begin ( )
inline

返回范围的起始迭代器。

定义于文件第 49range.cuh.

◆ end()

template<typename IteratorType>
auto CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::end ( )
inline

返回范围的结束迭代器。

定义于文件第 51range.cuh.

◆ operator[]()

template<typename IteratorType>
template<typename IndexType>
auto &CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::operator[] ( IndexType i)
inline

访问范围中的第 i 个元素。

定义于文件第 57range.cuh.

◆ size()

template<typename IteratorType>
auto CUSPATIAL_HOST_DEVICE cuspatial::range< IteratorType >::size ( )
inline

返回范围的大小。

定义于文件第 53range.cuh.


本类的文档由以下文件生成