Public Member Functions | List of all members
cudf::io::text::data_chunk_reader Class Referenceabstract

a reader capable of producing views over device memory. More...

#include <data_chunk_source.hpp>

Public Member Functions

virtual void skip_bytes (std::size_t size)=0
 Skips the specified number of bytes in the data source. More...
 
virtual std::unique_ptr< device_data_chunkget_next_chunk (std::size_t size, rmm::cuda_stream_view stream)=0
 Get the next chunk of bytes from the data source. More...
 

Detailed Description

a reader capable of producing views over device memory.

The data chunk reader API encapsulates the idea of statefully traversing and loading a data source. A data source may be a file, a region of device memory, or a region of host memory. Reading data from these data sources efficiently requires different strategies depending on the type of data source, type of compression, capabilities of the host and device, the data's destination. Whole-file decompression should be hidden behind this interface.

Definition at line 76 of file data_chunk_source.hpp.

Member Function Documentation

◆ get_next_chunk()

virtual std::unique_ptr<device_data_chunk> cudf::io::text::data_chunk_reader::get_next_chunk ( std::size_t  size,
rmm::cuda_stream_view  stream 
)
pure virtual

Get the next chunk of bytes from the data source.

Performs any necessary work to read and prepare the underlying data source for consumption as a view over device memory. Common implementations may read from a file, copy data from host memory, allocate temporary memory, perform iterative decompression, or even launch device kernels.

Parameters
sizenumber of bytes to read
streamstream to associate allocations or perform work required to obtain chunk
Returns
a chunk of data up to size bytes. May return less than size bytes if reader reaches end of underlying data source. Returned data must be accessed in stream order relative to the specified stream

◆ skip_bytes()

virtual void cudf::io::text::data_chunk_reader::skip_bytes ( std::size_t  size)
pure virtual

Skips the specified number of bytes in the data source.

Parameters
sizeThe number of bytes to skip

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