Lists Filling#
- group Filling
Functions
-
std::unique_ptr<column> sequences(column_view const &starts, column_view const &sizes, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref())#
Create a lists column in which each row contains a sequence of values specified by a tuple of (
start,size) parameters.Create a lists column in which each row is a sequence of values starting from a
startvalue, incrementing by one, and its cardinality is specified by asizevalue. Thestartandsizevalues used to generate each list is taken from the corresponding row of the inputstartsandsizescolumns.sizesmust be a column of integer types.All the input columns must not have nulls.
If any row of the
sizescolumn contains negative value, the output is undefined.
starts = [0, 1, 2, 3, 4] sizes = [0, 2, 2, 1, 3] output = [ [], [1, 2], [2, 3], [3], [4, 5, 6] ]
- Throws:
cudf::logic_error – if
sizescolumn is not of integer types.cudf::logic_error – if any input column has nulls.
cudf::logic_error – if
startsandsizescolumns do not have the same size.std::overflow_error – if the output column would exceed the column size limit.
- Parameters:
starts – First values in the result sequences.
sizes – Numbers of values in the result sequences.
stream – CUDA stream used for device memory operations and kernel launches.
mr – Device memory resource used to allocate the returned column’s device memory.
- Returns:
The result column containing generated sequences.
-
std::unique_ptr<column> sequences(column_view const &starts, column_view const &steps, column_view const &sizes, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref())#
Create a lists column in which each row contains a sequence of values specified by a tuple of (
start,step,size) parameters.Create a lists column in which each row is a sequence of values starting from a
startvalue, incrementing by astepvalue, and its cardinality is specified by asizevalue. The valuesstart,step, andsizeused to generate each list is taken from the corresponding row of the inputstarts,steps, andsizescolumns.sizesmust be a column of integer types.startsandstepscolumns must have the same type.All the input columns must not have nulls.
If any row of the
sizescolumn contains negative value, the output is undefined.
starts = [0, 1, 2, 3, 4] steps = [2, 1, 1, 1, -3] sizes = [0, 2, 2, 1, 3] output = [ [], [1, 2], [2, 3], [3], [4, 1, -2] ]
- Throws:
cudf::logic_error – if
sizescolumn is not of integer types.cudf::logic_error – if any input column has nulls.
cudf::logic_error – if
startsandstepscolumns have different types.cudf::logic_error – if
starts,steps, andsizescolumns do not have the same size.std::overflow_error – if the output column would exceed the column size limit.
- Parameters:
starts – First values in the result sequences.
steps – Increment values for the result sequences.
sizes – Numbers of values in the result sequences.
stream – CUDA stream used for device memory operations and kernel launches.
mr – Device memory resource used to allocate the returned column’s device memory.
- Returns:
The result column containing generated sequences.
-
std::unique_ptr<column> sequences(column_view const &starts, column_view const &sizes, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = cudf::get_current_device_resource_ref())#