strings_column_view.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2022, 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 
19 
25 namespace cudf {
26 
37  public:
46  ~strings_column_view() = default;
59 
60  static constexpr size_type offsets_column_index{0};
61  static constexpr size_type chars_column_index{1};
62 
67  using column_view::offset;
68  using column_view::size;
69 
70  using offset_iterator = offset_type const*;
71  using chars_iterator = char const*;
72 
78  [[nodiscard]] column_view parent() const;
79 
86  [[nodiscard]] column_view offsets() const;
87 
95  [[nodiscard]] offset_iterator offsets_begin() const;
96 
104  [[nodiscard]] offset_iterator offsets_end() const;
105 
112  [[nodiscard]] column_view chars() const;
113 
122  [[nodiscard]] size_type chars_size() const noexcept;
123 
135  [[nodiscard]] chars_iterator chars_begin() const;
136 
145  [[nodiscard]] chars_iterator chars_end() const;
146 };
147 
149 namespace strings {
150 } // namespace strings
151  // end of group
153 } // namespace cudf
cudf::size_type
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:80
cudf::column_view
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Definition: column_view.hpp:322
cudf::detail::column_view_base::offset
size_type offset() const noexcept
Returns the index of the first element relative to the base memory allocation, i.e....
Definition: column_view.hpp:230
cudf::strings_column_view::offset_iterator
offset_type const * offset_iterator
offsets iterator type
Definition: strings_column_view.hpp:70
cudf::strings_column_view::strings_column_view
strings_column_view(column_view strings_column)
Construct a new strings column view object from a column view.s.
cudf::strings_column_view::parent
column_view parent() const
Returns the parent column.
cudf::strings_column_view::operator=
strings_column_view & operator=(strings_column_view &&)=default
Move assignment operator.
cudf::detail::column_view_base::null_count
size_type null_count() const
Returns the count of null elements.
cudf::strings_column_view::offsets_column_index
static constexpr size_type offsets_column_index
Child index of the offsets column.
Definition: strings_column_view.hpp:60
cudf::offset_type
int32_t offset_type
Offset type for column offsets.
Definition: types.hpp:83
cudf::strings_column_view::chars_iterator
char const * chars_iterator
character iterator type
Definition: strings_column_view.hpp:71
cudf::strings_column_view::chars_column_index
static constexpr size_type chars_column_index
Child index of the characters column.
Definition: strings_column_view.hpp:61
cudf::strings_column_view::chars
column_view chars() const
Returns the internal column of chars.
cudf::detail::column_view_base::has_nulls
bool has_nulls() const
Indicates if the column contains null elements, i.e., null_count() > 0
Definition: column_view.hpp:195
cudf
cuDF interfaces
Definition: aggregation.hpp:34
cudf::strings_column_view::offsets
column_view offsets() const
Returns the internal column of offsets.
cudf::strings_column_view
Given a column-view of strings type, an instance of this class provides a wrapper on this compound co...
Definition: strings_column_view.hpp:36
cudf::strings_column_view::chars_begin
chars_iterator chars_begin() const
Return an iterator for the chars child column.
cudf::strings_column_view::chars_size
size_type chars_size() const noexcept
Returns the number of bytes in the chars child column.
cudf::strings_column_view::operator=
strings_column_view & operator=(strings_column_view const &)=default
Copy assignment operator.
cudf::strings_column_view::strings_column_view
strings_column_view(strings_column_view const &)=default
Copy constructor.
cudf::detail::column_view_base::size
size_type size() const noexcept
Returns the number of elements in the column.
Definition: column_view.hpp:133
cudf::strings_column_view::strings_column_view
strings_column_view(strings_column_view &&)=default
Move constructor.
cudf::strings_column_view::chars_end
chars_iterator chars_end() const
Return an end iterator for the offsets child column.
column_view.hpp
column view class definitions
cudf::strings_column_view::offsets_begin
offset_iterator offsets_begin() const
Return an iterator for the offsets child column.
cudf::detail::column_view_base::is_empty
bool is_empty() const noexcept
Returns true if size() returns zero, or false otherwise.
Definition: column_view.hpp:140
cudf::strings_column_view::offsets_end
offset_iterator offsets_end() const
Return an end iterator for the offsets child column.
cudf::detail::column_view_base::null_mask
bitmask_type const * null_mask() const noexcept
Returns raw pointer to the underlying bitmask allocation.
Definition: column_view.hpp:222