表类#
- group Table
-
class table#
- #include <table.hpp>
一组大小相同的 cudf::column。
公共函数
-
explicit table(table const &other, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref())#
通过复制另一个表的内容构造一个新表。
对所有分配和复制使用指定的
stream
和 device_memory_resource。- 参数:
other – 要复制的表
stream – 用于设备内存操作的 CUDA 流。
mr – 用于所有设备内存分配的设备内存资源
-
table(std::vector<std::unique_ptr<column>> &&columns)#
从 unique_ptr 向量移动内容到列,以构造一个新表。
- 参数:
columns – 向量,包含指向列的
unique_ptr
,其内容将被移入新表。
-
table(table_view view, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref())#
复制
table_view
的内容以构造一个新table
。- 参数:
view – 其内容将被复制以创建新
table
的视图stream – 用于设备内存操作的 CUDA 流。
mr – 用于为新列分配设备内存的设备内存资源
-
table_view view() const#
返回此
table
内容的不可变、非拥有的table_view
。- 返回:
此
table
内容的不可变、非拥有的table_view
-
inline operator table_view() const#
转换为此
table
内容的不可变、非拥有的table_view
的转换运算符。
-
mutable_table_view mutable_view()#
返回此
table
内容的可变、非拥有的mutable_table_view
。- 返回:
此
table
内容的可变、非拥有的mutable_table_view
-
inline operator mutable_table_view()#
转换为此
table
内容的可变、非拥有的mutable_table_view
的转换运算符。
-
std::vector<std::unique_ptr<column>> release()#
通过返回指向组成列的
unique_ptr
向量来释放列的所有权。在
release()
后,num_columns() == 0
并且num_rows() == 0
- 返回:
指向组成列的
unique_ptr
向量
-
template<typename InputIterator>
inline table_view select(InputIterator begin, InputIterator end) const# 返回使用列索引范围构建的 table_view。
- 抛出:
std::out_of_range – 如果任何索引超出 [0, num_columns()) 范围
- 参数:
begin – 范围的起始
end – 范围的结束
- 返回:
一个 table_view,由原始表中
column_indices
元素指定的列组成
-
inline table_view select(std::vector<cudf::size_type> const &column_indices) const#
返回包含指定列集的 table_view。
- 抛出:
std::out_of_range – 如果
column_indices
中的任何元素超出 [0, num_columns()) 范围- 参数:
column_indices – 表中列的索引
- 返回:
一个 table_view,由原始表中
column_indices
元素指定的列组成
-
explicit table(table const &other, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref())#
-
class table_view : public cudf::detail::table_view_base<column_view>#
- #include <table_view.hpp>
一组大小相同的 cudf::column_view。
所有公共成员函数和构造函数都继承自
table_view_base<column_view>
。公共类型
-
using ColumnView = column_view#
表所包含的列视图类型。
公共函数
-
table_view(std::vector<table_view> const &views)#
从 table view 向量构造一个表。
注意
由于
std::vector
可以从std::initializer_list
构造,此构造函数也支持以下用法table_view t0, t1, t2; ... table_view t{{t0,t1,t2}}; // Creates a `table` from the columns of t0, t1, t2
- 抛出:
cudf::logic_error – 如果行数不匹配
- 参数:
views – 用于构造表的 table views 向量
-
template<typename InputIterator>
inline table_view select(InputIterator begin, InputIterator end) const# 返回使用列索引范围构建的 table_view。
- 抛出:
std::out_of_range – 如果任何索引超出 [0, num_columns()) 范围
- 参数:
begin – 范围的起始
end – 范围的结束
- 返回:
一个 table_view,由原始表中
column_indices
元素指定的列组成
-
table_view select(std::vector<size_type> const &column_indices) const#
返回包含指定列集的 table_view。
- 抛出:
std::out_of_range – 如果
column_indices
中的任何元素超出 [0, num_columns()) 范围- 参数:
column_indices – 表中列的索引
- 返回:
一个 table_view,由原始表中
column_indices
元素指定的列组成
-
using ColumnView = column_view#
-
class mutable_table_view : public cudf::detail::table_view_base<mutable_column_view>#
- #include <table_view.hpp>
一组大小相同的
mutable_column_view
。所有公共成员函数和构造函数都继承自
table_view_base<mutable_column_view>
。公共类型
-
using ColumnView = mutable_column_view#
表中列视图的类型。
公共函数
-
inline mutable_column_view &column(size_type column_index) const#
返回指定索引处的列。
- 参数:
column_index – 目标列的索引
- 返回:
对目标列的可变列视图引用
-
operator table_view()#
创建列的不可变
table_view
。
-
mutable_table_view(std::vector<mutable_table_view> const &views)#
从 table view 向量构造一个表。
注意
由于
std::vector
可以从std::initializer_list
构造,此构造函数也支持以下用法table_view t0, t1, t2; ... table_view t{{t0,t1,t2}}; // Creates a `table` from the columns of t0, t1, t2
- 抛出:
cudf::logic_error – 如果行数不匹配
- 参数:
views – 用于构造表的 table views 向量
-
using ColumnView = mutable_column_view#
-
class table#