From 975d22fa819a94d2c5240ed967c644ff314df4d8 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Mon, 17 May 2021 20:44:14 -0400 Subject: [PATCH] Correct unused parameter warnings in dictonary algorithms (#8239) Starting in CUDA 11.3, nvcc will start to unconditionally warn about unused parameters on functions/methods that are in anonymous namespaces. Authors: - Robert Maynard (https://github.com/robertmaynard) Approvers: - David Wendt (https://github.com/davidwendt) - Karthikeyan (https://github.com/karthikeyann) URL: https://github.com/rapidsai/cudf/pull/8239 --- cpp/src/dictionary/detail/concatenate.cu | 12 ++----- cpp/src/dictionary/search.cu | 45 ++++++++---------------- cpp/src/dictionary/set_keys.cu | 9 ++--- 3 files changed, 21 insertions(+), 45 deletions(-) diff --git a/cpp/src/dictionary/detail/concatenate.cu b/cpp/src/dictionary/detail/concatenate.cu index 8cf329cf23e..4aa1e3e2278 100644 --- a/cpp/src/dictionary/detail/concatenate.cu +++ b/cpp/src/dictionary/detail/concatenate.cu @@ -169,18 +169,12 @@ struct dispatch_compute_indices { return result; } - template + template typename std::enable_if_t(), std::unique_ptr> - operator()(column_view const&, - column_view const&, - column_view const&, - offsets_pair const*, - size_type const*, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource*) + operator()(Args&&...) { - CUDF_FAIL("list_view as keys for dictionary not supported"); + CUDF_FAIL("dictionary concatenate not supported for this column type"); } }; diff --git a/cpp/src/dictionary/search.cu b/cpp/src/dictionary/search.cu index 0aaf10707f4..5db12d75d62 100644 --- a/cpp/src/dictionary/search.cu +++ b/cpp/src/dictionary/search.cu @@ -45,7 +45,7 @@ struct dispatch_scalar_index { template ()>* = nullptr> - std::unique_ptr operator()(Args&&... args) + std::unique_ptr operator()(Args&&...) { CUDF_FAIL("indices must be an integral type"); } @@ -89,33 +89,18 @@ struct find_index_fn { stream, mr); } - template ::value>* = nullptr> - std::unique_ptr operator()(dictionary_column_view const& input, - scalar const& key, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr) const - { - CUDF_FAIL("dictionary column cannot be the keys column of another dictionary"); - } - - template ::value>* = nullptr> - std::unique_ptr operator()(dictionary_column_view const& input, - scalar const& key, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr) const - { - CUDF_FAIL("list_view column cannot be the keys column of a dictionary"); - } template ::value>* = nullptr> - std::unique_ptr operator()(dictionary_column_view const& input, - scalar const& key, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr) const + std::enable_if_t::value or + std::is_same::value or + std::is_same::value>* = nullptr> + std::unique_ptr operator()(dictionary_column_view const&, + scalar const&, + rmm::cuda_stream_view, + rmm::mr::device_memory_resource*) const { - CUDF_FAIL("struct_view column cannot be the keys column of a dictionary"); + CUDF_FAIL( + "dictionary, list_view, and struct_view columns cannot be the keys column of a dictionary"); } }; @@ -151,12 +136,12 @@ struct find_insert_index_fn { std::enable_if_t::value or std::is_same::value or std::is_same::value>* = nullptr> - std::unique_ptr operator()(dictionary_column_view const& input, - scalar const& key, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr) const + std::unique_ptr operator()(dictionary_column_view const&, + scalar const&, + rmm::cuda_stream_view, + rmm::mr::device_memory_resource*) const { - CUDF_FAIL("column cannot be the keys for dictionary"); + CUDF_FAIL("dictionary, list_view, and struct_view columns cannot be the keys for a dictionary"); } }; diff --git a/cpp/src/dictionary/set_keys.cu b/cpp/src/dictionary/set_keys.cu index e3bf1b186d1..8f07c9cbbed 100644 --- a/cpp/src/dictionary/set_keys.cu +++ b/cpp/src/dictionary/set_keys.cu @@ -85,15 +85,12 @@ struct dispatch_compute_indices { return result; } - template + template typename std::enable_if_t(), std::unique_ptr> - operator()(dictionary_column_view const& input, - column_view const& new_keys, - rmm::cuda_stream_view stream, - rmm::mr::device_memory_resource* mr) + operator()(Args&&...) { - CUDF_FAIL("list_view dictionary set_keys not supported yet"); + CUDF_FAIL("dictionary set_keys not supported for this column type"); } };