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

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

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

Public Member Functions

 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, 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 * 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 * data () const noexcept
 Returns the underlying data casted to the specified type, plus the offset. More...
 
template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
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...
 
template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
void assign (size_type element_index, T value) const noexcept
 Assigns value to the element at element_index More...
 
template<typename T , CUDF_ENABLE_IF(is_fixed_point< T >()) >
void assign (size_type element_index, T value) const noexcept
 Assigns value to the element at element_index. More...
 
mutable_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...
 

Additional Inherited Members

- 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::mutable_column_device_view for use in JIT kernels.

Definition at line 244 of file types.cuh.

Constructor & Destructor Documentation

◆ mutable_column_device_view()

cudf::jit::mutable_column_device_view::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 
)
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 258 of file types.cuh.

Member Function Documentation

◆ assign() [1/2]

template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
void cudf::jit::mutable_column_device_view::assign ( size_type  element_index,
value 
) const
inlinenoexcept

Assigns value to the element at element_index

Template Parameters
TThe element type
Parameters
element_indexPosition of the desired element
valueThe value to assign

Definition at line 319 of file types.cuh.

◆ assign() [2/2]

template<typename T , CUDF_ENABLE_IF(is_fixed_point< T >()) >
void cudf::jit::mutable_column_device_view::assign ( size_type  element_index,
value 
) const
inlinenoexcept

Assigns value to the element at element_index.

Warning
Expects that value has been scaled to the column's scale
Template Parameters
TThe element type
Parameters
element_indexPosition of the desired element
valueThe value to assign

Definition at line 333 of file types.cuh.

◆ child()

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

Returns the specified child.

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

Definition at line 344 of file types.cuh.

◆ data()

template<typename T , CUDF_ENABLE_IF(is_rep_layout_compatible< T >()) >
CUDF_HOST_DEVICE T* cudf::jit::mutable_column_device_view::data ( ) const
inlinenoexcept

Returns the underlying data casted to the specified type, plus the offset.

This function does not participate in overload resolution if is_rep_layout_compatible<T> is false.

Note
If offset() == 0, then head<T>() == data<T>()
Template Parameters
TThe type to cast to
Returns
Typed pointer to underlying data, including the offset

Definition at line 285 of file types.cuh.

◆ element() [1/2]

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

Returns reference to element at the specified index.

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 294 of file types.cuh.

◆ element() [2/2]

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

Returns reference to element at the specified index.

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 303 of file types.cuh.

◆ head()

template<typename T = void, CUDF_ENABLE_IF(cuda::std::is_same_v< T, void > or is_rep_layout_compatible< T >()) >
CUDF_HOST_DEVICE T* cudf::jit::mutable_column_device_view::head ( ) const
inlinenoexcept

Returns pointer to the base device memory allocation casted to the specified type.

This function will only participate in overload resolution if is_rep_layout_compatible<T>() or std::is_same_v<T,void> are true.

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>().
Template Parameters
Thetype to cast to
Returns
Typed pointer to underlying data

Definition at line 276 of file types.cuh.

◆ num_child_columns()

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

Returns the number of child columns.

Returns
The number of child columns

Definition at line 354 of file types.cuh.


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