Public Member Functions | List of all members
cudf::table Class Reference

A set of cudf::column's of the same size. More...

#include <table.hpp>

Public Member Functions

 table (table &&)=default
 Move constructor.
 
tableoperator= (table const &)=delete
 
tableoperator= (table &&)=delete
 
 table (table const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Construct a new table by copying the contents of another table. More...
 
 table (std::vector< std::unique_ptr< column >> &&columns)
 Moves the contents from a vector of unique_ptrs to columns to construct a new table. More...
 
 table (table_view view, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
 Copy the contents of a table_view to construct a new table. More...
 
size_type num_columns () const noexcept
 Returns the number of columns in the table. More...
 
size_type num_rows () const noexcept
 Returns the number of rows. More...
 
table_view view () const
 Returns an immutable, non-owning table_view of the contents of this table. More...
 
 operator table_view () const
 Conversion operator to an immutable, non-owning table_view of the contents of this table.
 
mutable_table_view mutable_view ()
 Returns a mutable, non-owning mutable_table_view of the contents of this table. More...
 
 operator mutable_table_view ()
 Conversion operator to a mutable, non-owning mutable_table_view of the contents of this table.
 
std::vector< std::unique_ptr< column > > release ()
 Releases ownership of the columns by returning a vector of unique_ptrs to the constituent columns. More...
 
template<typename InputIterator >
table_view select (InputIterator begin, InputIterator end) const
 Returns a table_view built from a range of column indices. More...
 
table_view select (std::vector< cudf::size_type > const &column_indices) const
 Returns a table_view with set of specified columns. More...
 
columnget_column (cudf::size_type column_index)
 Returns a reference to the specified column. More...
 
column const & get_column (cudf::size_type i) const
 Returns a const reference to the specified column. More...
 

Detailed Description

A set of cudf::column's of the same size.

Definition at line 40 of file table.hpp.

Constructor & Destructor Documentation

◆ table() [1/3]

cudf::table::table ( table const &  other,
rmm::cuda_stream_view  stream = cudf::get_default_stream(),
rmm::device_async_resource_ref  mr = cudf::get_current_device_resource_ref() 
)
explicit

Construct a new table by copying the contents of another table.

Uses the specified stream and device_memory_resource for all allocations and copies.

Parameters
otherThe table to copy
streamCUDA stream used for device memory operations.
mrDevice memory resource to use for all device memory allocations

◆ table() [2/3]

cudf::table::table ( std::vector< std::unique_ptr< column >> &&  columns)

Moves the contents from a vector of unique_ptrs to columns to construct a new table.

Parameters
columnsThe vector of unique_ptrs to columns whose contents will be moved into the new table.

◆ table() [3/3]

Copy the contents of a table_view to construct a new table.

Parameters
viewThe view whose contents will be copied to create a new table
streamCUDA stream used for device memory operations.
mrDevice memory resource used for allocating the device memory for the new columns

Member Function Documentation

◆ get_column() [1/2]

column& cudf::table::get_column ( cudf::size_type  column_index)
inline

Returns a reference to the specified column.

Exceptions
std::out_of_rangeIf i is out of the range [0, num_columns)
Parameters
column_indexIndex of the desired column
Returns
A reference to the desired column

Definition at line 178 of file table.hpp.

◆ get_column() [2/2]

column const& cudf::table::get_column ( cudf::size_type  i) const
inline

Returns a const reference to the specified column.

Exceptions
std::out_of_rangeIf i is out of the range [0, num_columns)
Parameters
iIndex of the desired column
Returns
A const reference to the desired column

Definition at line 189 of file table.hpp.

◆ mutable_view()

mutable_table_view cudf::table::mutable_view ( )

Returns a mutable, non-owning mutable_table_view of the contents of this table.

Returns
A mutable, non-owning mutable_table_view of the contents of this table

◆ num_columns()

size_type cudf::table::num_columns ( ) const
inlinenoexcept

Returns the number of columns in the table.

Returns
The number of columns in the table

Definition at line 86 of file table.hpp.

◆ num_rows()

size_type cudf::table::num_rows ( ) const
inlinenoexcept

Returns the number of rows.

Returns
The number of rows

Definition at line 93 of file table.hpp.

◆ release()

std::vector<std::unique_ptr<column> > cudf::table::release ( )

Releases ownership of the columns by returning a vector of unique_ptrs to the constituent columns.

After release(), num_columns() == 0 and num_rows() == 0

Returns
A vector of unique_ptrs to the constituent columns

◆ select() [1/2]

template<typename InputIterator >
table_view cudf::table::select ( InputIterator  begin,
InputIterator  end 
) const
inline

Returns a table_view built from a range of column indices.

Exceptions
std::out_of_rangeIf any index is outside [0, num_columns())
Parameters
beginBeginning of the range
endEnding of the range
Returns
A table_view consisting of columns from the original table specified by the elements of column_indices

Definition at line 146 of file table.hpp.

◆ select() [2/2]

table_view cudf::table::select ( std::vector< cudf::size_type > const &  column_indices) const
inline

Returns a table_view with set of specified columns.

Exceptions
std::out_of_rangeIf any element in column_indices is outside [0, num_columns())
Parameters
column_indicesIndices of columns in the table
Returns
A table_view consisting of columns from the original table specified by the elements of column_indices

Definition at line 164 of file table.hpp.

◆ view()

table_view cudf::table::view ( ) const

Returns an immutable, non-owning table_view of the contents of this table.

Returns
An immutable, non-owning table_view of the contents of this table

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