All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Attributes | List of all members
cudf::jit::column_device_view Class Reference

A minified version of cudf::column_device_view for use in JIT kernels. More...

Inheritance diagram for cudf::jit::column_device_view:
cudf::jit::detail::column_device_view_base

Public Member Functions

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, nullmask, and offset. More...
 
template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
element (size_type element_index) const noexcept
 Returns reference to element at the specified index. More...
 
template<typename T , CUDF_ENABLE_IF(is_fixed_point< T >()) >
element (size_type element_index) const noexcept
 Returns reference to element at the specified index. More...
 
column_device_view child (size_type child_index) const noexcept
 Returns the specified child. More...
 
CUDF_HOST_DEVICE size_type num_child_columns () const noexcept
 Returns the number of child columns. More...
 
- Public Member Functions inherited from cudf::jit::detail::column_device_view_base
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

column_device_viewd_children = nullptr
 
size_type _num_children = 0
 The number of child columns. More...
 
- Protected Attributes inherited from cudf::jit::detail::column_device_view_base
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
 

Detailed Description

A minified version of cudf::column_device_view for use in JIT kernels.

Definition at line 167 of file types.cuh.

Constructor & Destructor Documentation

◆ column_device_view()

CUDF_HOST_DEVICE cudf::jit::column_device_view::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 
)
inline

Creates an instance of this class using pre-existing device memory pointers to data, nullmask, and offset.

Parameters
typeThe type of the column
sizeThe number of elements in the column
dataPointer to the device memory containing the data
null_maskPointer to the device memory containing the null bitmask
offsetThe index of the first element in the column
childrenPointer to the device memory containing child data
num_childrenThe number of child columns

Definition at line 181 of file types.cuh.

Member Function Documentation

◆ child()

column_device_view cudf::jit::column_device_view::child ( size_type  child_index) const
inlinenoexcept

Returns the specified child.

Parameters
child_indexThe index of the desired child
Returns
column_view The requested child column_view

Definition at line 218 of file types.cuh.

◆ element() [1/2]

template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
T cudf::jit::column_device_view::element ( size_type  element_index) const
inlinenoexcept

Returns reference to element at the specified index.

If the element at the specified index is NULL, i.e., is_null(element_index) == true, then any attempt to use the result will lead to undefined behavior.

This function accounts for the offset.

This function does not participate in overload resolution if is_rep_layout_compatible<T> is false. Specializations of this function may exist for types T where is_rep_layout_compatible<T> is false.

Template Parameters
TThe element type
Parameters
element_indexPosition of the desired element
Returns
reference to the element at the specified index

Definition at line 198 of file types.cuh.

◆ element() [2/2]

template<typename T , CUDF_ENABLE_IF(is_fixed_point< T >()) >
T cudf::jit::column_device_view::element ( size_type  element_index) const
inlinenoexcept

Returns reference to element at the specified index.

If the element at the specified index is NULL, i.e., is_null(element_index) == true, then any attempt to use the result will lead to undefined behavior.

This function accounts for the offset.

This function does not participate in overload resolution if is_rep_layout_compatible<T> is false. Specializations of this function may exist for types T where is_rep_layout_compatible<T> is false.

Template Parameters
TThe element type
Parameters
element_indexPosition of the desired element
Returns
reference to the element at the specified index

Definition at line 207 of file types.cuh.

◆ num_child_columns()

CUDF_HOST_DEVICE size_type cudf::jit::column_device_view::num_child_columns ( ) const
inlinenoexcept

Returns the number of child columns.

Returns
The number of child columns

Definition at line 226 of file types.cuh.

Member Data Documentation

◆ _num_children

size_type cudf::jit::column_device_view::_num_children = 0
protected

The number of child columns.

Definition at line 240 of file types.cuh.

◆ d_children

column_device_view* cudf::jit::column_device_view::d_children = nullptr
protected

Array of column_device_view objects in device memory. Based on element type, children may contain additional data

Definition at line 235 of file types.cuh.


The documentation for this class was generated from the following file: