列视图类定义 更多...
#include <cudf/types.hpp>
#include <cudf/utilities/error.hpp>
#include <cudf/utilities/prefetch.hpp>
#include <cudf/utilities/span.hpp>
#include <cudf/utilities/traits.hpp>
#include <cudf/utilities/type_dispatcher.hpp>
#include <limits>
#include <type_traits>
#include <vector>
类 | |
类 | cudf::detail::column_view_base |
一个非拥有、不可变的设备数据视图,将数据表示为元素列,其中某些元素可能为空,由位掩码指示。 更多... | |
类 | cudf::column_view |
一个非拥有、不可变的设备数据视图,将数据表示为元素列,其中某些元素可能为空,由位掩码指示。 更多... | |
类 | cudf::mutable_column_view |
一个非拥有、可变的设备数据视图,将数据表示为元素列,其中某些元素可能为空,由位掩码指示。 更多... | |
命名空间 | |
cudf | |
cuDF 接口 | |
函数 | |
size_type | cudf::count_descendants (column_view parent) |
计算指定父级的后代数量。 更多... | |
column_view | cudf::bit_cast (column_view const &input, data_type type) |
在大小相同且底层表示兼容的类型之间进行零拷贝转换。 更多... | |
mutable_column_view | cudf::bit_cast (mutable_column_view const &input, data_type type) |
在大小相同且底层表示兼容的类型之间进行零拷贝转换。 更多... | |
std::size_t | cudf::detail::shallow_hash (column_view const &input) |
根据指定列的浅层状态计算哈希值。 更多... | |
bool | cudf::detail::is_shallow_equivalent (column_view const &lhs, column_view const &rhs) |
仅使用浅层状态判断两个 column_view 视图的列是否等价。 更多... | |
列视图类定义
定义在文件 column_view.hpp 中。
bool cudf::detail::is_shallow_equivalent | ( | column_view const & | lhs, |
column_view const & | rhs | ||
) |
仅使用浅层状态判断两个 column_view
视图的列是否等价。
如果对于任何操作 F
,则两个列是等价的,即
对于任意两个非空列,is_shallow_equivalent(c0,c1)
为真仅当它们视图的是完全相同的物理列。换句话说,两个物理独立的列即使元素完全等价,它们的浅层状态也不等价。
此函数的复杂度为 O( min(count_descendants(lhs), count_descendants(rhs)) )
,也就是说,它与任一列的元素数量无关。
此函数不会检查 lhs
或 rhs
的元素,也不会访问任何设备内存或启动任何内核。
lhs | 用于比较的左侧 column_view |
rhs | 用于比较的右侧 column_view |
lhs
和 rhs
具有等价的浅层状态std::size_t cudf::detail::shallow_hash | ( | column_view const & | input | ) |
根据指定列的浅层状态计算哈希值。
对于任意两个列,如果 is_shallow_equivalent(c0,c1)
为真,则 shallow_hash(c0) == shallow_hash(c1)
。
计算 input
的哈希值的复杂度为 O( count_descendants(input) )
,也就是说,它与列中的元素数量无关。
此函数不会检查 input
的元素,也不会访问任何设备内存或启动任何内核。
input | 要计算哈希值的 column_view |
input
的浅层状态派生的哈希值。