Files | |
file | repeat_strings.hpp |
Strings APIs for copying strings. | |
std::unique_ptr<string_scalar> cudf::strings::repeat_string | ( | string_scalar const & | input, |
size_type | repeat_times, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Repeat the given string scalar a given number of times.
An output string scalar is generated by repeating the input string by a number of times given by the repeat_times
parameter.
In special cases:
repeat_times
is not a positive value, an empty (valid) string scalar will be returned.repeat_times
parameter.std::overflow_error | if the size of the output string scalar exceeds the maximum value that can be stored by the scalar: input.size() * repeat_times > max of size_type |
input | The scalar containing the string to repeat |
repeat_times | The number of times the input string is repeated |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned string scalar |
std::unique_ptr<column> cudf::strings::repeat_strings | ( | strings_column_view const & | input, |
column_view const & | repeat_times, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Repeat each string in the given strings column by the numbers of times given in another numeric column.
An output strings column is generated by repeating each of the input string by a number of times given by the corresponding row in a repeat_times
numeric column.
In special cases:
repeat_times
column) will always result in a null output string.repeat_times
column is not a positive number and its corresponding input string is not null, the output string will be an empty string.cudf::logic_error | if the input repeat_times is not an integer type |
cudf::logic_error | if the input columns have different sizes. |
input | The column containing strings to repeat |
repeat_times | The column containing numbers of times that the corresponding input strings for each row are repeated |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned strings column |
std::unique_ptr<column> cudf::strings::repeat_strings | ( | strings_column_view const & | input, |
size_type | repeat_times, | ||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Repeat each string in the given strings column a given number of times.
An output strings column is generated by repeating each string from the input strings column by the number of times given by the repeat_times
parameter.
In special cases:
repeat_times
is not a positive number, a non-null input string will always result in an empty output string.repeat_times
parameter.input | The column containing strings to repeat |
repeat_times | The number of times each input string is repeated |
stream | CUDA stream used for device memory operations and kernel launches |
mr | Device memory resource used to allocate the returned strings column |