21 #include <cudf/utilities/export.hpp>
28 namespace CUDF_EXPORT
cudf {
45 : metadata(std::make_unique<std::vector<uint8_t>>()),
46 gpu_data(std::make_unique<rmm::device_buffer>())
57 std::unique_ptr<rmm::device_buffer>&& gd)
58 : metadata(std::move(md)), gpu_data(std::move(gd))
62 std::unique_ptr<std::vector<uint8_t>>
metadata;
124 std::vector<size_type>
const& splits,
134 struct contiguous_split_state;
207 std::size_t user_buffer_size,
270 [[nodiscard]]
static std::unique_ptr<chunked_pack>
create(
272 std::size_t user_buffer_size,
277 std::unique_ptr<detail::contiguous_split_state> state;
309 uint8_t
const* contiguous_buffer,
Perform a chunked "pack" operation of the input table_view using a user provided buffer of size user_...
std::size_t get_total_contiguous_size() const
Obtain the total size of the contiguously packed table_view.
std::size_t next(cudf::device_span< uint8_t > const &user_buffer)
Packs the next chunk into user_buffer. This should be called as long as has_next returns true....
~chunked_pack()
Destructor that will be implemented as default. Declared with definition here because contiguous_spli...
static std::unique_ptr< chunked_pack > create(cudf::table_view const &input, std::size_t user_buffer_size, rmm::device_async_resource_ref temp_mr=rmm::mr::get_current_device_resource())
Creates a chunked_pack instance to perform a "pack" of the table_view "input", where a buffer of user...
std::unique_ptr< std::vector< uint8_t > > build_metadata() const
Build the opaque metadata for all added columns.
bool has_next() const
Function to check if there are chunks left to be copied.
chunked_pack(cudf::table_view const &input, std::size_t user_buffer_size, rmm::device_async_resource_ref temp_mr=rmm::mr::get_current_device_resource())
Construct a chunked_pack class.
A set of cudf::column_view's of the same size.
A set of cudf::column's of the same size.
std::vector< packed_table > contiguous_split(cudf::table_view const &input, std::vector< size_type > const &splits, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs a deep-copy split of a table_view into a vector of packed_table where each packed_table is u...
packed_columns pack(cudf::table_view const &input, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Deep-copy a table_view into a serialized contiguous memory format.
table_view unpack(uint8_t const *metadata, uint8_t const *gpu_data)
Deserialize the result of cudf::pack.
std::vector< uint8_t > 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.
cuda::mr::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
device_memory_resource * get_current_device_resource()
Device version of C++20 std::span with reduced feature set.
Column data in a serialized format.
packed_columns(std::unique_ptr< std::vector< uint8_t >> &&md, std::unique_ptr< rmm::device_buffer > &&gd)
Construct a new packed columns object.
std::unique_ptr< std::vector< uint8_t > > metadata
Host-side metadata buffer.
std::unique_ptr< rmm::device_buffer > gpu_data
Device-side data buffer.
The result(s) of a cudf::contiguous_split.
packed_columns data
Column data owned.
cudf::table_view table
Result table_view of a cudf::contiguous_split.
Class definition for cudf::table.
Type declarations for libcudf.