strings_column_view.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2024, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
20 #include <cudf/utilities/export.hpp>
21 
27 namespace CUDF_EXPORT cudf {
28 
39  public:
48  ~strings_column_view() = default;
61 
62  static constexpr size_type offsets_column_index{0};
63 
65  using column_view::is_empty;
67  using column_view::null_mask;
68  using column_view::offset;
69  using column_view::size;
70 
71  using offset_iterator = size_type const*;
72  using chars_iterator = char const*;
73 
79  [[nodiscard]] column_view parent() const;
80 
87  [[nodiscard]] column_view offsets() const;
88 
98  [[nodiscard]] int64_t chars_size(rmm::cuda_stream_view stream) const noexcept;
99 
112 
122  [[nodiscard]] chars_iterator chars_end(rmm::cuda_stream_view stream) const;
123 };
124 
126 namespace strings {
127 } // namespace strings
128  // end of group
130 } // 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.
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.
chars_iterator chars_begin(rmm::cuda_stream_view) const
Return an iterator for the chars child column.
strings_column_view(strings_column_view const &)=default
Copy constructor.
int64_t chars_size(rmm::cuda_stream_view stream) const noexcept
Returns the number of bytes in the chars child column.
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:95
cuDF interfaces
Definition: aggregation.hpp:35
bool has_nulls(table_view const &view)
Returns True if the table has nulls in any of its columns.