Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView > Class Template Reference

Base class for a device table of ColumnDeviceViews. More...

Public Member Functions

 table_device_view_base (table_device_view_base const &)=default
 Copy constructor.
 
 table_device_view_base (table_device_view_base &&)=default
 Move constructor.
 
table_device_view_baseoperator= (table_device_view_base const &)=default
 Copy assignment operator. More...
 
table_device_view_baseoperator= (table_device_view_base &&)=default
 Move assignment operator. More...
 
ColumnDeviceView * begin () const noexcept
 Returns an iterator to the first view in the table. More...
 
ColumnDeviceView * end () const noexcept
 Returns an iterator one past the last column view in the table. More...
 
ColumnDeviceView const & column (size_type column_index) const noexcept
 Returns a reference to the view of the specified column. More...
 
ColumnDeviceView & column (size_type column_index) noexcept
 Returns a reference to the view of the specified column. More...
 
size_type num_columns () const noexcept
 Returns the number of columns. More...
 
size_type num_rows () const noexcept
 Returns the number of rows. More...
 
void destroy ()
 Destroy the table_device_view object. More...
 

Protected Member Functions

 table_device_view_base (HostTableView source_view, rmm::cuda_stream_view stream)
 Construct a new table device view base object from host table_view. More...
 

Protected Attributes

rmm::device_buffer_descendant_storage {}
 Pointer to device memory holding the descendant storage.
 

Detailed Description

template<typename ColumnDeviceView, typename HostTableView>
class cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >

Base class for a device table of ColumnDeviceViews.

This class should not be used directly. Instead:

All public constructors and member functions of table_device_view_base are available in both table_device_view and mutable_table_device_view.

Template Parameters
ColumnDeviceViewThe type of column device view the table contains: expects column_device_view or mutable_column_device_view
HostTableViewThe type of table view used to create the table device view: expects table_view or mutable_table_view

Definition at line 55 of file table_device_view.cuh.

Constructor & Destructor Documentation

◆ table_device_view_base()

template<typename ColumnDeviceView , typename HostTableView >
cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::table_device_view_base ( HostTableView  source_view,
rmm::cuda_stream_view  stream 
)
protected

Construct a new table device view base object from host table_view.

Parameters
source_viewThe host table_view to create table device view from
streamThe CUDA stream to use for device memory allocation

Member Function Documentation

◆ begin()

template<typename ColumnDeviceView , typename HostTableView >
ColumnDeviceView* cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::begin ( ) const
inlinenoexcept

Returns an iterator to the first view in the table.

Returns
An iterator to the first view in the table

Definition at line 79 of file table_device_view.cuh.

◆ column() [1/2]

template<typename ColumnDeviceView , typename HostTableView >
ColumnDeviceView const& cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::column ( size_type  column_index) const
inlinenoexcept

Returns a reference to the view of the specified column.

Parameters
column_indexThe index of the desired column
Returns
A reference to the desired column

Definition at line 97 of file table_device_view.cuh.

◆ column() [2/2]

template<typename ColumnDeviceView , typename HostTableView >
ColumnDeviceView& cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::column ( size_type  column_index)
inlinenoexcept

Returns a reference to the view of the specified column.

Parameters
column_indexThe index of the desired column
Returns
A reference to the desired column

Definition at line 110 of file table_device_view.cuh.

◆ destroy()

template<typename ColumnDeviceView , typename HostTableView >
void cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::destroy ( )

Destroy the table_device_view object.

Note
Does not free the table data, simply frees the device memory allocated to hold the constituent column views.

◆ end()

template<typename ColumnDeviceView , typename HostTableView >
ColumnDeviceView* cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::end ( ) const
inlinenoexcept

Returns an iterator one past the last column view in the table.

end() acts as a place holder. Attempting to dereference it results in undefined behavior.

Returns
An iterator to one past the last column view in the table

Definition at line 89 of file table_device_view.cuh.

◆ num_columns()

template<typename ColumnDeviceView , typename HostTableView >
size_type cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::num_columns ( ) const
inlinenoexcept

Returns the number of columns.

Returns
The number of columns

Definition at line 122 of file table_device_view.cuh.

◆ num_rows()

template<typename ColumnDeviceView , typename HostTableView >
size_type cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::num_rows ( ) const
inlinenoexcept

Returns the number of rows.

Returns
The number of rows

Definition at line 129 of file table_device_view.cuh.

◆ operator=() [1/2]

template<typename ColumnDeviceView , typename HostTableView >
table_device_view_base& cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::operator= ( table_device_view_base< ColumnDeviceView, HostTableView > &&  )
default

Move assignment operator.

Returns
Reference to this object (after transferring ownership)

◆ operator=() [2/2]

template<typename ColumnDeviceView , typename HostTableView >
table_device_view_base& cudf::detail::table_device_view_base< ColumnDeviceView, HostTableView >::operator= ( table_device_view_base< ColumnDeviceView, HostTableView > const &  )
default

Copy assignment operator.

Returns
Reference to this object

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