cudf 中 ArrowDeviceArray 数据的一种标准交换媒介。 更多...
#include <interop.hpp>
cudf 中 ArrowDeviceArray 数据的一种标准交换媒介。
此类提供了一种在 cudf 中处理 ArrowDeviceArray 数据的方式,同时不牺牲 cudf 列所期望的 API。另一方面,它提供了 arrow 消费者所期望的共享生命周期管理,而不是 cudf::column 的单一所有者机制。
定义于文件 interop.hpp 的 第 232 行。
cudf::interop::arrow_column::arrow_column | ( | cudf::column && | input, |
column_metadata const & | metadata, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
构造新的 arrow column 对象。
输入列将被移动到 arrow_column 中,因此之后不再适合使用。
input | 要转换为 arrow 的 cudf 列 |
metadata | 列的元数据 |
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 转换过程中用于任何分配的设备内存资源 |
cudf::interop::arrow_column::arrow_column | ( | ArrowSchema && | schema, |
ArrowDeviceArray && | input, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
构造新的 arrow column 对象。
输入数组将被移动到 arrow_column 中,因此之后不再适合使用。为了保持一致性,即使源数组指向主机数据,也会这样做。
schema | 列的 Arrow schema |
input | 列的 ArrowDeviceArray 数据 |
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 转换过程中用于任何分配的设备内存资源 |
cudf::interop::arrow_column::arrow_column | ( | ArrowSchema && | schema, |
ArrowArray && | input, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
构造新的 arrow column 对象。
输入数组将被释放,因此之后不再适合使用。为了与 arrow_table 的其他构造函数保持一致,即使源数据始终是主机数据,也会这样做。
schema | 列的 Arrow schema |
input | 列的 ArrowArray 数据 |
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 转换过程中用于任何分配的设备内存资源 |
void cudf::interop::arrow_column::to_arrow | ( | ArrowDeviceArray * | output, |
ArrowDeviceType | device_type = ARROW_DEVICE_CUDA , |
||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) | const |
将列转换为 ArrowDeviceArray。
output | 用于填充列数据的 ArrowDeviceArray |
device_type | 在输出上设置的 ArrowDeviceType |
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 转换过程中用于任何分配的设备内存资源 |
void cudf::interop::arrow_column::to_arrow_schema | ( | ArrowSchema * | output, |
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) | const |
将列转换为 ArrowSchema。
生成的 schema 是 arrow_column 的 schema 的深层副本,并且不与其生命周期绑定。
output | 用于填充列 schema 的 ArrowSchema |
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 转换过程中用于任何分配的设备内存资源 |
column_view cudf::interop::arrow_column::view | ( | ) | const |
获取列数据的视图。
stream | 用于设备内存操作和内核启动的 CUDA stream |
mr | 转换过程中用于任何分配的设备内存资源 |