From 10bfe094fd526fec275c229b28cb4daf3615c64d Mon Sep 17 00:00:00 2001 From: Haoyang Li Date: Wed, 13 Dec 2023 16:09:32 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Mike Wilson Co-authored-by: Nghia Truong <7416935+ttnghia@users.noreply.github.com> --- src/main/cpp/src/cast_string.hpp | 4 ++-- src/main/cpp/src/format_float.cu | 9 +++++---- .../java/com/nvidia/spark/rapids/jni/CastStrings.java | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/cpp/src/cast_string.hpp b/src/main/cpp/src/cast_string.hpp index 84df3f71b1..43ec36e576 100644 --- a/src/main/cpp/src/cast_string.hpp +++ b/src/main/cpp/src/cast_string.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -117,7 +117,7 @@ std::unique_ptr string_to_float( std::unique_ptr format_float( cudf::column_view const& input, - int digits, + int const digits, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource()); diff --git a/src/main/cpp/src/format_float.cu b/src/main/cpp/src/format_float.cu index cdcb75fc9a..b9bbb26cb2 100644 --- a/src/main/cpp/src/format_float.cu +++ b/src/main/cpp/src/format_float.cu @@ -23,6 +23,7 @@ #include #include + #include #include @@ -75,7 +76,7 @@ struct format_float_fn { struct dispatch_format_float_fn { template )> std::unique_ptr operator()(cudf::column_view const& floats, - int digits, + int const digits, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) const { @@ -97,7 +98,7 @@ struct dispatch_format_float_fn { // non-float types throw an exception template )> std::unique_ptr operator()(cudf::column_view const&, - int, + int const, rmm::cuda_stream_view, rmm::mr::device_memory_resource*) const { @@ -109,7 +110,7 @@ struct dispatch_format_float_fn { // This will convert all float column types into a strings column. std::unique_ptr format_float(cudf::column_view const& floats, - int digits, + int const digits, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) { @@ -120,7 +121,7 @@ std::unique_ptr format_float(cudf::column_view const& floats, // external API std::unique_ptr format_float(cudf::column_view const& floats, - int digits, + int const digits, rmm::cuda_stream_view stream, rmm::mr::device_memory_resource* mr) { diff --git a/src/main/java/com/nvidia/spark/rapids/jni/CastStrings.java b/src/main/java/com/nvidia/spark/rapids/jni/CastStrings.java index 93c3c0f21a..cd6f62371b 100644 --- a/src/main/java/com/nvidia/spark/rapids/jni/CastStrings.java +++ b/src/main/java/com/nvidia/spark/rapids/jni/CastStrings.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.