Copy Concatenate#

group copy_concatenate

Functions

rmm::device_buffer concatenate_masks(host_span<column_view const> views, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource())#

Concatenates views[i]’s bitmask from the bits [views[i].offset(), views[i].offset() + views[i].size()) for all elements views into an rmm::device_buffer

Returns an empty buffer if the column is not nullable.

Parameters:
  • views – Column views whose bitmasks will be concatenated

  • mr – Device memory resource used for allocating the returned memory

  • stream – CUDA stream used for device memory operations and kernel launches

Returns:

Bitmasks of all the column views in the views vector

std::unique_ptr<column> concatenate(host_span<column_view const> columns_to_concat, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource())#

Concatenates multiple columns into a single column.

Throws:
Parameters:
  • columns_to_concat – Column views to be concatenated into a single column

  • 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:

A single column having all the rows from the elements of columns_to_concat respectively in the same order.

std::unique_ptr<table> concatenate(host_span<table_view const> tables_to_concat, rmm::cuda_stream_view stream = cudf::get_default_stream(), rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource())#

Columns of tables_to_concat are concatenated vertically to return a single table.

column_view c0 is {0,1,2,3}
column_view c1 is {4,5,6,7}
table_view t0{{c0, c0}};
table_view t1{{c1, c1}};
...
auto t = concatenate({t0.view(), t1.view()});
column_view tc0 = (t->view()).column(0) is {0,1,2,3,4,5,6,7}
column_view tc1 = (t->view()).column(1) is {0,1,2,3,4,5,6,7}
Throws:
Parameters:
  • tables_to_concat – Table views to be concatenated into a single table

  • stream – CUDA stream used for device memory operations and kernel launches

  • mr – Device memory resource used to allocate the returned table’s device memory

Returns:

A single table having all the rows from the elements of tables_to_concat respectively in the same order.