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 = offset_type const *
 

Public Member Functions

 lists_column_view (column_view const &lists_column)
 
 lists_column_view (lists_column_view &&lists_view)=default
 
 lists_column_view (const lists_column_view &lists_view)=default
 
lists_column_viewoperator= (lists_column_view const &)=default
 
lists_column_viewoperator= (lists_column_view &&)=default
 
column_view parent () const
 Returns the parent column.
 
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.
 
auto child_end () const noexcept
 Returns iterator to the end of the ordered sequence of child column-views.
 

Static Public Attributes

static constexpr size_type offsets_column_index {0}
 
static constexpr size_type child_column_index {1}
 

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 39 of file lists_column_view.hpp.

Member Function Documentation

◆ child()

column_view cudf::lists_column_view::child ( ) const

Returns the internal child column.

Exceptions
cudf::logicerror if this is an empty column

◆ 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::logicerror if this is an empty column

◆ offsets()

column_view cudf::lists_column_view::offsets ( ) const

Returns the internal column of offsets.

Exceptions
cudf::logicerror if this is an empty column

◆ offsets_begin()

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

Return first offset (accounting for column offset)

Returns
int32_t const* Pointer to the first offset

Definition at line 99 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
int32_t const* Pointer to one past the last offset

Definition at line 114 of file lists_column_view.hpp.


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