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

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

#include <strings_column_view.hpp>

Inheritance diagram for cudf::strings_column_view:
cudf::column_view

Public Types

using offset_iterator = size_type const *
 offsets iterator type
 
using chars_iterator = char const *
 character iterator type
 

Public Member Functions

 strings_column_view (column_view strings_column)
 Construct a new strings column view object from a column view.s. More...
 
 strings_column_view (strings_column_view &&)=default
 Move constructor.
 
 strings_column_view (strings_column_view const &)=default
 Copy constructor.
 
strings_column_viewoperator= (strings_column_view const &)=default
 Copy assignment operator. More...
 
strings_column_viewoperator= (strings_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...
 
offset_iterator offsets_begin () const
 Return an iterator for the offsets child column. More...
 
offset_iterator offsets_end () const
 Return an end iterator for the offsets child column. More...
 
int64_t chars_size (rmm::cuda_stream_view stream) const noexcept
 Returns the number of bytes in the chars child column. More...
 
chars_iterator chars_begin (rmm::cuda_stream_view) const
 Return an iterator for the chars child column. More...
 
chars_iterator chars_end (rmm::cuda_stream_view stream) const
 Return an end iterator for the offsets child column. More...
 

Static Public Attributes

static constexpr size_type offsets_column_index {0}
 Child index of the offsets column.
 

Detailed Description

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

Definition at line 37 of file strings_column_view.hpp.

Constructor & Destructor Documentation

◆ strings_column_view()

cudf::strings_column_view::strings_column_view ( column_view  strings_column)

Construct a new strings column view object from a column view.s.

Parameters
strings_columnThe column view to wrap.

Member Function Documentation

◆ chars_begin()

chars_iterator cudf::strings_column_view::chars_begin ( rmm::cuda_stream_view  ) const

Return an iterator for the chars child column.

This does not apply the offset of the parent. The offsets child must be used to properly address the char bytes.

For example, to access the first character of string i (accounting for a sliced column offset) use: chars_begin(stream)[offsets_begin()[i]].

Returns
Iterator pointing to the first char byte.

◆ chars_end()

chars_iterator cudf::strings_column_view::chars_end ( rmm::cuda_stream_view  stream) const

Return an end iterator for the offsets child column.

This does not apply the offset of the parent. The offsets child must be used to properly address the char bytes.

Parameters
streamCUDA stream used for device memory operations and kernel launches
Returns
Iterator pointing 1 past the last char byte.

◆ chars_size()

int64_t cudf::strings_column_view::chars_size ( rmm::cuda_stream_view  stream) const
noexcept

Returns the number of bytes in the chars child column.

This accounts for empty columns but does not reflect a sliced parent column view (i.e.: non-zero offset or reduced row count).

Parameters
streamCUDA stream used for device memory operations and kernel launches
Returns
Number of bytes in the chars child column

◆ offsets()

column_view cudf::strings_column_view::offsets ( ) const

Returns the internal column of offsets.

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

◆ offsets_begin()

offset_iterator cudf::strings_column_view::offsets_begin ( ) const

Return an iterator for the offsets child column.

Deprecated:
Since 24.04

This automatically applies the offset of the parent.

Returns
Iterator pointing to the first offset value.

◆ offsets_end()

offset_iterator cudf::strings_column_view::offsets_end ( ) const

Return an end iterator for the offsets child column.

Deprecated:
Since 24.04

This automatically applies the offset of the parent.

Returns
Iterator pointing 1 past the last offset value.

◆ operator=() [1/2]

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

Move assignment operator.

Returns
Reference to this instance (after transferring ownership)

◆ operator=() [2/2]

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

Copy assignment operator.

Returns
Reference to this instance

◆ parent()

column_view cudf::strings_column_view::parent ( ) const

Returns the parent column.

Returns
The parents column

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