diff --git a/cpp/include/cudf/strings/detail/gather.cuh b/cpp/include/cudf/strings/detail/gather.cuh index 94bce6bddd5..fcd74bebfe8 100644 --- a/cpp/include/cudf/strings/detail/gather.cuh +++ b/cpp/include/cudf/strings/detail/gather.cuh @@ -19,23 +19,19 @@ #include #include #include -#include #include +#include #include #include -#include #include #include #include #include -#include #include #include #include -#include -#include #include namespace cudf { @@ -226,7 +222,7 @@ rmm::device_uvector gather_chars(StringIterator strings_begin, MapIterator map_begin, MapIterator map_end, cudf::detail::input_offsetalator const offsets, - size_type chars_bytes, + int64_t chars_bytes, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr) { @@ -239,9 +235,9 @@ rmm::device_uvector gather_chars(StringIterator strings_begin, constexpr int warps_per_threadblock = 4; // String parallel strategy will be used if average string length is above this threshold. // Otherwise, char parallel strategy will be used. - constexpr size_type string_parallel_threshold = 32; + constexpr int64_t string_parallel_threshold = 32; - size_type average_string_length = chars_bytes / output_count; + int64_t const average_string_length = chars_bytes / output_count; if (average_string_length > string_parallel_threshold) { constexpr int max_threadblocks = 65536; @@ -302,7 +298,7 @@ std::unique_ptr gather(strings_column_view const& strings, strings.is_empty() ? make_empty_column(type_id::INT32)->view() : strings.offsets(), strings.offset()); - auto offsets_itr = thrust::make_transform_iterator( + auto sizes_itr = thrust::make_transform_iterator( begin, cuda::proclaim_return_type( [d_strings = *d_strings, d_in_offsets] __device__(size_type idx) { @@ -310,8 +306,8 @@ std::unique_ptr gather(strings_column_view const& strings, if (not d_strings.is_valid(idx)) { return 0; } return static_cast(d_in_offsets[idx + 1] - d_in_offsets[idx]); })); - auto [out_offsets_column, total_bytes] = - cudf::detail::make_offsets_child_column(offsets_itr, offsets_itr + output_count, stream, mr); + auto [out_offsets_column, total_bytes] = cudf::strings::detail::make_offsets_child_column( + sizes_itr, sizes_itr + output_count, stream, mr); // build chars column auto const offsets_view =