From 326edab0d0233e2dc9df8cc70c5256d32a79b7d8 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 23 Jan 2024 18:25:17 -0600 Subject: [PATCH] Fix calls to deprecated strings factory API in examples. (#14838) Follow-up PR to #14771. I noticed the strings example code still had a deprecated function call: ``` -- Build files have been written to: /opt/conda/conda-bld/work/cpp/examples/strings/build [1/8] Building CXX object CMakeFiles/libcudf_apis.dir/libcudf_apis.cpp.o [2/8] Linking CXX executable libcudf_apis [3/8] Building CUDA object CMakeFiles/custom_prealloc.dir/custom_prealloc.cu.o [4/8] Building CUDA object CMakeFiles/custom_with_malloc.dir/custom_with_malloc.cu.o [5/8] Linking CUDA executable custom_prealloc [6/8] Linking CUDA executable custom_with_malloc [7/8] Building CUDA object CMakeFiles/custom_optimized.dir/custom_optimized.cu.o /opt/conda/conda-bld/work/cpp/examples/strings/custom_optimized.cu: In function 'std::unique_ptr redact_strings(const cudf::column_view&, const cudf::column_view&)': /opt/conda/conda-bld/work/cpp/examples/strings/custom_optimized.cu:158:40: warning: 'std::unique_ptr cudf::make_strings_column(cudf::size_type, rmm::device_uvector&&, rmm::device_uvector&&, rmm::device_buffer&&, cudf::size_type)' is deprecated [-Wdeprecated-declarations] 158 | auto result = | ~ ^ /opt/conda/conda-bld/work/cpp/include/cudf/column/column_factories.hpp:510:42: note: declared here 510 | [[deprecated]] std::unique_ptr make_strings_column(size_type num_strings, | ^~~~~~~~~~~~~~~~~~~ [8/8] Linking CUDA executable custom_optimized ``` Authors: - Bradley Dice (https://github.com/bdice) Approvers: - David Wendt (https://github.com/davidwendt) - Vyas Ramasubramani (https://github.com/vyasr) - Mark Harris (https://github.com/harrism) URL: https://github.com/rapidsai/cudf/pull/14838 --- cpp/examples/strings/custom_optimized.cu | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/examples/strings/custom_optimized.cu b/cpp/examples/strings/custom_optimized.cu index 522093bc647..aa1468ea790 100644 --- a/cpp/examples/strings/custom_optimized.cu +++ b/cpp/examples/strings/custom_optimized.cu @@ -155,8 +155,7 @@ std::unique_ptr redact_strings(cudf::column_view const& names, *d_names, *d_visibilities, offsets.data(), chars.data()); // create column from offsets and chars vectors (no copy is performed) - auto result = - cudf::make_strings_column(names.size(), std::move(offsets), std::move(chars), {}, 0); + auto result = cudf::make_strings_column(names.size(), std::move(offsets), chars.release(), {}, 0); // wait for all of the above to finish stream.synchronize();