dictionary_column_view.hpp
前往此文件的文档。
1 /*
2  * Copyright (c) 2020-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  * https://apache.ac.cn/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_EXPORT cudf {
40  public
46  dictionary_column_view(column_view const& dictionary_column);
49  ~dictionary_column_view() override = default;
50 
57 
64 
66  static constexpr size_type indices_column_index{0};
68  static constexpr size_type keys_column_index{1};
69 
71  using column_view::is_empty;
73  using column_view::null_mask;
74  using column_view::offset;
75  using column_view::size;
76 
82  [[nodiscard]] column_view parent() const noexcept;
83 
89  [[nodiscard]] column_view indices() const noexcept;
90 
97  [[nodiscard]] column_view get_indices_annotated() const noexcept;
98 
104  [[nodiscard]] column_view keys() const noexcept;
105 
111  [[nodiscard]] data_type keys_type() const noexcept;
112 
118  [[nodiscard]] size_type keys_size() const noexcept;
119 }; // 组结束
121 
123 namespace dictionary { // 在此处定义以便doxygen输出
124 }
125 
126 } // namespace CUDF_EXPORT cudf
表示设备数据的一个非拥有、不可变视图,数据被视为元素列,其中一些元素可能为空,如索引所示...
指示列中元素的逻辑数据类型。
定义: types.hpp:243
用于对字典列进行操作的包装类。
dictionary_column_view(dictionary_column_view &&)=default
移动构造函数。
dictionary_column_view & operator=(dictionary_column_view const &)=default
移动赋值运算符。
dictionary_column_view(dictionary_column_view const &)=default
拷贝构造函数。
dictionary_column_view(column_view const &dictionary_column)
从列视图构造新的字典列视图对象。
dictionary_column_view & operator=(dictionary_column_view &&)=default
拷贝赋值运算符。
column_view parent() const noexcept
返回父列。
列视图类定义
cudf::size_type null_count(bitmask_type const *bitmask, size_type start, size_type stop, rmm::cuda_stream_view stream=cudf::get_default_stream())
给定一个有效位掩码,计算范围 [start,...] 内的空元素(未设置位)数量。
int32_t size_type
列和表的行索引类型。
定义: types.hpp:95
cuDF 接口
定义: host_udf.hpp:37
bool has_nulls(table_view const &view)
如果表中的任何列包含空值,则返回 True。