diff --git a/cpp/include/cudf/ast/detail/transform.cuh b/cpp/include/cudf/ast/detail/transform.cuh index 5354ba52658..20c9e2953ed 100644 --- a/cpp/include/cudf/ast/detail/transform.cuh +++ b/cpp/include/cudf/ast/detail/transform.cuh @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -371,14 +372,19 @@ struct ast_plan { // Create device pointers to components of plan auto device_data_buffer_ptr = static_cast(_device_data_buffer.data()); - _device_data_references = reinterpret_cast( - device_data_buffer_ptr + buffer_offsets[0]); - _device_literals = reinterpret_cast( - device_data_buffer_ptr + buffer_offsets[1]); - _device_operators = - reinterpret_cast(device_data_buffer_ptr + buffer_offsets[2]); - _device_operator_source_indices = - reinterpret_cast(device_data_buffer_ptr + buffer_offsets[3]); + _device_data_references = device_span( + reinterpret_cast(device_data_buffer_ptr + + buffer_offsets[0]), + _sizes[0]); + _device_literals = device_span( + reinterpret_cast( + device_data_buffer_ptr + buffer_offsets[1]), + _sizes[1]); + _device_operators = device_span( + reinterpret_cast(device_data_buffer_ptr + buffer_offsets[2]), _sizes[2]); + _device_operator_source_indices = device_span( + reinterpret_cast(device_data_buffer_ptr + buffer_offsets[3]), + _sizes[3]); } /** @@ -399,10 +405,10 @@ struct ast_plan { std::vector _data_pointers; rmm::device_buffer _device_data_buffer; - const detail::device_data_reference* _device_data_references; - const cudf::detail::fixed_width_scalar_device_view_base* _device_literals; - const ast_operator* _device_operators; - const cudf::size_type* _device_operator_source_indices; + device_span _device_data_references; + device_span _device_literals; + device_span _device_operators; + device_span _device_operator_source_indices; }; /** diff --git a/cpp/src/ast/transform.cu b/cpp/src/ast/transform.cu index 5c94c89f462..1577ae925bc 100644 --- a/cpp/src/ast/transform.cu +++ b/cpp/src/ast/transform.cu @@ -123,11 +123,11 @@ std::unique_ptr compute_column(table_view const table, cudf::ast::detail::compute_column_kernel <<>>( *table_device, - plan._device_literals, + plan._device_literals.data(), *mutable_output_device, - plan._device_data_references, - plan._device_operators, - plan._device_operator_source_indices, + plan._device_data_references.data(), + plan._device_operators.data(), + plan._device_operator_source_indices.data(), num_operators, num_intermediates); CHECK_CUDA(stream.value());