strings_column_view.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2025, NVIDIA CORPORATION.
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #pragma once
6 
9 #include <cudf/utilities/export.hpp>
10 
16 namespace CUDF_EXPORT cudf {
17 
28  public:
35  // So we can use this from cython.
36  strings_column_view() = default;
39  ~strings_column_view() override = default;
52 
53  static constexpr size_type offsets_column_index{0};
54 
56  using column_view::is_empty;
58  using column_view::null_mask;
59  using column_view::offset;
60  using column_view::size;
61 
62  using offset_iterator = size_type const*;
63  using chars_iterator = char const*;
64 
70  [[nodiscard]] column_view parent() const;
71 
78  [[nodiscard]] column_view offsets() const;
79 
89  [[nodiscard]] int64_t chars_size(rmm::cuda_stream_view stream) const;
90 
102  [[nodiscard]] chars_iterator chars_begin(rmm::cuda_stream_view) const noexcept;
103 
113  [[nodiscard]] chars_iterator chars_end(rmm::cuda_stream_view stream) const;
114 };
115 
117 namespace strings {
118 } // namespace strings
119  // end of group
121 } // namespace CUDF_EXPORT cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
strings_column_view(strings_column_view &&)=default
Move constructor.
int64_t chars_size(rmm::cuda_stream_view stream) const
Returns the number of bytes in the chars child column.
chars_iterator chars_begin(rmm::cuda_stream_view) const noexcept
Return an iterator for the chars child column.
size_type const * offset_iterator
offsets iterator type
char const * chars_iterator
character iterator type
strings_column_view(column_view strings_column)
Construct a new strings column view object from a column view.s.
column_view parent() const
Returns the parent column.
strings_column_view(strings_column_view const &)=default
Copy constructor.
strings_column_view & operator=(strings_column_view const &)=default
Copy assignment operator.
chars_iterator chars_end(rmm::cuda_stream_view stream) const
Return an end iterator for the offsets child column.
strings_column_view & operator=(strings_column_view &&)=default
Move assignment operator.
column_view offsets() const
Returns the internal column of offsets.
column view class definitions
cudf::size_type null_count(bitmask_type const *bitmask, size_type start, size_type stop, rmm::cuda_stream_view stream=cudf::get_default_stream())
Given a validity bitmask, counts the number of null elements (unset bits) in the range [start,...
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:84
cuDF interfaces
Definition: host_udf.hpp:26
bool has_nulls(table_view const &view)
Returns True if the table has nulls in any of its columns.