diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index f06a7a6ceaa1..26b7ee68aad7 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -943,18 +943,16 @@ add_library( src/reductions/segmented/nunique.cu src/reductions/segmented/product.cu src/reductions/segmented/reductions.cpp - src/reductions/segmented/std.cu + src/reductions/segmented/std_var.cu src/reductions/segmented/sum.cu src/reductions/segmented/sum_of_squares.cu src/reductions/segmented/update_validity.cu - src/reductions/segmented/var.cu - src/reductions/std.cu + src/reductions/std_var.cu src/reductions/sum.cu src/reductions/sum_of_squares.cu src/reductions/sum_overflow.cu src/reductions/unique_count.cu src/reductions/unique_count_column.cu - src/reductions/var.cu src/replace/clamp.cu src/replace/nans.cu src/replace/nulls.cu diff --git a/cpp/include/cudf/strings/detail/copy_if_else.cuh b/cpp/include/cudf/strings/detail/copy_if_else.cuh index a5e37c953727..9e842a8d1889 100644 --- a/cpp/include/cudf/strings/detail/copy_if_else.cuh +++ b/cpp/include/cudf/strings/detail/copy_if_else.cuh @@ -78,7 +78,7 @@ std::unique_ptr copy_if_else(StringIterLeft lhs_begin, }); // convert vector into strings column - auto result = make_strings_column(indices.begin(), indices.end(), stream, mr); + auto result = cudf::make_strings_column(indices, stream, mr); result->set_null_mask(std::move(null_mask), null_count); return result; } diff --git a/cpp/include/cudf/strings/detail/strings_children.cuh b/cpp/include/cudf/strings/detail/strings_children.cuh index 1f031099c235..27fbbfca6bc9 100644 --- a/cpp/include/cudf/strings/detail/strings_children.cuh +++ b/cpp/include/cudf/strings/detail/strings_children.cuh @@ -14,8 +14,10 @@ #include #include #include +#include #include #include +#include #include @@ -31,6 +33,21 @@ namespace cudf { namespace strings { namespace detail { +/** + * @brief Create an offsets column from already-materialized string sizes. + * + * This overload centralizes the common size_type input case so callers do not each + * instantiate the same CUB scan kernels. + * + * @param sizes The per-string byte sizes + * @param stream CUDA stream used for device memory operations and kernel launches + * @param mr Device memory resource used to allocate the returned column's device memory + * @return Offsets column and total bytes + * @throw std::overflow_error if the output exceeds the column size limit + */ +CUDF_EXPORT std::pair, int64_t> make_offsets_child_column( + device_span sizes, cuda::stream_ref stream, rmm::device_async_resource_ref mr); + template struct string_offsets_fn { Iter _begin; @@ -242,8 +259,8 @@ auto make_strings_children(SizeAndExecuteFunction size_and_exec_fn, for_each_fn(size_and_exec_fn); // Convert the sizes to offsets - auto [offsets_column, bytes] = cudf::strings::detail::make_offsets_child_column( - output_sizes.begin(), output_sizes.end(), stream, mr); + auto [offsets_column, bytes] = + cudf::strings::detail::make_offsets_child_column(output_sizes, stream, mr); size_and_exec_fn.d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(offsets_column->view()); diff --git a/cpp/src/column/column_factories.cu b/cpp/src/column/column_factories.cu index bad8832b6a87..086947447648 100644 --- a/cpp/src/column/column_factories.cu +++ b/cpp/src/column/column_factories.cu @@ -72,7 +72,7 @@ std::unique_ptr column_from_scalar_dispatch::operator() diff --git a/cpp/src/interop/from_arrow_device.cu b/cpp/src/interop/from_arrow_device.cu index 9e924b616ffb..2a02f21ca041 100644 --- a/cpp/src/interop/from_arrow_device.cu +++ b/cpp/src/interop/from_arrow_device.cu @@ -194,8 +194,7 @@ dispatch_tuple_t dispatch_from_arrow_device::operator()( d_indices.begin(), binary_view_to_string_index_pair{d_items, d_ptrs, d_mask, skip_mask}); // gather strings into output column - auto out_col = - cudf::strings::detail::make_strings_column(d_indices.begin(), d_indices.end(), stream, mr); + auto out_col = cudf::make_strings_column(d_indices, stream, mr); owned.emplace_back(std::move(out_col)); stream.synchronize(); return std::make_tuple(owned.front()->view(), std::move(owned)); diff --git a/cpp/src/interop/from_arrow_host_strings.cu b/cpp/src/interop/from_arrow_host_strings.cu index d9dc6c5d19d0..b15b8960eec1 100644 --- a/cpp/src/interop/from_arrow_host_strings.cu +++ b/cpp/src/interop/from_arrow_host_strings.cu @@ -114,7 +114,7 @@ std::unique_ptr from_arrow_stringview(ArrowSchemaView const* schema, }); stream.synchronize(); - return cudf::strings::detail::make_strings_column(d_indices.begin(), d_indices.end(), stream, mr); + return cudf::make_strings_column(d_indices, stream, mr); } } // namespace diff --git a/cpp/src/io/parquet/experimental/variant_extract.cu b/cpp/src/io/parquet/experimental/variant_extract.cu index 2f1ecac85bf0..11507e6839d8 100644 --- a/cpp/src/io/parquet/experimental/variant_extract.cu +++ b/cpp/src/io/parquet/experimental/variant_extract.cu @@ -922,7 +922,7 @@ std::unique_ptr get_variant_field(column_view const& variant_column, // Convert sizes to offsets auto [offsets_column, total_bytes] = - cudf::strings::detail::make_offsets_child_column(d_sizes.begin(), d_sizes.end(), stream, mr); + cudf::strings::detail::make_offsets_child_column(d_sizes, stream, mr); CUDF_EXPECTS(total_bytes <= std::numeric_limits::max(), "VARIANT extracted bytes exceed cudf size_type limit", std::overflow_error); diff --git a/cpp/src/io/utilities/data_casting.cu b/cpp/src/io/utilities/data_casting.cu index 11be633608f8..111048e8e9fe 100644 --- a/cpp/src/io/utilities/data_casting.cu +++ b/cpp/src/io/utilities/data_casting.cu @@ -857,9 +857,8 @@ static std::unique_ptr parse_string(string_view_pair_it str_tuples, CUDF_CUDA_TRY(cudaGetLastError()); } - auto [offsets, bytes] = - cudf::strings::detail::make_offsets_child_column(sizes.begin(), sizes.end(), stream, mr); - auto d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(offsets->view()); + auto [offsets, bytes] = cudf::strings::detail::make_offsets_child_column(sizes, stream, mr); + auto d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(offsets->view()); // CHARS column rmm::device_uvector chars(bytes, stream, mr); diff --git a/cpp/src/json/json_path.cu b/cpp/src/json/json_path.cu index 861bf521ac0e..a606f2996232 100644 --- a/cpp/src/json/json_path.cu +++ b/cpp/src/json/json_path.cu @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION. + * SPDX-FileCopyrightText: Copyright (c) 2021-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: Apache-2.0 */ @@ -1018,8 +1018,7 @@ std::unique_ptr get_json_object(cudf::strings_column_view const& c CUDF_CUDA_TRY(cudaGetLastError()); // convert sizes to offsets - auto [offsets, output_size] = - cudf::strings::detail::make_offsets_child_column(sizes.begin(), sizes.end(), stream, mr); + auto [offsets, output_size] = cudf::strings::detail::make_offsets_child_column(sizes, stream, mr); d_offsets = cudf::detail::offsetalator_factory::make_input_iterator(offsets->view()); // allocate output string column diff --git a/cpp/src/lists/interleave_columns.cu b/cpp/src/lists/interleave_columns.cu index 8a27b3a04143..a046a1128126 100644 --- a/cpp/src/lists/interleave_columns.cu +++ b/cpp/src/lists/interleave_columns.cu @@ -202,7 +202,7 @@ struct interleave_list_entries_impl{0}, num_output_lists, comp_fn); - return cudf::strings::detail::make_strings_column(indices.begin(), indices.end(), stream, mr); + return cudf::make_strings_column(indices, stream, mr); } }; diff --git a/cpp/src/reductions/segmented/std.cu b/cpp/src/reductions/segmented/std_var.cu similarity index 55% rename from cpp/src/reductions/segmented/std.cu rename to cpp/src/reductions/segmented/std_var.cu index f7f112e097c2..ee87ff2bd468 100644 --- a/cpp/src/reductions/segmented/std.cu +++ b/cpp/src/reductions/segmented/std_var.cu @@ -14,6 +14,9 @@ namespace cudf { namespace reduction { namespace detail { +// segmented_variance is intentionally co-located with segmented_standard_deviation in this +// translation unit. Both reductions use the same var_std intermediate and segmented CUB reduction +// shape; keeping them together avoids emitting duplicate device kernel instantiations. std::unique_ptr segmented_standard_deviation(column_view const& col, device_span offsets, cudf::data_type const output_dtype, @@ -27,6 +30,19 @@ std::unique_ptr segmented_standard_deviation(column_view const& co col.type(), reducer(), col, offsets, output_dtype, null_handling, ddof, stream, mr); } +std::unique_ptr segmented_variance(column_view const& col, + device_span offsets, + cudf::data_type const output_dtype, + null_policy null_handling, + size_type ddof, + cuda::stream_ref stream, + rmm::device_async_resource_ref mr) +{ + using reducer = compound::detail::compound_segmented_dispatcher; + return cudf::type_dispatcher( + col.type(), reducer(), col, offsets, output_dtype, null_handling, ddof, stream, mr); +} + } // namespace detail } // namespace reduction } // namespace cudf diff --git a/cpp/src/reductions/segmented/var.cu b/cpp/src/reductions/segmented/var.cu deleted file mode 100644 index 74d3f41e1e03..000000000000 --- a/cpp/src/reductions/segmented/var.cu +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SPDX-FileCopyrightText: Copyright (c) 2023-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -#include "compound.cuh" - -#include -#include - -#include - -namespace cudf { -namespace reduction { -namespace detail { - -std::unique_ptr segmented_variance(column_view const& col, - device_span offsets, - cudf::data_type const output_dtype, - null_policy null_handling, - size_type ddof, - cuda::stream_ref stream, - rmm::device_async_resource_ref mr) -{ - using reducer = compound::detail::compound_segmented_dispatcher; - return cudf::type_dispatcher( - col.type(), reducer(), col, offsets, output_dtype, null_handling, ddof, stream, mr); -} -} // namespace detail -} // namespace reduction -} // namespace cudf diff --git a/cpp/src/reductions/std.cu b/cpp/src/reductions/std_var.cu similarity index 57% rename from cpp/src/reductions/std.cu rename to cpp/src/reductions/std_var.cu index a99158e12168..45652d3fa5a9 100644 --- a/cpp/src/reductions/std.cu +++ b/cpp/src/reductions/std_var.cu @@ -15,6 +15,9 @@ namespace cudf { namespace reduction { namespace detail { +// variance is intentionally co-located with standard_deviation in this translation unit. Both +// reductions use the same var_std intermediate and CUB reduction shape; keeping them together +// avoids emitting duplicate device kernel instantiations. std::unique_ptr standard_deviation(column_view const& col, cudf::data_type const output_dtype, size_type ddof, @@ -27,6 +30,18 @@ std::unique_ptr standard_deviation(column_view const& col, return cudf::type_dispatcher(col_type, reducer(), col, output_dtype, ddof, stream, mr); } +std::unique_ptr variance(column_view const& col, + cudf::data_type const output_dtype, + size_type ddof, + cuda::stream_ref stream, + rmm::device_async_resource_ref mr) +{ + using reducer = compound::detail::element_type_dispatcher; + auto col_type = + cudf::is_dictionary(col.type()) ? dictionary_column_view(col).keys().type() : col.type(); + return cudf::type_dispatcher(col_type, reducer(), col, output_dtype, ddof, stream, mr); +} + } // namespace detail } // namespace reduction } // namespace cudf diff --git a/cpp/src/reductions/var.cu b/cpp/src/reductions/var.cu deleted file mode 100644 index 924af0137959..000000000000 --- a/cpp/src/reductions/var.cu +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SPDX-FileCopyrightText: Copyright (c) 2019-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -#include "compound.cuh" - -#include -#include -#include - -#include - -namespace cudf { -namespace reduction { -namespace detail { - -std::unique_ptr variance(column_view const& col, - cudf::data_type const output_dtype, - size_type ddof, - cuda::stream_ref stream, - rmm::device_async_resource_ref mr) -{ - using reducer = compound::detail::element_type_dispatcher; - auto col_type = - cudf::is_dictionary(col.type()) ? dictionary_column_view(col).keys().type() : col.type(); - return cudf::type_dispatcher(col_type, reducer(), col, output_dtype, ddof, stream, mr); -} - -} // namespace detail -} // namespace reduction -} // namespace cudf diff --git a/cpp/src/replace/clamp.cu b/cpp/src/replace/clamp.cu index afe115f49c27..836af9b5a86a 100644 --- a/cpp/src/replace/clamp.cu +++ b/cpp/src/replace/clamp.cu @@ -92,7 +92,7 @@ std::unique_ptr clamp_string_column(strings_column_view const& inp indices.begin(), fn); - return cudf::strings::detail::make_strings_column(indices.begin(), indices.end(), stream, mr); + return cudf::make_strings_column(indices, stream, mr); } template diff --git a/cpp/src/reshape/interleave_columns.cu b/cpp/src/reshape/interleave_columns.cu index 459f4c9e8618..5867bbdc82e1 100644 --- a/cpp/src/reshape/interleave_columns.cu +++ b/cpp/src/reshape/interleave_columns.cu @@ -176,7 +176,7 @@ struct interleave_columns_impl convert_case(strings_column_view const& input, ccfn, *d_strings, sizes.data()); CUDF_CUDA_TRY(cudaGetLastError()); // convert sizes to offsets - return cudf::strings::detail::make_offsets_child_column(sizes.begin(), sizes.end(), stream, mr); + return cudf::strings::detail::make_offsets_child_column(sizes, stream, mr); }(); // build sub-offsets diff --git a/cpp/src/strings/extract/extract.cu b/cpp/src/strings/extract/extract.cu index 23eb5098c17d..06e9b3b35a10 100644 --- a/cpp/src/strings/extract/extract.cu +++ b/cpp/src/strings/extract/extract.cu @@ -165,7 +165,7 @@ std::unique_ptr extract_single(strings_column_view const& input, launch_transform_kernel( extract_single_fn{*d_strings, group}, *d_prog, indices.data(), input.size(), stream); - return make_strings_column(indices.begin(), indices.end(), stream, mr); + return cudf::make_strings_column(indices, stream, mr); } } // namespace detail diff --git a/cpp/src/strings/extract/extract_all.cu b/cpp/src/strings/extract/extract_all.cu index 98c927069530..4026a27fdb50 100644 --- a/cpp/src/strings/extract/extract_all.cu +++ b/cpp/src/strings/extract/extract_all.cu @@ -136,7 +136,7 @@ std::unique_ptr extract_all_record(strings_column_view const& input, launch_for_each_kernel( extract_fn{*d_strings, d_offsets, indices.data()}, *d_prog, strings_count, stream); - auto strings_output = make_strings_column(indices.begin(), indices.end(), stream, mr); + auto strings_output = cudf::make_strings_column(indices, stream, mr); // Build the lists column from the offsets and the strings. return make_lists_column( diff --git a/cpp/src/strings/filling/fill.cu b/cpp/src/strings/filling/fill.cu index d5acf378ed6e..badf27cf4d4d 100644 --- a/cpp/src/strings/filling/fill.cu +++ b/cpp/src/strings/filling/fill.cu @@ -68,7 +68,7 @@ std::unique_ptr fill(strings_column_view const& input, indices.begin(), fn); - return make_strings_column(indices.begin(), indices.end(), stream, mr); + return cudf::make_strings_column(indices, stream, mr); } } // namespace detail diff --git a/cpp/src/strings/merge/merge.cu b/cpp/src/strings/merge/merge.cu index 19caf6e9a85f..c4e1c3bf554f 100644 --- a/cpp/src/strings/merge/merge.cu +++ b/cpp/src/strings/merge/merge.cu @@ -55,7 +55,7 @@ std::unique_ptr merge(strings_column_view const& lhs, }); // convert vector into strings column - return make_strings_column(indices.begin(), indices.end(), stream, mr); + return cudf::make_strings_column(indices, stream, mr); } } // namespace detail diff --git a/cpp/src/strings/positions.cu b/cpp/src/strings/positions.cu index eda9efb10f3a..94d9784c406d 100644 --- a/cpp/src/strings/positions.cu +++ b/cpp/src/strings/positions.cu @@ -61,8 +61,7 @@ std::unique_ptr create_offsets_from_positions(strings_column_view const& }); // finally, convert the counts into offsets - return std::get<0>( - cudf::strings::detail::make_offsets_child_column(counts.begin(), counts.end(), stream, mr)); + return std::get<0>(cudf::strings::detail::make_offsets_child_column(counts, stream, mr)); } } // namespace cudf::strings::detail diff --git a/cpp/src/strings/replace/find_replace.cu b/cpp/src/strings/replace/find_replace.cu index cc5232f308f9..23e6ecda71d3 100644 --- a/cpp/src/strings/replace/find_replace.cu +++ b/cpp/src/strings/replace/find_replace.cu @@ -69,7 +69,7 @@ std::unique_ptr find_and_replace_all( indices.begin(), find_replace_fn{*d_input, *d_values_to_replace, *d_replacements}); - return make_strings_column(indices.begin(), indices.end(), stream, mr); + return cudf::make_strings_column(indices, stream, mr); } } // namespace detail diff --git a/cpp/src/strings/replace/multi.cu b/cpp/src/strings/replace/multi.cu index 8cb13ebfe021..c5ba6434ca6a 100644 --- a/cpp/src/strings/replace/multi.cu +++ b/cpp/src/strings/replace/multi.cu @@ -401,12 +401,11 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in }); // use this utility to gather the string parts into a contiguous chars column - auto chars = make_strings_column(indices.begin(), indices.end(), stream, mr); + auto chars = cudf::make_strings_column(indices, stream, mr); auto chars_data = chars->release().data; // create offsets from the sizes - offsets = std::get<0>( - cudf::strings::detail::make_offsets_child_column(counts.begin(), counts.end(), stream, mr)); + offsets = std::get<0>(cudf::strings::detail::make_offsets_child_column(counts, stream, mr)); // build the strings columns from the chars and offsets return make_strings_column(strings_count, diff --git a/cpp/src/strings/replace/replace.cu b/cpp/src/strings/replace/replace.cu index 6997a08ffd59..b866c5faed6e 100644 --- a/cpp/src/strings/replace/replace.cu +++ b/cpp/src/strings/replace/replace.cu @@ -345,12 +345,11 @@ std::unique_ptr replace_character_parallel(strings_column_view const& in }); // use this utility to gather the string parts into a contiguous chars column - auto chars = make_strings_column(indices.begin(), indices.end(), stream, mr); + auto chars = cudf::make_strings_column(indices, stream, mr); auto chars_data = chars->release().data; // create offsets from the sizes - offsets = std::get<0>( - cudf::strings::detail::make_offsets_child_column(counts.begin(), counts.end(), stream, mr)); + offsets = std::get<0>(cudf::strings::detail::make_offsets_child_column(counts, stream, mr)); // build the strings columns from the chars and offsets return make_strings_column(strings_count, diff --git a/cpp/src/strings/search/findall.cu b/cpp/src/strings/search/findall.cu index ae8adf72636b..a3a4394830ad 100644 --- a/cpp/src/strings/search/findall.cu +++ b/cpp/src/strings/search/findall.cu @@ -153,7 +153,7 @@ std::unique_ptr findall(strings_column_view const& input, }); }(); - auto strings_output = make_strings_column(indices.begin(), indices.end(), stream, mr); + auto strings_output = cudf::make_strings_column(indices, stream, mr); // Build the lists column from the offsets and the strings return make_lists_column(input.size(), diff --git a/cpp/src/strings/slice.cu b/cpp/src/strings/slice.cu index d58a38af5385..b154ac9b3374 100644 --- a/cpp/src/strings/slice.cu +++ b/cpp/src/strings/slice.cu @@ -261,7 +261,7 @@ std::unique_ptr compute_substrings_from_fn(strings_column_view const& in <<>>(*d_column, starts, stops, results.data()); CUDF_CUDA_TRY(cudaGetLastError()); } - return make_strings_column(results.begin(), results.end(), stream, mr); + return cudf::make_strings_column(results, stream, mr); } } // namespace diff --git a/cpp/src/strings/split/split_part.cu b/cpp/src/strings/split/split_part.cu index 71cd25333413..09528e8cd0bd 100644 --- a/cpp/src/strings/split/split_part.cu +++ b/cpp/src/strings/split/split_part.cu @@ -91,7 +91,7 @@ std::unique_ptr split_part_fn(strings_column_view const& input, : string_index_pair{nullptr, 0}; }); - return make_strings_column(d_indices.begin(), d_indices.end(), stream, mr); + return cudf::make_strings_column(d_indices, stream, mr); } } // namespace diff --git a/cpp/src/strings/split/split_re.cu b/cpp/src/strings/split/split_re.cu index aa5fb259c4e0..54313246b34c 100644 --- a/cpp/src/strings/split/split_re.cu +++ b/cpp/src/strings/split/split_re.cu @@ -283,7 +283,7 @@ std::unique_ptr split_record_re(strings_column_view const& input, std::overflow_error); // convert the tokens into one big strings column - auto strings_output = make_strings_column(tokens.begin(), tokens.end(), stream, mr); + auto strings_output = cudf::make_strings_column(tokens, stream, mr); // create a lists column using the offsets and the strings columns return make_lists_column(strings_count, diff --git a/cpp/src/strings/split/split_record.cu b/cpp/src/strings/split/split_record.cu index 1c94542d7786..9625a5a91995 100644 --- a/cpp/src/strings/split/split_record.cu +++ b/cpp/src/strings/split/split_record.cu @@ -55,7 +55,7 @@ std::unique_ptr split_record_fn(strings_column_view const& input, "Size of output exceeds the column size limit", std::overflow_error); - auto strings_child = make_strings_column(tokens.begin(), tokens.end(), stream, mr); + auto strings_child = cudf::make_strings_column(tokens, stream, mr); return make_lists_column(input.size(), std::move(offsets), std::move(strings_child), @@ -91,7 +91,7 @@ std::unique_ptr split_record_per_row_fn(strings_column_view const& input "Size of output exceeds the column size limit", std::overflow_error); - auto strings_child = make_strings_column(tokens.begin(), tokens.end(), stream, mr); + auto strings_child = cudf::make_strings_column(tokens, stream, mr); return make_lists_column(input.size(), std::move(offsets), std::move(strings_child), diff --git a/cpp/src/strings/strings_column_factories.cu b/cpp/src/strings/strings_column_factories.cu index 588b2e4c6d43..e8476aa9043c 100644 --- a/cpp/src/strings/strings_column_factories.cu +++ b/cpp/src/strings/strings_column_factories.cu @@ -68,6 +68,12 @@ make_offsets_child_column_batch_async(std::vector const& in } // namespace +CUDF_EXPORT std::pair, int64_t> make_offsets_child_column( + device_span sizes, cuda::stream_ref stream, rmm::device_async_resource_ref mr) +{ + return make_offsets_child_column(sizes.begin(), sizes.end(), stream, mr); +} + std::vector> make_strings_column_batch( std::vector const& input, cuda::stream_ref stream, diff --git a/cpp/src/strings/strip.cu b/cpp/src/strings/strip.cu index c135b74969fb..7361a120483a 100644 --- a/cpp/src/strings/strip.cu +++ b/cpp/src/strings/strip.cu @@ -68,7 +68,7 @@ std::unique_ptr strip(strings_column_view const& input, result.begin(), strip_transform_fn{*d_column, side, d_to_strip}); - return make_strings_column(result.begin(), result.end(), stream, mr); + return cudf::make_strings_column(result, stream, mr); } } // namespace detail diff --git a/cpp/src/text/replace.cu b/cpp/src/text/replace.cu index 1e721e9b4e66..1fd64fcf74dc 100644 --- a/cpp/src/text/replace.cu +++ b/cpp/src/text/replace.cu @@ -347,8 +347,8 @@ std::unique_ptr replace_helper(ReplacerFn replacer, auto chars = std::get<1>( cudf::strings::detail::make_strings_children(replacer, tmp_strings.size(), stream, mr)); - auto offsets_column = std::get<0>( - cudf::strings::detail::make_offsets_child_column(d_sizes.begin(), d_sizes.end(), stream, mr)); + auto offsets_column = + std::get<0>(cudf::strings::detail::make_offsets_child_column(d_sizes, stream, mr)); return cudf::make_strings_column(input.size(), std::move(offsets_column), chars.release(), diff --git a/cpp/src/text/tokenize.cu b/cpp/src/text/tokenize.cu index 800d334f547d..a87a51b17aa6 100644 --- a/cpp/src/text/tokenize.cu +++ b/cpp/src/text/tokenize.cu @@ -85,7 +85,7 @@ std::unique_ptr tokenize_fn(cudf::size_type strings_count, strings_count, tokenizer); // create the strings column using the tokens pointers - return cudf::strings::detail::make_strings_column(tokens.begin(), tokens.end(), stream, mr); + return cudf::make_strings_column(tokens, stream, mr); } } // namespace