round.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #pragma once
7 
8 #include <cudf/column/column.hpp>
10 #include <cudf/utilities/export.hpp>
12 
13 namespace CUDF_EXPORT cudf {
14 
29 enum class rounding_method : int32_t { HALF_UP, HALF_EVEN };
30 
66 [[deprecated]] std::unique_ptr<column> round(
67  column_view const& input,
68  int32_t decimal_places = 0,
69  rounding_method method = rounding_method::HALF_UP,
72 
105 std::unique_ptr<column> round_decimal(
106  column_view const& input,
107  int32_t decimal_places = 0,
108  rounding_method method = rounding_method::HALF_UP,
111  // end of group
113 } // 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...
Class definition for cudf::column.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
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
rounding_method
Different rounding methods for cudf::round
Definition: round.hpp:29
std::unique_ptr< column > round(column_view const &input, int32_t decimal_places=0, rounding_method method=rounding_method::HALF_UP, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Rounds all the values in a column to the specified number of decimal places.
std::unique_ptr< column > round_decimal(column_view const &input, int32_t decimal_places=0, rounding_method method=rounding_method::HALF_UP, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Rounds all the values in a column to the specified number of decimal places.
cuDF interfaces
Definition: host_udf.hpp:26