表格类#
- group table_classes
-
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 进行所有分配和复制。- Parameters:
other – 要复制的表
stream – 用于设备内存操作的CUDA流。
mr – 用于所有设备内存分配的设备内存资源
-
table(std::vector<std::unique_ptr<column>> &&columns)#
将
unique_ptrs向量的内容移动到列中以构建一个新表。- Parameters:
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。- Parameters:
view – 该视图的内容将被复制以创建一个新的
tablestream – 用于设备内存操作的CUDA流。
mr – 用于为新列分配设备内存的设备内存资源
-
table_view view() const#
返回此
table内容的不可变、非拥有的table_view。- Returns:
一个不可变的、非拥有的
table_view,用于表示此table的内容
-
inline operator table_view() const#
转换操作符到一个不可变的、非拥有的
table_view,表示此table的内容。
-
mutable_table_view mutable_view()#
返回此
table内容的一个可变的、非拥有的mutable_table_view。- Returns:
一个可变的、非拥有的
mutable_table_view,表示此table的内容
-
inline operator mutable_table_view()#
将此
table内容转换为可变的、非拥有的mutable_table_view的转换操作符。
-
std::vector<std::unique_ptr<column>> release()#
通过返回一个指向组成列的
unique_ptr向量,释放column的所有权。在
release()之后,num_columns() == 0并且num_rows() == 0- Returns:
一个指向组成列的
unique_ptr的向量
-
template<typename InputIterator>
inline table_view select(InputIterator begin, InputIterator end) const# 返回一个由一系列列索引构建的table_view。
- Throws:
std::out_of_range – 如果任何索引超出 [0, num_columns())
- Parameters:
begin – 范围的开始
end – 范围的结束点
- Returns:
一个由
column_indices元素指定的原始表中的列组成的table_view
-
inline table_view select(std::vector<cudf::size_type> const &column_indices) const#
返回一个包含指定列集合的table_view。
- Throws:
std::out_of_range – 如果
column_indices中的任何元素超出 [0, num_columns()) 范围- Parameters:
column_indices – 表中列的索引
- Returns:
一个由
column_indices元素指定的原始表中的列组成的table_view
-
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)#
从表格视图的向量中构建一个表格。
注意
因为
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- Throws:
cudf::logic_error – 如果行数不匹配
- Parameters:
views – 用于构建表格的表格视图向量
-
template<typename InputIterator>
inline table_view select(InputIterator begin, InputIterator end) const# 返回一个由一系列列索引构建的table_view。
- Throws:
std::out_of_range – 如果任何索引超出 [0, num_columns()) 范围
- Parameters:
begin – 范围的开始
end – 范围的结束点
- Returns:
一个由
column_indices元素指定的原始表中的列组成的table_view
-
table_view select(std::vector<size_type> const &column_indices) const#
返回一个包含指定列集合的table_view。
- Throws:
std::out_of_range – 如果
column_indices中的任何元素超出 [0, num_columns()) 范围- Parameters:
column_indices – 表中列的索引
- Returns:
一个由
column_indices元素指定的原始表中的列组成的table_view
-
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#
返回指定索引处的列。
- Parameters:
column_index – 所需列的索引
- Returns:
对所需列的可变列视图引用
-
operator table_view()#
创建一个不可变的
table_view的列视图。
-
mutable_table_view(std::vector<mutable_table_view> const &views)#
从表格视图的向量中构建一个表格。
注意
因为
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- Throws:
cudf::logic_error – 如果行数不匹配
- Parameters:
views – 用于构建表格的表格视图向量
-
using ColumnView = mutable_column_view#
-
class table#