12 #include <cudf/contiguous_split.hpp>
13 #include <cudf/table/table.hpp>
14 #include <cudf/table/table_view.hpp>
16 #include <rapidsmpf/buffer/content_description.hpp>
17 #include <rapidsmpf/buffer/packed_data.hpp>
18 #include <rapidsmpf/error.hpp>
19 #include <rapidsmpf/owning_wrapper.hpp>
20 #include <rapidsmpf/streaming/core/channel.hpp>
21 #include <rapidsmpf/streaming/core/context.hpp>
22 #include <rapidsmpf/streaming/core/node.hpp>
94 std::size_t device_alloc_size,
239 std::unique_ptr<cudf::table> table_;
240 std::unique_ptr<cudf::packed_columns> packed_columns_;
241 std::unique_ptr<PackedData> packed_data_;
244 std::optional<cudf::table_view> table_view_;
247 std::array<std::size_t, MEMORY_TYPES.size()> data_alloc_size_ = {};
248 std::size_t make_available_cost_;
Description of an object's content.
Represents a reservation for future memory allocation.
Utility class to store an arbitrary type-erased object while another object is alive.
Type-erased message wrapper around a payload.
A unit of table data in a streaming pipeline.
std::size_t make_available_cost() const noexcept
Returns the estimated cost (in bytes) of making the table available.
TableChunk & operator=(TableChunk &&)=default
Move assignment.
TableChunk make_available(MemoryReservation &reservation)
Moves this table chunk into a new one with its cudf table made available.
TableChunk copy(MemoryReservation &reservation) const
Create a deep copy of the table chunk.
ExclusiveView
Indicates whether the TableChunk holds an exclusive or shared view of the underlying table data.
bool is_available() const noexcept
Indicates whether the underlying cudf table data is fully available in device memory.
TableChunk(std::unique_ptr< cudf::table > table, rmm::cuda_stream_view stream)
Construct a TableChunk from a device table.
std::size_t data_alloc_size(MemoryType mem_type) const
Number of bytes allocated for the data in the specified memory type.
TableChunk(std::unique_ptr< cudf::packed_columns > packed_columns, rmm::cuda_stream_view stream)
Construct a TableChunk from packed columns.
TableChunk(TableChunk &&)=default
TableChunk is moveable.
rmm::cuda_stream_view stream() const noexcept
Returns the CUDA stream on which this table chunk was created.
TableChunk(cudf::table_view table_view, std::size_t device_alloc_size, rmm::cuda_stream_view stream, OwningWrapper &&owner, ExclusiveView exclusive_view)
Construct a TableChunk from a device table view.
cudf::table_view table_view() const
Returns a view of the underlying table.
TableChunk(std::unique_ptr< PackedData > packed_data)
Construct a TableChunk from a packed data blob.
bool is_spillable() const
Indicates whether this table chunk can be spilled to device memory.
Message to_message(std::uint64_t sequence_number, std::unique_ptr< PackedDataChunk > chunk)
Wrap a PackedDataChunk into a Message.
ContentDescription get_content_description(PackedDataChunk const &obj)
Generate a content description for a PackedDataChunk.