Public Types | Public Member Functions | Static Public Attributes | List of all members
cudf::lists_column_view Class Reference

Given a column-view of lists type, an instance of this class provides a wrapper on this compound column for list operations. More...

#include <lists_column_view.hpp>

Inheritance diagram for cudf::lists_column_view:
cudf::column_view

Public Types

using offset_iterator = size_type const *
 Iterator type for offsets.
 

Public Member Functions

 lists_column_view (column_view const &lists_column)
 Construct a new lists column view object from a column view. More...
 
 lists_column_view (lists_column_view &&)=default
 Move constructor.
 
 lists_column_view (lists_column_view const &)=default
 Copy constructor.
 
lists_column_viewoperator= (lists_column_view const &)=default
 Copy assignment operator. More...
 
lists_column_viewoperator= (lists_column_view &&)=default
 Move assignment operator. More...
 
column_view parent () const
 Returns the parent column. More...
 
column_view offsets () const
 Returns the internal column of offsets. More...
 
column_view child () const
 Returns the internal child column. More...
 
column_view get_sliced_child (rmm::cuda_stream_view stream) const
 Returns the internal child column, applying any offset from the root. More...
 
offset_iterator offsets_begin () const noexcept
 Return first offset (accounting for column offset) More...
 
offset_iterator offsets_end () const noexcept
 Return pointer to the position that is one past the last offset. More...
 
auto child_begin () const noexcept
 Returns iterator to the beginning of the ordered sequence of child column-views. More...
 
auto child_end () const noexcept
 Returns iterator to the end of the ordered sequence of child column-views. More...
 

Static Public Attributes

static constexpr size_type offsets_column_index {0}
 The index of the offsets column.
 
static constexpr size_type child_column_index {1}
 The index of the child column.
 

Detailed Description

Given a column-view of lists type, an instance of this class provides a wrapper on this compound column for list operations.

Definition at line 40 of file lists_column_view.hpp.

Constructor & Destructor Documentation

◆ lists_column_view()

cudf::lists_column_view::lists_column_view ( column_view const &  lists_column)

Construct a new lists column view object from a column view.

Parameters
lists_columnThe column view to wrap

Member Function Documentation

◆ child()

column_view cudf::lists_column_view::child ( ) const

Returns the internal child column.

Exceptions
cudf::logic_errorif this is an empty column
Returns
The internal child column

◆ child_begin()

auto cudf::column_view::child_begin
inlinenoexcept

Returns iterator to the beginning of the ordered sequence of child column-views.

Returns
An iterator to a column_view referencing the first child column

Definition at line 410 of file column_view.hpp.

◆ child_end()

auto cudf::column_view::child_end
inlinenoexcept

Returns iterator to the end of the ordered sequence of child column-views.

Returns
An iterator to a column_view one past the end of the child columns

Definition at line 417 of file column_view.hpp.

◆ get_sliced_child()

column_view cudf::lists_column_view::get_sliced_child ( rmm::cuda_stream_view  stream) const

Returns the internal child column, applying any offset from the root.

Slice/split offset values are only stored at the root level of a list column. So when doing computations on them, we need to apply that offset to the child columns when recursing. Most functions operating in a recursive manner on lists columns should be using get_sliced_child() instead of child().

Exceptions
cudf::logic_errorif this is an empty column
Parameters
streamCUDA stream used for device memory operations and kernel launches
Returns
A sliced child column view

◆ offsets()

column_view cudf::lists_column_view::offsets ( ) const

Returns the internal column of offsets.

Exceptions
cudf::logic_errorif this is an empty column
Returns
The internal column of offsets

◆ offsets_begin()

offset_iterator cudf::lists_column_view::offsets_begin ( ) const
inlinenoexcept

Return first offset (accounting for column offset)

Returns
Pointer to the first offset

Definition at line 120 of file lists_column_view.hpp.

◆ offsets_end()

offset_iterator cudf::lists_column_view::offsets_end ( ) const
inlinenoexcept

Return pointer to the position that is one past the last offset.

This function return the position that is one past the last offset of the lists column. Since the current lists column may be a sliced column, this offsets_end() iterator should not be computed using the size of the offsets() child column, which is also the offsets of the entire original (non-sliced) lists column.

Returns
Pointer to one past the last offset

Definition at line 135 of file lists_column_view.hpp.

◆ operator=() [1/2]

lists_column_view& cudf::lists_column_view::operator= ( lists_column_view &&  )
default

Move assignment operator.

Returns
The reference to this lists column

◆ operator=() [2/2]

lists_column_view& cudf::lists_column_view::operator= ( lists_column_view const &  )
default

Copy assignment operator.

Returns
The reference to this lists column

◆ parent()

column_view cudf::lists_column_view::parent ( ) const

Returns the parent column.

Returns
The parent column

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