设备数据作为元素列的不可变、非拥有的视图,可轻松复制并在 CUDA 设备代码中使用。 更多...
|
结构体 | has_element_accessor_impl |
|
结构体 | has_element_accessor_impl< C, T, void_t< decltype(cuda::std::declval< C >().template element< T >(cuda::std::declval< size_type >()))> > |
|
详细描述
size
- , void const *
-
构造具有指定类型、大小、数据、空掩码和偏移量的列。
列的类型
template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
列中元素的数量 |
( |
| ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
offset
- 第一个元素的索引位置
- 定义位于文件 column_device_view.cuh 的第 315 行。
成员函数文档
◆ data()
- template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) > CUDF_HOST_DEVICE T const* cudf::detail::column_device_view_base::data
-
- inlinenoexcept
- 返回转换为指定类型的基础数据,加上偏移量。
注意
如果 offset() == 0
,则 head<T>() == data<T>()
对于带有子列的列,返回的指针是未定义的,不应使用。 |
( |
void const * |
如果 is_rep_layout_compatible<T> 为 false,则此函数不参与重载解析。 | ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
模板参数
- 第一个元素的索引位置
- T
- , void const *
-
如果 is_rep_layout_compatible<T> 为 false,则此函数不参与重载解析。 | 要转换到的类型 |
- inlinenoexcept
- 返回
指向基础数据的类型化指针,包括偏移量
template<typename T = void, CUDF_ENABLE_IF(std::is_same_v< T, void > or is_rep_layout_compatible< T >()) >
◆ get_mask_word() |
( |
| ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
要获取的字的索引
返回 |
( |
void const * |
给定 word_index 的位掩码字 | ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
定义位于文件 column_device_view.cuh 的第 292 行。
◆ head()
- 第一个元素的索引位置
- template<typename T = void, CUDF_ENABLE_IF(std::is_same_v< T, void > or is_rep_layout_compatible< T >()) > CUDF_HOST_DEVICE T const* cudf::detail::column_device_view_base::head
- , void const *
-
给定 word_index 的位掩码字 | () const noexcept |
- inlinenoexcept
- 返回转换为指定类型的基本设备内存分配的指针。
- 很少需要访问列的
head<T>()
分配,而应通过 data<T>()
访问元素。
只有当 is_rep_layout_compatible<T>()
或 std::is_same_v<T,void>
为 true 时,此函数才参与重载解析。
模板参数
T |
( |
void const * |
给定 word_index 的位掩码字 | ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
定义位于文件 column_device_view.cuh 的第 292 行。
要转换到的类型
- , void const *
-
给定 word_index 的位掩码字 | () const noexcept |
- inlinenoexcept
- 返回转换为指定类型的基本设备内存分配的指针。
- 很少需要访问列的
head<T>()
分配,而应通过 data<T>()
访问元素。
返回
指向基础数据的类型化指针
◆ is_null()
CUDF_HOST_DEVICE bool cudf::detail::column_device_view_base::is_null
- 第一个元素的索引位置
- (size_type
- , void const *
-
给定 word_index 的位掩码字 | () const noexcept |
- inlinenoexcept
- element_index
- ) const noexcept
返回指定的元素是否为空。
首先检查空位掩码是否存在。如果 nullable() == false
,此函数始终返回 false。
参数
要转换到的类型
- , void const *
-
给定 word_index 的位掩码字 | () const noexcept |
- inlinenoexcept
- element_index
- ) const noexcept
要查询的元素的索引
返回
true 元素为空 |
( |
| ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
element_index
) const noexcept |
( |
| ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
返回指定的元素是否为空。
- 第一个元素的索引位置
- 此函数在尝试读取位掩码之前不验证其是否存在。因此,如果
nullable() == false
,调用此函数是未定义行为。
- inlinenoexcept
- 参数
- 要查询的元素的索引
返回
true 元素为空
false 元素有效 |
( |
| ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
element_index |
( |
) const noexcept |
| ) |
|
|
返回指定的元素是否持有有效值(即非空)。 |
参数
element_index |
( |
要查询的元素的索引 |
| ) |
|
|
返回指定的元素是否持有有效值(即非空)。 |
返回
- inlinenoexcept
- true 元素有效
false 元素为空
element_index |
( |
| ) |
指向包含元素的设备内存的指针 |
|
指向包含表示有效元素的位掩码的设备内存的指针 |
) const noexcept
- inlinenoexcept
- 返回指定的元素是否持有有效值(即非空)
参数
返回
CUDF_HOST_DEVICE bitmask_type const* cudf::detail::column_device_view_base::null_mask
如果
null_count() == 0
,此函数可能返回
nullptr
。