Public Member Functions | List of all members
cudf::interop::arrow_column Class Reference

A standard interchange medium for ArrowDeviceArray data in cudf. More...

#include <interop.hpp>

Public Member Functions

 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())
 Construct a new arrow column object. More...
 
 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())
 Construct a new arrow column object. More...
 
 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())
 Construct a new arrow column object. More...
 
void 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 column to an ArrowSchema. More...
 
void 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 column to an ArrowDeviceArray. More...
 
column_view view () const
 Get a view of the column data. More...
 

Detailed Description

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 column. On the other end, it provides the shared lifetime management expected by arrow consumers rather than the single-owner mechanism of cudf::column.

Definition at line 232 of file interop.hpp.

Constructor & Destructor Documentation

◆ arrow_column() [1/3]

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() 
)

Construct a new arrow column object.

The input column will be moved into the arrow_column, so it is no longer suitable for use afterwards.

Parameters
inputcudf column to convert to arrow
metadataColumn metadata for the column
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used for any allocations during conversion

◆ arrow_column() [2/3]

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() 
)

Construct a new arrow column object.

The input array will be moved into the arrow_column, so it is no longer suitable for use afterwards. For consistency, this is done even if the source array points to host data.

Parameters
schemaArrow schema for the column
inputArrowDeviceArray data for the column
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used for any allocations during conversion

◆ arrow_column() [3/3]

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() 
)

Construct a new arrow column 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.

Parameters
schemaArrow schema for the column
inputArrowArray data for the column
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used for any allocations during conversion

Member Function Documentation

◆ to_arrow()

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

Convert the column to an ArrowDeviceArray.

Parameters
outputArrowDeviceArray to populate with the column's data
device_typeArrowDeviceType to set on the output
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used for any allocations during conversion

◆ to_arrow_schema()

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

Convert the column to an ArrowSchema.

The resulting schema is a deep copy of the arrow_column's schema and is not tied to its lifetime.

Parameters
outputArrowSchema to populate with the column's schema
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used for any allocations during conversion

◆ view()

column_view cudf::interop::arrow_column::view ( ) const

Get a view of the column data.

Parameters
streamCUDA stream used for device memory operations and kernel launches
mrDevice memory resource used for any allocations during conversion
Returns
A view of the column data

The documentation for this class was generated from the following file: