表示任意类型(包括进一步嵌套的列表)元素列表的设备数据的非拥有、不可变视图。 更多...
类 | |
struct | pair_accessor |
list_device_view 中元素的 pair 访问器 更多... | |
struct | pair_rep_accessor |
list_device_view 中元素的 pair rep 访问器 更多... | |
公有类型 | |
template<typename T > | |
using | const_pair_iterator = thrust::transform_iterator< pair_accessor< T >, thrust::counting_iterator< cudf::size_type > > |
列表的 const pair 迭代器 | |
template<typename T > | |
using | const_pair_rep_iterator = thrust::transform_iterator< pair_rep_accessor< T >, thrust::counting_iterator< cudf::size_type > > |
列表的 const pair 迭代器类型 | |
公有成员函数 | |
list_device_view (lists_column_device_view const &lists_column, size_type const &row_index) | |
根据列表列和索引构造一个 list_device_view。 更多... | |
size_type | element_offset (size_type idx) const |
获取列表中指定索引处的元素在列表列的子项中的偏移量。 更多... | |
template<typename T > | |
T | element (size_type idx) const |
获取列表行中指定索引处的元素。 更多... | |
bool | is_null (size_type idx) const |
检查列表中指定索引处的元素是否为 null。 更多... | |
bool | is_null () const |
检查此列表行是否为 null。 更多... | |
size_type | size () const |
获取此列表行中的元素数量。 更多... | |
size_type | row_index () const |
返回此列表在原始列表列中的行索引。 更多... | |
lists_column_device_view const & | get_column () const |
获取包含此列表的 lists_column_device_view 。 更多... | |
template<typename T > | |
const_pair_iterator< T > | pair_begin () const |
获取 list_device_view 中第一个元素的 pair 迭代器。 更多... | |
template<typename T > | |
const_pair_iterator< T > | pair_end () const |
获取 list_device_view 中最后一个元素后一个位置的 pair 迭代器。 更多... | |
template<typename T > | |
const_pair_rep_iterator< T > | pair_rep_begin () const |
获取 list_device_view 中第一个元素的 pair 迭代器。 更多... | |
template<typename T > | |
const_pair_rep_iterator< T > | pair_rep_end () const |
获取 list_device_view 中最后一个元素后一个位置的 pair 迭代器。 更多... | |
表示任意类型(包括进一步嵌套的列表)元素列表的设备数据的非拥有、不可变视图。
定义于文件 list_device_view.cuh 的第 34 行。
|
inline |
根据列表列和索引构造一个 list_device_view。
lists_column | 包含要查看的列表的列表列设备视图 |
row_index | 要查看的列表行的索引 |
定义于文件 list_device_view.cuh 的第 46 行。
|
inline |
获取列表中指定索引处的元素在列表列的子项中的偏移量。
考虑以下列表列:[ [0,1,2], [3,4,5], [6,7,8] ]
列表的内部结构看起来像:offsets: [0, 3, 6, 9] child : [0, 1, 2, 3, 4, 5, 6, 7, 8]
第二个列表行(即 row_index=1)是 [3,4,5]。第二个列表行的第三个元素(即 idx=2)是 5。
存储在子列中(即 5)的此元素的偏移量可以使用此方法获取。
idx | 要获取偏移量的列表元素的索引 |
定义于文件 list_device_view.cuh 的第 86 行。
|
inline |
获取包含此列表的 lists_column_device_view
。
lists_column_device_view
定义于文件 list_device_view.cuh 的第 144 行。
|
inline |
|
inline |
检查列表中指定索引处的元素是否为 null。
idx | 列表行中的索引 |
true
定义于文件 list_device_view.cuh 的第 111 行。
|
inline |
获取 list_device_view
中第一个元素的 pair 迭代器。
解引用返回的迭代器将得到一个 thrust::pair<T, bool>
。
如果索引 i
处的元素有效,则对于 p = iter[i]
,
p.first
是索引 i
处元素的值p.second == true
如果索引 i
处的元素为 null,
p.first
未定义p.second == false
list_device_view
中第一个元素的 pair 迭代器,以及该元素是否有效定义于文件 list_device_view.cuh 的第 182 行。
|
inline |
获取 list_device_view
中最后一个元素后一个位置的 pair 迭代器。
list_device_view
中最后一个元素后一个位置的 pair 迭代器,以及该元素是否有效定义于文件 list_device_view.cuh 的第 195 行。
|
inline |
获取 list_device_view
中第一个元素的 pair 迭代器。
解引用返回的迭代器将得到一个 thrust::pair<rep_type, bool>
,其中 rep_type
是 device_storage_type_t<T>
,即用于在设备上存储值的类型。
如果索引 i
处的元素有效,则对于 p = iter[i]
,
p.first
是索引 i
处元素的值p.second == true
如果索引 i
处的元素为 null,
p.first
未定义p.second == false
list_device_view
中第一个元素的 pair 迭代器,以及该元素是否有效定义于文件 list_device_view.cuh 的第 220 行。
|
inline |
获取 list_device_view
中最后一个元素后一个位置的 pair 迭代器。
list_device_view
中最后一个元素后一个位置的 pair 迭代器,以及该元素是否有效定义于文件 list_device_view.cuh 的第 234 行。
|
inline |
|
inline |