Go to the documentation of this file.
160 bool check_bounds =
false,
197 std::vector<std::reference_wrapper<const scalar>>
const& source,
200 bool check_bounds =
false,
421 std::vector<column_view>
slice(
column_view const& input, std::initializer_list<size_type> indices);
460 std::vector<table_view>
slice(
table_view const& input, std::initializer_list<size_type> indices);
499 std::vector<column_view>
split(
column_view const& input, std::initializer_list<size_type> splits);
540 std::vector<table_view>
split(
table_view const& input, std::initializer_list<size_type> splits);
558 metadata(std::vector<uint8_t>&& v) : data_(std::move(v)) {}
559 [[nodiscard]] uint8_t
const* data()
const {
return data_.data(); }
560 [[nodiscard]]
size_t size()
const {
return data_.size(); }
563 std::vector<uint8_t> data_;
567 : metadata_(std::make_unique<
metadata>()), gpu_data(std::make_unique<
rmm::device_buffer>())
570 packed_columns(std::unique_ptr<metadata>&& md, std::unique_ptr<rmm::device_buffer>&& gd)
571 : metadata_(std::move(md)), gpu_data(std::move(gd))
575 std::unique_ptr<metadata> metadata_;
576 std::unique_ptr<rmm::device_buffer> gpu_data;
641 std::vector<size_type>
const& splits,
673 uint8_t
const* contiguous_buffer,
880 std::vector<std::reference_wrapper<const scalar>>
const& input,
942 int64_t
const seed = 0,
void copy_range_in_place(column_view const &source, mutable_column_view &target, size_type source_begin, size_type source_end, size_type target_begin)
Copies a range of elements in-place from one column to another.
std::unique_ptr< scalar > get_element(column_view const &input, size_type index, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Get the element at specified index from a column.
table_view unpack(packed_columns const &input)
Deserialize the result of cudf::pack
mask_allocation_policy
Indicates when to allocate a mask, based on an existing mask.
packed_columns::metadata pack_metadata(table_view const &table, uint8_t const *contiguous_buffer, size_t buffer_size)
Produce the metadata used for packing a table stored in a contiguous buffer.
Class definition for cudf::strings_column_view.
Class definitions for cudf::scalar.
int32_t size_type
Row index type for columns and tables.
std::unique_ptr< column > empty_like(column_view const &input)
Initializes and returns an empty column of the same type as the input.
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Type declarations for libcudf.
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
Class definition for cudf::structs_column_view.
A set of cudf::column's of the same size.
std::vector< column_view > slice(column_view const &input, host_span< size_type const > indices)
Slices a column_view into a set of column_views according to a set of indices.
std::unique_ptr< column > purge_nonempty_nulls(lists_column_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Copies input, purging any non-empty null rows in the column or its descendants.
The result(s) of a contiguous_split
@ NULLIFY
Output values corresponding to out-of-bounds indices are null.
std::unique_ptr< table > gather(table_view const &source_table, column_view const &gather_map, out_of_bounds_policy bounds_policy=out_of_bounds_policy::DONT_CHECK, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Gathers the specified rows (including null values) of a set of columns.
bool may_have_nonempty_nulls(column_view const &input)
Approximates if a column or its descendants may have non-empty null elements.
packed_columns pack(cudf::table_view const &input, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Deep-copy a table_view into a serialized contiguous memory format.
std::unique_ptr< column > shift(column_view const &input, size_type offset, scalar const &fill_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Creates a new column by shifting all values by an offset.
An owning class to represent a singular value.
@ NEVER
Do not allocate a null mask, regardless of input.
A set of cudf::column_view's of the same size.
std::vector< column_view > split(column_view const &input, host_span< size_type const > splits)
Splits a column_view into a set of column_views according to a set of indices derived from expected s...
std::unique_ptr< table > boolean_mask_scatter(table_view const &input, table_view const &target, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Scatters rows from the input table to rows of the output corresponding to true values in a boolean ma...
std::unique_ptr< column > copy_if_else(column_view const &lhs, column_view const &rhs, column_view const &boolean_mask, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Returns a new column, where each element is selected from either lhs or rhs based on the value of the...
@ FALSE
A row can be sampled only once.
std::unique_ptr< table > reverse(table_view const &source_table, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Reverses the rows within a table. Creates a new table that is the reverse of source_table....
bool has_nonempty_nulls(column_view const &input)
Checks if a column or its descendants have non-empty null rows.
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
std::vector< packed_table > contiguous_split(cudf::table_view const &input, std::vector< size_type > const &splits, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Performs a deep-copy split of a table_view into a set of table_views into a single contiguous block o...
Given a column-view of lists type, an instance of this class provides a wrapper on this compound colu...
out_of_bounds_policy
Policy to account for possible out-of-bounds indices.
std::unique_ptr< table > sample(table_view const &input, size_type const n, sample_with_replacement replacement=sample_with_replacement::FALSE, int64_t const seed=0, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Gather n samples from given input randomly.
Class definition for cudf::table.
std::unique_ptr< table > scatter(table_view const &source, column_view const &scatter_map, table_view const &target, bool check_bounds=false, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Scatters the rows of the source table into a copy of the target table according to a scatter map.
Column data in a serialized format.
column view class definitions
std::unique_ptr< column > copy_range(column_view const &source, column_view const &target, size_type source_begin, size_type source_end, size_type target_begin, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Copies a range of elements out-of-place from one column to another.
sample_with_replacement
Indicates whether a row can be sampled more than once.
Class definition for cudf::lists_column_view.
std::unique_ptr< column > allocate_like(column_view const &input, mask_allocation_policy mask_alloc=mask_allocation_policy::RETAIN, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Creates an uninitialized new column of the same size and type as the input. Supports only fixed-width...