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
 
tableoperator= (table const &)=delete
 
tableoperator= (table &&)=delete
 
 table (table const &other)
 Construct a new table by copying the contents of another 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. More...
 
 table (table_view view, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 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.
 
size_type num_rows () const noexcept
 Returns the number of rows.
 
table_view view () const
 Returns an immutable, non-owning table_view of the contents of this table.
 
 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.
 
 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 38 of file table.hpp.

Constructor & Destructor Documentation

◆ table() [1/2]

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() [2/2]

cudf::table::table ( table_view  view,
rmm::cuda_stream_view  stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource mr = rmm::mr::get_current_device_resource() 
)

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
iIndex of the desired column
Returns
A reference to the desired column

Definition at line 158 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 169 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

◆ 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 126 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 144 of file table.hpp.


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