From 819adac4f318beaa08fc0063b538cb02ec5c56e7 Mon Sep 17 00:00:00 2001 From: Karthikeyan Natarajan Date: Wed, 31 Mar 2021 15:09:11 +0530 Subject: [PATCH] add missing stream, mr argument to make_unique --- cpp/src/dictionary/replace.cu | 4 ++-- cpp/src/lists/copying/copying.cu | 4 +++- cpp/src/replace/replace.cu | 4 ++-- cpp/src/strings/convert/convert_urls.cu | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cpp/src/dictionary/replace.cu b/cpp/src/dictionary/replace.cu index f8f1d01b4a5..9b644f38794 100644 --- a/cpp/src/dictionary/replace.cu +++ b/cpp/src/dictionary/replace.cu @@ -85,7 +85,7 @@ std::unique_ptr replace_nulls(dictionary_column_view const& input, rmm::mr::device_memory_resource* mr) { if (input.is_empty()) { return cudf::empty_like(input.parent()); } - if (!input.has_nulls()) { return std::make_unique(input.parent()); } + if (!input.has_nulls()) { return std::make_unique(input.parent(), stream, mr); } CUDF_EXPECTS(input.keys().type() == replacement.keys().type(), "keys must match"); CUDF_EXPECTS(replacement.size() == input.size(), "column sizes must match"); @@ -118,7 +118,7 @@ std::unique_ptr replace_nulls(dictionary_column_view const& input, { if (input.is_empty()) { return cudf::empty_like(input.parent()); } if (!input.has_nulls() || !replacement.is_valid()) { - return std::make_unique(input.parent()); + return std::make_unique(input.parent(), stream, mr); } CUDF_EXPECTS(input.keys().type() == replacement.type(), "keys must match scalar type"); diff --git a/cpp/src/lists/copying/copying.cu b/cpp/src/lists/copying/copying.cu index 7d8ec5fe710..3f4f02cf910 100644 --- a/cpp/src/lists/copying/copying.cu +++ b/cpp/src/lists/copying/copying.cu @@ -70,7 +70,9 @@ std::unique_ptr copy_slice(lists_column_view const& lists, (lists.child().type() == cudf::data_type{type_id::LIST}) ? copy_slice(lists_column_view(lists.child()), start_offset, end_offset, stream, mr) : std::make_unique( - cudf::detail::slice(lists.child(), {start_offset, end_offset}, stream).front()); + cudf::detail::slice(lists.child(), {start_offset, end_offset}, stream).front(), + stream, + mr); // Compute the null mask of the result: auto null_mask = cudf::detail::copy_bitmask(lists.null_mask(), start, end, stream, mr); diff --git a/cpp/src/replace/replace.cu b/cpp/src/replace/replace.cu index cb142c2c1e2..517ef91eecb 100644 --- a/cpp/src/replace/replace.cu +++ b/cpp/src/replace/replace.cu @@ -497,8 +497,8 @@ std::unique_ptr find_and_replace_all(cudf::column_view const& inpu "Columns type mismatch"); CUDF_EXPECTS(values_to_replace.has_nulls() == false, "values_to_replace must not have nulls"); - if (0 == input_col.size() || 0 == values_to_replace.size() || 0 == replacement_values.size()) { - return std::make_unique(input_col); + if (input_col.is_empty() or values_to_replace.is_empty() or replacement_values.is_empty()) { + return std::make_unique(input_col, stream, mr); } return cudf::type_dispatcher(input_col.type(), diff --git a/cpp/src/strings/convert/convert_urls.cu b/cpp/src/strings/convert/convert_urls.cu index cdca23a3584..54f73e70f58 100644 --- a/cpp/src/strings/convert/convert_urls.cu +++ b/cpp/src/strings/convert/convert_urls.cu @@ -355,7 +355,7 @@ std::unique_ptr url_decode( if (esc_count == 0) { // nothing to replace, so just copy the input column - return std::make_unique(strings.parent()); + return std::make_unique(strings.parent(), stream, mr); } // create a vector of the potential escape sequence positions @@ -378,7 +378,7 @@ std::unique_ptr url_decode( esc_count = esc_pos_end - d_esc_positions; if (esc_count == 0) { // nothing to replace, so just copy the input column - return std::make_unique(strings.parent()); + return std::make_unique(strings.parent(), stream, mr); } device_span d_esc_positions_span(d_esc_positions, esc_count);