encode.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2024, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
7 #include <cudf/column/column.hpp>
11 
12 namespace CUDF_EXPORT cudf {
13 namespace dictionary {
48 std::unique_ptr<column> encode(
49  column_view const& column,
50  data_type indices_type = data_type{type_id::INT32},
53 
69 std::unique_ptr<column> decode(
70  dictionary_column_view const& dictionary_column,
73  // end of group
75 } // namespace dictionary
76 } // namespace CUDF_EXPORT cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
A container of nullable device data as a column of elements.
Definition: column.hpp:36
Indicator for the logical data type of an element in a column.
Definition: types.hpp:238
A wrapper class for operations on a dictionary column.
Class definition for cudf::column.
column view class definitions
Class definition for cudf::dictionary_column_view.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
std::unique_ptr< column > encode(column_view const &column, data_type indices_type=data_type{type_id::INT32}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Construct a dictionary column by dictionary encoding an existing column.
std::unique_ptr< column > decode(dictionary_column_view const &dictionary_column, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Create a column by gathering the keys from the provided dictionary_column into a new column using the...
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
detail::cccl_async_resource_ref< cuda::mr::resource_ref< cuda::mr::device_accessible > > device_async_resource_ref
cuDF interfaces
Definition: host_udf.hpp:26