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

A type-erased scalar_device_view where the value is a fixed width type. More...

Inheritance diagram for cudf::detail::fixed_width_scalar_device_view_base:
cudf::detail::scalar_device_view_base 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

template<typename T >
__device__ T & value () noexcept
 Returns reference to stored value. More...
 
template<typename T >
__device__ T const & value () const noexcept
 Returns const reference to stored value. More...
 
template<typename T >
__device__ void set_value (T value)
 
template<typename T >
__device__ T * data () noexcept
 Returns a raw pointer to the value in device memory. More...
 
template<typename T >
__device__ T const * data () const noexcept
 Returns a const raw pointer to the value in device memory. More...
 
- Public Member Functions inherited from cudf::detail::scalar_device_view_base
__host__ __device__ data_type type () const noexcept
 Returns the value type.
 
__device__ bool is_valid () const noexcept
 Returns whether the scalar holds a valid value (i.e., not null). More...
 
__device__ void set_valid (bool is_valid) noexcept
 Updates the validity of the value. More...
 

Protected Member Functions

 fixed_width_scalar_device_view_base (data_type type, void *data, bool *is_valid)
 Construct a new fixed width scalar device view object. More...
 
- Protected Member Functions inherited from cudf::detail::scalar_device_view_base
 scalar_device_view_base (data_type type, bool *is_valid)
 

Protected Attributes

void * _data {}
 Pointer to device memory containing the value.
 
- Protected Attributes inherited from cudf::detail::scalar_device_view_base
data_type _type {type_id::EMPTY}
 Value data type.
 
bool * _is_valid {}
 

Detailed Description

A type-erased scalar_device_view where the value is a fixed width type.

Definition at line 70 of file scalar_device_view.cuh.

Constructor & Destructor Documentation

◆ fixed_width_scalar_device_view_base()

cudf::detail::fixed_width_scalar_device_view_base::fixed_width_scalar_device_view_base ( data_type  type,
void *  data,
bool *  is_valid 
)
inlineprotected

Construct a new fixed width scalar device view object.

This constructor should not be used directly. get_scalar_device_view should be used to get the view of an existing scalar

Parameters
typeThe data type of the value
dataThe pointer to the data in device memory
is_validThe pointer to the bool in device memory that indicates the validity of the stored value

Definition at line 135 of file scalar_device_view.cuh.

Member Function Documentation

◆ data() [1/2]

template<typename T >
__device__ T const* cudf::detail::fixed_width_scalar_device_view_base::data ( ) const
inlinenoexcept

Returns a const raw pointer to the value in device memory.

Template Parameters
TThe desired type

Definition at line 116 of file scalar_device_view.cuh.

◆ data() [2/2]

template<typename T >
__device__ T* cudf::detail::fixed_width_scalar_device_view_base::data ( )
inlinenoexcept

Returns a raw pointer to the value in device memory.

Template Parameters
TThe desired type

Definition at line 106 of file scalar_device_view.cuh.

◆ value() [1/2]

template<typename T >
__device__ T const& cudf::detail::fixed_width_scalar_device_view_base::value ( ) const
inlinenoexcept

Returns const reference to stored value.

Template Parameters
TThe desired type

Definition at line 89 of file scalar_device_view.cuh.

◆ value() [2/2]

template<typename T >
__device__ T& cudf::detail::fixed_width_scalar_device_view_base::value ( )
inlinenoexcept

Returns reference to stored value.

Template Parameters
TThe desired type

Definition at line 78 of file scalar_device_view.cuh.


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