An immutable, non-owning view of device data as a column of elements that is trivially copyable and usable in CUDA device code.
More...
|
| column_device_view_base (column_device_view_base const &)=default |
| Copy constructor.
|
|
| column_device_view_base (column_device_view_base &&)=default |
| Move constructor.
|
|
column_device_view_base & | operator= (column_device_view_base const &)=default |
| Copy assignment operator. More...
|
|
column_device_view_base & | operator= (column_device_view_base &&)=default |
| Move assignment operator. More...
|
|
template<typename T = void, CUDF_ENABLE_IF(std::is_same_v< T, void > or is_rep_layout_compatible< T >()) > |
CUDF_HOST_DEVICE T const * | head () const noexcept |
| Returns pointer to the base device memory allocation casted to the specified type. More...
|
|
template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) > |
CUDF_HOST_DEVICE T const * | data () const noexcept |
| Returns the underlying data casted to the specified type, plus the offset. More...
|
|
CUDF_HOST_DEVICE size_type | size () const noexcept |
| Returns the number of elements in the column. More...
|
|
CUDF_HOST_DEVICE data_type | type () const noexcept |
| Returns the element type. More...
|
|
CUDF_HOST_DEVICE bool | nullable () const noexcept |
| Indicates whether the column can contain null elements, i.e., if it has an allocated bitmask. More...
|
|
CUDF_HOST_DEVICE bitmask_type const * | null_mask () const noexcept |
| Returns raw pointer to the underlying bitmask allocation. More...
|
|
CUDF_HOST_DEVICE size_type | offset () const noexcept |
| Returns the index of the first element relative to the base memory allocation, i.e., what is returned from head<T>() . More...
|
|
bool | is_valid (size_type element_index) const noexcept |
| Returns whether the specified element holds a valid value (i.e., not null). More...
|
|
bool | is_valid_nocheck (size_type element_index) const noexcept |
| Returns whether the specified element holds a valid value (i.e., not null) More...
|
|
bool | is_null (size_type element_index) const noexcept |
| Returns whether the specified element is null. More...
|
|
bool | is_null_nocheck (size_type element_index) const noexcept |
| Returns whether the specified element is null. More...
|
|
bitmask_type | get_mask_word (size_type word_index) const noexcept |
| Returns the specified bitmask word from the null_mask() . More...
|
|
An immutable, non-owning view of device data as a column of elements that is trivially copyable and usable in CUDA device code.
column_device_view_base and derived classes do not support has_nulls() or null_count(). The primary reason for this is that creation of column_device_views from column_views that have UNKNOWN null counts would require an on-the-spot, and not-obvious computation of null count, which could lead to undesirable performance issues. This information is also generally not needed in device code, and on the host-side is easily accessible from the associated column_view.
Definition at line 100 of file column_device_view.cuh.
template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
Returns the underlying data casted to the specified type, plus the offset.
- Note
- If
offset() == 0
, then head<T>() == data<T>()
For columns with children, the pointer returned is undefined and should not be used.
This function does not participate in overload resolution if is_rep_layout_compatible<T>
is false.
- Template Parameters
-
- Returns
- Typed pointer to underlying data, including the offset
Definition at line 158 of file column_device_view.cuh.
template<typename T = void, CUDF_ENABLE_IF(std::is_same_v< T, void > or is_rep_layout_compatible< T >()) >
Returns pointer to the base device memory allocation casted to the specified type.
- Note
- If
offset() == 0
, then head<T>() == data<T>()
-
It should be rare to need to access the
head<T>()
allocation of a column, and instead, accessing the elements should be done via data<T>()
.
This function will only participate in overload resolution if is_rep_layout_compatible<T>()
or std::is_same_v<T,void>
are true.
- Template Parameters
-
- Returns
- Typed pointer to underlying data
Definition at line 137 of file column_device_view.cuh.