A standard interchange medium for ArrowDeviceArray data in cudf. More...
#include <interop.hpp>
A standard interchange medium for ArrowDeviceArray data in cudf.
This class provides a way to work with ArrowDeviceArray data in cudf without sacrificing the APIs expected of a cudf table. On the other end, it provides the shared lifetime management expected by arrow consumers rather than the single-owner mechanism of cudf::table.
Definition at line 337 of file interop.hpp.
cudf::interop::arrow_table::arrow_table | ( | cudf::table && | input, |
cudf::host_span< 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() |
||
) |
Construct a new arrow table object.
The input table will be moved into the arrow_table, so it is no longer suitable for use afterwards.
input | cudf table to convert to arrow |
metadata | The hierarchy of names of columns and children |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |
cudf::interop::arrow_table::arrow_table | ( | 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() |
||
) |
Construct a new arrow table object.
The input array will be moved into the arrow_table, so it is no longer suitable for use afterwards. For consistency, this is done even if the source array points to host data.
schema | Arrow schema for the table |
input | ArrowDeviceArray data for the table |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |
cudf::interop::arrow_table::arrow_table | ( | 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() |
||
) |
Construct a new arrow table object.
The input array will be released, so it is no longer suitable for use afterwards. This is done for consistency with other constructors of arrow_table even though the source data is always host data.
schema | Arrow schema for the table |
input | ArrowArray data for the table |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |
cudf::interop::arrow_table::arrow_table | ( | ArrowArrayStream && | input, |
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Construct a new arrow table object.
The stream will be released after the table is created, so it is no longer suitable for use afterwards. This is done for consistency with other constructors of arrow_table even though the source data is always host data.
input | ArrowArrayStream data for the table |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |
void cudf::interop::arrow_table::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 |
Convert the table to an ArrowDeviceArray.
output | ArrowDeviceArray to populate with the table's data |
device_type | ArrowDeviceType to set on the output |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |
void cudf::interop::arrow_table::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 |
Convert the table to an ArrowSchema.
The resulting schema is a deep copy of the arrow_column's schema and is not tied to its lifetime.
output | ArrowSchema to populate with the table's schema |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |
table_view cudf::interop::arrow_table::view | ( | ) | const |
Get a view of the table data.
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used for any allocations during conversion |