A minified version of cudf::detail::column_device_view_base
for use in JIT kernels.
More...
Public Member Functions | |
CUDF_HOST_DEVICE | column_device_view_base (data_type type, size_type size, void const *data, bitmask_type const *null_mask, size_type offset) |
Constructs a column with the specified type, size, data, nullmask and offset. More... | |
template<typename T = void, CUDF_ENABLE_IF(cuda::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... | |
Protected Attributes | |
data_type | _type |
Element type. More... | |
size_type | _size |
Number of elements. More... | |
void const * | _data |
Pointer to device memory containing elements. More... | |
bitmask_type const * | _null_mask |
size_type | _offset |
A minified version of cudf::detail::column_device_view_base
for use in JIT kernels.
|
inline |
Constructs a column with the specified type, size, data, nullmask and offset.
type | The type of the column |
size | The number of elements in the column |
data | Pointer to device memory containing elements |
null_mask | Pointer to device memory containing bitmask representing valid elements |
offset | Index position of the first element |
|
inlinenoexcept |
Returns the underlying data casted to the specified type, plus the offset.
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.
T | The type to cast to |
|
inlinenoexcept |
Returns the specified bitmask word from the null_mask()
.
nullable() == false
.word_index | The index of the word to get |
|
inlinenoexcept |
Returns pointer to the base device memory allocation casted to the specified type.
offset() == 0
, then head<T>() == data<T>()
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.
The | type to cast to |
|
inlinenoexcept |
Returns whether the specified element is null.
Checks first for the existence of the null bitmask. If nullable() == false
, this function always returns false.
nullable() == true
can be guaranteed, then it is more performant to use is_null_nocheck()
.element_index | The index of the element to query |
|
inlinenoexcept |
Returns whether the specified element is null.
This function does not verify the existence of the bitmask before attempting to read it. Therefore, it is undefined behavior to call this function if nullable() == false
.
element_index | The index of the element to query |
|
inlinenoexcept |
Returns whether the specified element holds a valid value (i.e., not null).
Checks first for the existence of the null bitmask. If nullable() == false
, this function always returns true.
nullable() == true
can be guaranteed, then it is more performant to use is_valid_nocheck()
.element_index | The index of the element to query |
|
inlinenoexcept |
Returns whether the specified element holds a valid value (i.e., not null)
This function does not verify the existence of the bitmask before attempting to read it. Therefore, it is undefined behavior to call this function if nullable() == false
.
element_index | The index of the element to query |
|
inlinenoexcept |
Returns raw pointer to the underlying bitmask allocation.
offset()
.null_count() == 0
, this may return nullptr
.
|
inlinenoexcept |
Indicates whether the column can contain null elements, i.e., if it has an allocated bitmask.
null_count() > 0
, this function must always return true
.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |