Public Member Functions | List of all members
cudf::io::datasource::owning_buffer< Container > Class Template Reference

Derived implementation of buffer that owns the data. More...

#include <datasource.hpp>

Inheritance diagram for cudf::io::datasource::owning_buffer< Container >:
cudf::io::datasource::buffer

Public Member Functions

 owning_buffer (Container &&data_owner)
 Moves the input container into the newly created object. More...
 
 owning_buffer (Container &&data_owner, uint8_t const *data_ptr, size_t size)
 Moves the input container into the newly created object, and exposes a subspan of the buffer. More...
 
size_t size () const override
 Returns the size of the buffer. More...
 
uint8_t const * data () const override
 Returns the pointer to the data in the buffer. More...
 
- Public Member Functions inherited from cudf::io::datasource::buffer
virtual ~buffer ()
 Base class destructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from cudf::io::datasource::buffer
template<typename Container >
static std::unique_ptr< buffercreate (Container &&data_owner)
 Factory to construct a datasource buffer object from a container. More...
 

Detailed Description

template<typename Container>
class cudf::io::datasource::owning_buffer< Container >

Derived implementation of buffer that owns the data.

Can use different container types to hold the data buffer.

Template Parameters
ContainerType of the container object that owns the data

Definition at line 329 of file datasource.hpp.

Constructor & Destructor Documentation

◆ owning_buffer() [1/2]

template<typename Container >
cudf::io::datasource::owning_buffer< Container >::owning_buffer ( Container &&  data_owner)
inline

Moves the input container into the newly created object.

Parameters
data_ownerThe container to construct the buffer from (ownership is transferred)

Definition at line 336 of file datasource.hpp.

◆ owning_buffer() [2/2]

template<typename Container >
cudf::io::datasource::owning_buffer< Container >::owning_buffer ( Container &&  data_owner,
uint8_t const *  data_ptr,
size_t  size 
)
inline

Moves the input container into the newly created object, and exposes a subspan of the buffer.

Parameters
data_ownerThe container to construct the buffer from (ownership is transferred)
data_ptrPointer to the start of the subspan
sizeThe size of the subspan

Definition at line 349 of file datasource.hpp.

Member Function Documentation

◆ data()

template<typename Container >
uint8_t const* cudf::io::datasource::owning_buffer< Container >::data ( ) const
inlineoverridevirtual

Returns the pointer to the data in the buffer.

Returns
Pointer to the data in the buffer

Implements cudf::io::datasource::buffer.

Definition at line 366 of file datasource.hpp.

◆ size()

template<typename Container >
size_t cudf::io::datasource::owning_buffer< Container >::size ( ) const
inlineoverridevirtual

Returns the size of the buffer.

Returns
The size of the buffer in bytes

Implements cudf::io::datasource::buffer.

Definition at line 359 of file datasource.hpp.


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