Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cudf::detail::scalar_device_view_base Class Reference

A non-owning view of scalar from device that is trivially copyable and usable in CUDA device code. More...

Inheritance diagram for cudf::detail::scalar_device_view_base:
cudf::ast::generic_scalar_device_view cudf::detail::fixed_width_scalar_device_view_base cudf::fixed_point_scalar_device_view< T > cudf::string_scalar_device_view cudf::detail::fixed_width_scalar_device_view< T > cudf::duration_scalar_device_view< T > cudf::numeric_scalar_device_view< T > cudf::timestamp_scalar_device_view< T >

Public Member Functions

data_type type () const noexcept
 Returns the value type. More...
 
bool is_valid () const noexcept
 Returns whether the scalar holds a valid value (i.e., not null). More...
 
void set_valid (bool is_valid) noexcept
 Updates the validity of the value. More...
 

Protected Member Functions

 scalar_device_view_base (data_type type, bool *is_valid)
 Construct a new scalar device view base object from a device pointer and a validity boolean. More...
 

Protected Attributes

data_type _type {type_id::EMPTY}
 Value data type.
 
bool * _is_valid {}
 

Detailed Description

A non-owning view of scalar from device that is trivially copyable and usable in CUDA device code.

Definition at line 33 of file scalar_device_view.cuh.

Constructor & Destructor Documentation

◆ scalar_device_view_base()

cudf::detail::scalar_device_view_base::scalar_device_view_base ( data_type  type,
bool *  is_valid 
)
inlineprotected

Construct a new scalar device view base object from a device pointer and a validity boolean.

Parameters
typeThe data type of the scalar
is_validPointer to device memory containing boolean representing validity of the scalar.

Definition at line 72 of file scalar_device_view.cuh.

Member Function Documentation

◆ is_valid()

bool cudf::detail::scalar_device_view_base::is_valid ( ) const
inlinenoexcept

Returns whether the scalar holds a valid value (i.e., not null).

Returns
true The element is valid
false The element is null

Definition at line 50 of file scalar_device_view.cuh.

◆ set_valid()

void cudf::detail::scalar_device_view_base::set_valid ( bool  is_valid)
inlinenoexcept

Updates the validity of the value.

Parameters
is_validtrue: set the value to valid. false: set it to null

Definition at line 57 of file scalar_device_view.cuh.

◆ type()

data_type cudf::detail::scalar_device_view_base::type ( ) const
inlinenoexcept

Returns the value type.

Returns
The value type

Definition at line 42 of file scalar_device_view.cuh.

Member Data Documentation

◆ _is_valid

bool* cudf::detail::scalar_device_view_base::_is_valid {}
protected

Pointer to device memory containing boolean representing validity of the value.

Definition at line 61 of file scalar_device_view.cuh.


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