| 公有类型 | 公有成员函数 | 所有成员列表
cudf::list_device_view 类参考

表示任意类型(包括进一步嵌套的列表)元素列表的设备数据的非拥有、不可变视图。 更多...

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 >
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 行。

构造函数与析构函数文档

◆ list_device_view()

cudf::list_device_view::list_device_view ( lists_column_device_view const &  lists_column,
size_type const &  row_index 
)
inline

根据列表列和索引构造一个 list_device_view

参数
lists_column包含要查看的列表的列表列设备视图
row_index要查看的列表行的索引

定义于文件 list_device_view.cuh 的第 46 行。

成员函数文档

◆ element()

template<typename T >
T cudf::list_device_view::element ( size_type  idx) const
inline

获取列表行中指定索引处的元素。

模板参数
T列表元素的类型。
参数
idx列表行中的索引
返回值
列表行中指定索引处的元素。

定义于文件 list_device_view.cuh 的第 100 行。

◆ element_offset()

size_type cudf::list_device_view::element_offset ( size_type  idx) const
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 行。

◆ get_column()

lists_column_device_view const& cudf::list_device_view::get_column ( ) const
inline

获取包含此列表的 lists_column_device_view

返回值
包含此列表的 lists_column_device_view

定义于文件 list_device_view.cuh 的第 144 行。

◆ is_null() [1/2]

bool cudf::list_device_view::is_null ( ) const
inline

检查此列表行是否为 null。

返回值
如果此列表为 null,则为 true

定义于文件 list_device_view.cuh 的第 123 行。

◆ is_null() [2/2]

bool cudf::list_device_view::is_null ( size_type  idx) const
inline

检查列表中指定索引处的元素是否为 null。

参数
idx列表行中的索引
返回值
如果列表行中指定索引处的元素为 null,则为 true

定义于文件 list_device_view.cuh 的第 111 行。

◆ pair_begin()

template<typename T >
const_pair_iterator<T> cudf::list_device_view::pair_begin ( ) const
inline

获取 list_device_view 中第一个元素的 pair 迭代器。

解引用返回的迭代器将得到一个 thrust::pair<T, bool>

如果索引 i 处的元素有效,则对于 p = iter[i]

  1. p.first 是索引 i 处元素的值
  2. p.second == true

如果索引 i 处的元素为 null,

  1. p.first 未定义
  2. p.second == false
返回值
指向 list_device_view 中第一个元素的 pair 迭代器,以及该元素是否有效

定义于文件 list_device_view.cuh 的第 182 行。

◆ pair_end()

template<typename T >
const_pair_iterator<T> cudf::list_device_view::pair_end ( ) const
inline

获取 list_device_view 中最后一个元素后一个位置的 pair 迭代器。

返回值
指向 list_device_view 中最后一个元素后一个位置的 pair 迭代器,以及该元素是否有效

定义于文件 list_device_view.cuh 的第 195 行。

◆ pair_rep_begin()

template<typename T >
const_pair_rep_iterator<T> cudf::list_device_view::pair_rep_begin ( ) const
inline

获取 list_device_view 中第一个元素的 pair 迭代器。

解引用返回的迭代器将得到一个 thrust::pair<rep_type, bool>,其中 rep_typedevice_storage_type_t<T>,即用于在设备上存储值的类型。

如果索引 i 处的元素有效,则对于 p = iter[i]

  1. p.first 是索引 i 处元素的值
  2. p.second == true

如果索引 i 处的元素为 null,

  1. p.first 未定义
  2. p.second == false
返回值
指向 list_device_view 中第一个元素的 pair 迭代器,以及该元素是否有效

定义于文件 list_device_view.cuh 的第 220 行。

◆ pair_rep_end()

template<typename T >
const_pair_rep_iterator<T> cudf::list_device_view::pair_rep_end ( ) const
inline

获取 list_device_view 中最后一个元素后一个位置的 pair 迭代器。

返回值
指向 list_device_view 中最后一个元素后一个位置的 pair 迭代器,以及该元素是否有效

定义于文件 list_device_view.cuh 的第 234 行。

◆ row_index()

size_type cudf::list_device_view::row_index ( ) const
inline

返回此列表在原始列表列中的行索引。

返回值
此列表的行索引

定义于文件 list_device_view.cuh 的第 137 行。

◆ size()

size_type cudf::list_device_view::size ( ) const
inline

获取此列表行中的元素数量。

返回值
此列表行中的元素数量

定义于文件 list_device_view.cuh 的第 130 行。


此类的文档生成自以下文件