Public Member Functions | Public Attributes | List of all members
rapidsmpf::PackedData Struct Reference

Bag of bytes with metadata suitable for sending over the wire. More...

#include <packed_data.hpp>

Public Member Functions

 PackedData (std::unique_ptr< std::vector< std::uint8_t >> metadata, std::unique_ptr< Buffer > data)
 Construct from metadata and GPU data, taking ownership. More...
 
 PackedData (PackedData &&)=default
 PackedData is moveable.
 
PackedDataoperator= (PackedData &&)=default
 Move assignment. More...
 
 PackedData (PackedData const &)=delete
 
PackedDataoperator= (PackedData const &)=delete
 
bool empty () const
 Check if the packed data is empty. More...
 
rmm::cuda_stream_view stream () const
 Get the stream associated with the data buffer. More...
 
PackedData copy (MemoryReservation &reservation) const
 Create a deep copy of the packed data. More...
 

Public Attributes

std::unique_ptr< std::vector< std::uint8_t > > metadata
 The metadata.
 
std::unique_ptr< Bufferdata
 The GPU data.
 

Detailed Description

Bag of bytes with metadata suitable for sending over the wire.

Contains arbitrary GPU data and host side metadata indicating how the data should be interpreted.

Definition at line 26 of file packed_data.hpp.

Constructor & Destructor Documentation

◆ PackedData()

rapidsmpf::PackedData::PackedData ( std::unique_ptr< std::vector< std::uint8_t >>  metadata,
std::unique_ptr< Buffer data 
)
inline

Construct from metadata and GPU data, taking ownership.

Parameters
metadataHost-side metadata describing the GPU data.
dataPointer to GPU data.

Definition at line 36 of file packed_data.hpp.

Member Function Documentation

◆ copy()

PackedData rapidsmpf::PackedData::copy ( MemoryReservation reservation) const
inline

Create a deep copy of the packed data.

Parameters
reservationMemory reservation to use.
Returns
A new PackedData instance containing a deep copy of both the data buffer and metadata.

Definition at line 90 of file packed_data.hpp.

◆ empty()

bool rapidsmpf::PackedData::empty ( ) const
inline

Check if the packed data is empty.

Returns
True if the packed data is empty, false otherwise.

Definition at line 69 of file packed_data.hpp.

◆ operator=()

PackedData& rapidsmpf::PackedData::operator= ( PackedData &&  )
default

Move assignment.

Returns
Moved this.

◆ stream()

rmm::cuda_stream_view rapidsmpf::PackedData::stream ( ) const
inline

Get the stream associated with the data buffer.

Returns
The CUDA stream.

Definition at line 78 of file packed_data.hpp.


The documentation for this struct was generated from the following file: