Apache Arrow (C++)
A columnar in-memory analytics layer designed to accelerate big data.
Public Member Functions | List of all members
arrow::gpu::CudaBufferWriter Class Reference

File interface for writing to CUDA buffers, with optional buffering. More...

#include <arrow/gpu/cuda_memory.h>

Inheritance diagram for arrow::gpu::CudaBufferWriter:
arrow::io::WriteableFile arrow::io::OutputStream arrow::io::Seekable arrow::io::FileInterface arrow::io::Writeable

Public Member Functions

 CudaBufferWriter (const std::shared_ptr< CudaBuffer > &buffer)
 
 ~CudaBufferWriter ()
 
Status Close () override
 Close writer and flush buffered bytes to GPU. More...
 
Status Flush () override
 Flush buffered bytes to GPU. More...
 
Status Seek (int64_t position) override
 
Status Write (const uint8_t *data, int64_t nbytes) override
 
Status WriteAt (int64_t position, const uint8_t *data, int64_t nbytes) override
 
Status Tell (int64_t *position) const override
 
Status SetBufferSize (const int64_t buffer_size)
 Set CPU buffer size to limit calls to cudaMemcpy. More...
 
int64_t buffer_size () const
 Returns size of host (CPU) buffer, 0 for unbuffered. More...
 
int64_t num_bytes_buffered () const
 Returns number of bytes buffered on host. More...
 
- Public Member Functions inherited from arrow::io::FileInterface
virtual ~FileInterface ()=0
 
FileMode::type mode () const
 
- Public Member Functions inherited from arrow::io::Writeable
virtual ~Writeable ()=default
 
Status Write (const std::string &data)
 
- Public Member Functions inherited from arrow::io::Seekable
virtual ~Seekable ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from arrow::io::WriteableFile
 WriteableFile ()=default
 
- Protected Member Functions inherited from arrow::io::OutputStream
 OutputStream ()=default
 
- Protected Member Functions inherited from arrow::io::FileInterface
 FileInterface ()
 
void set_mode (FileMode::type mode)
 
- Protected Attributes inherited from arrow::io::FileInterface
FileMode::type mode_
 

Detailed Description

File interface for writing to CUDA buffers, with optional buffering.

Constructor & Destructor Documentation

◆ CudaBufferWriter()

arrow::gpu::CudaBufferWriter::CudaBufferWriter ( const std::shared_ptr< CudaBuffer > &  buffer)
explicit

◆ ~CudaBufferWriter()

arrow::gpu::CudaBufferWriter::~CudaBufferWriter ( )

Member Function Documentation

◆ buffer_size()

int64_t arrow::gpu::CudaBufferWriter::buffer_size ( ) const

Returns size of host (CPU) buffer, 0 for unbuffered.

◆ Close()

Status arrow::gpu::CudaBufferWriter::Close ( )
overridevirtual

Close writer and flush buffered bytes to GPU.

Implements arrow::io::FileInterface.

◆ Flush()

Status arrow::gpu::CudaBufferWriter::Flush ( )
overridevirtual

Flush buffered bytes to GPU.

Reimplemented from arrow::io::Writeable.

◆ num_bytes_buffered()

int64_t arrow::gpu::CudaBufferWriter::num_bytes_buffered ( ) const

Returns number of bytes buffered on host.

◆ Seek()

Status arrow::gpu::CudaBufferWriter::Seek ( int64_t  position)
overridevirtual

Implements arrow::io::Seekable.

◆ SetBufferSize()

Status arrow::gpu::CudaBufferWriter::SetBufferSize ( const int64_t  buffer_size)

Set CPU buffer size to limit calls to cudaMemcpy.

Parameters
[in]buffer_sizethe size of CPU buffer to allocate
Returns
Status

By default writes are unbuffered

◆ Tell()

Status arrow::gpu::CudaBufferWriter::Tell ( int64_t *  position) const
overridevirtual

◆ Write()

Status arrow::gpu::CudaBufferWriter::Write ( const uint8_t *  data,
int64_t  nbytes 
)
overridevirtual

Implements arrow::io::Writeable.

◆ WriteAt()

Status arrow::gpu::CudaBufferWriter::WriteAt ( int64_t  position,
const uint8_t *  data,
int64_t  nbytes 
)
overridevirtual

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