23 #include <cuda/std/type_traits>
53 template <
typename T = void,
54 CUDF_ENABLE_IF(cuda::std::is_same_v<T, void> or is_rep_layout_compatible<T>())>
57 return static_cast<T const*
>(
_data);
63 template <typename T, CUDF_ENABLE_IF(is_rep_layout_compatible<T>())>
197 template <typename T, CUDF_ENABLE_IF(is_rep_layout_compatible<T>())>
200 return data<T>()[element_index];
206 template <typename T, CUDF_ENABLE_IF(is_fixed_point<T>())>
210 using rep =
typename T::rep;
274 template <
typename T = void,
275 CUDF_ENABLE_IF(cuda::std::is_same_v<T, void> or is_rep_layout_compatible<T>())>
278 return const_cast<T*
>(detail::column_device_view_base::head<T>());
284 template <typename T, CUDF_ENABLE_IF(is_rep_layout_compatible<T>())>
287 return const_cast<T*
>(detail::column_device_view_base::data<T>());
293 template <typename T, CUDF_ENABLE_IF(is_rep_layout_compatible<T>())>
296 return data<T>()[element_index];
302 template <typename T, CUDF_ENABLE_IF(is_fixed_point<T>())>
306 using rep =
typename T::rep;
318 template <typename T, CUDF_ENABLE_IF(is_rep_layout_compatible<T>())>
321 data<T>()[element_index] = value;
332 template <typename T, CUDF_ENABLE_IF(is_fixed_point<T>())>
337 using rep =
typename T::rep;
338 data<rep>()[element_index] = value.value();
Utilities for bit and bitmask operations.
Indicator for the logical data type of an element in a column.
constexpr CUDF_HOST_DEVICE int32_t scale() const noexcept
Returns the scale (for fixed_point types)
A minified version of cudf::column_device_view for use in JIT kernels.
size_type _num_children
The number of child columns.
T element(size_type element_index) const noexcept
Returns reference to element at the specified index.
column_device_view child(size_type child_index) const noexcept
Returns the specified child.
CUDF_HOST_DEVICE column_device_view(data_type type, size_type size, void const *data, bitmask_type const *null_mask, size_type offset, column_device_view *children, size_type num_children)
Creates an instance of this class using pre-existing device memory pointers to data,...
column_device_view * d_children
CUDF_HOST_DEVICE size_type num_child_columns() const noexcept
Returns the number of child columns.
A minified version of cudf::detail::column_device_view_base for use in JIT kernels.
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.
CUDF_HOST_DEVICE size_type size() const noexcept
Returns the number of elements in the column.
bool is_null_nocheck(size_type element_index) const noexcept
Returns whether the specified element is null.
bool is_null(size_type element_index) const noexcept
Returns whether the specified element is null.
CUDF_HOST_DEVICE size_type offset() const noexcept
Returns the index of the first element relative to the base memory allocation, i.e....
CUDF_HOST_DEVICE T const * data() const noexcept
Returns the underlying data casted to the specified type, plus the offset.
void const * _data
Pointer to device memory containing elements.
bitmask_type const * _null_mask
size_type _size
Number of elements.
bool is_valid(size_type element_index) const noexcept
Returns whether the specified element holds a valid value (i.e., not null).
CUDF_HOST_DEVICE data_type type() const noexcept
Returns the element type.
bool is_valid_nocheck(size_type element_index) const noexcept
Returns whether the specified element holds a valid value (i.e., not null)
data_type _type
Element type.
bitmask_type get_mask_word(size_type word_index) const noexcept
Returns the specified bitmask word from the null_mask().
CUDF_HOST_DEVICE T const * head() const noexcept
Returns pointer to the base device memory allocation casted to the specified type.
CUDF_HOST_DEVICE bool nullable() const noexcept
Indicates whether the column can contain null elements, i.e., if it has an allocated bitmask.
CUDF_HOST_DEVICE bitmask_type const * null_mask() const noexcept
Returns raw pointer to the underlying bitmask allocation.
A minified version of cudf::mutable_column_device_view for use in JIT kernels.
mutable_column_device_view(data_type type, size_type size, void *data, bitmask_type const *null_mask, size_type offset, mutable_column_device_view *children, size_type num_children)
Creates an instance of this class using pre-existing device memory pointers to data,...
CUDF_HOST_DEVICE size_type num_child_columns() const noexcept
Returns the number of child columns.
mutable_column_device_view child(size_type child_index) const noexcept
Returns the specified child.
CUDF_HOST_DEVICE T * head() const noexcept
Returns pointer to the base device memory allocation casted to the specified type.
T & element(size_type element_index) const noexcept
Returns reference to element at the specified index.
CUDF_HOST_DEVICE T * data() const noexcept
Returns the underlying data casted to the specified type, plus the offset.
T element(size_type element_index) const noexcept
Returns reference to element at the specified index.
void assign(size_type element_index, T value) const noexcept
Assigns value to the element at element_index
scale_type
The scale type for fixed_point.
constexpr CUDF_HOST_DEVICE size_type word_index(size_type bit_index)
Returns the index of the word containing the specified bit.
CUDF_HOST_DEVICE bool bit_is_set(bitmask_type const *bitmask, size_type bit_index)
Indicates whether the specified bit is set to 1
int32_t size_type
Row index type for columns and tables.
uint32_t bitmask_type
Bitmask type stored as 32-bit unsigned integer.
#define CUDF_ENABLE_IF(...)
Convenience macro for SFINAE as an unnamed template parameter.
fixed_point and supporting types
Helper struct for constructing fixed_point when value is already shifted.
Type declarations for libcudf.
#define CUDF_HOST_DEVICE
Indicates that the function or method is usable on host and device.