Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cudf::ast::generic_scalar_device_view Class Reference

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

#include <expressions.hpp>

Inheritance diagram for cudf::ast::generic_scalar_device_view:
cudf::detail::scalar_device_view_base

Public Member Functions

template<typename T >
T const value () const noexcept
 Returns the stored value. More...
 
template<typename T >
 generic_scalar_device_view (numeric_scalar< T > &s)
 Construct a new generic scalar device view object from a numeric scalar. More...
 
template<typename T >
 generic_scalar_device_view (timestamp_scalar< T > &s)
 Construct a new generic scalar device view object from a timestamp scalar. More...
 
template<typename T >
 generic_scalar_device_view (duration_scalar< T > &s)
 Construct a new generic scalar device view object from a duration scalar. More...
 
 generic_scalar_device_view (string_scalar &s)
 Construct a new generic scalar device view object from a string scalar. More...
 
- Public Member Functions inherited from cudf::detail::scalar_device_view_base
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

 generic_scalar_device_view (data_type type, void const *data, bool *is_valid)
 Construct a new fixed width scalar device view object. More...
 
 generic_scalar_device_view (data_type type, void const *data, bool *is_valid, size_type size)
 Construct a new string 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)
 Construct a new scalar device view base object from a device pointer and a validity boolean. More...
 

Protected Attributes

void const * _data {}
 Pointer to device memory containing the value.
 
size_type const _size {}
 Size of the string in bytes for string scalar.
 
- 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 or a string.

Definition at line 172 of file expressions.hpp.

Constructor & Destructor Documentation

◆ generic_scalar_device_view() [1/6]

template<typename T >
cudf::ast::generic_scalar_device_view::generic_scalar_device_view ( numeric_scalar< T > &  s)
inline

Construct a new generic scalar device view object from a numeric scalar.

Parameters
sThe numeric scalar to construct from

Definition at line 194 of file expressions.hpp.

◆ generic_scalar_device_view() [2/6]

template<typename T >
cudf::ast::generic_scalar_device_view::generic_scalar_device_view ( timestamp_scalar< T > &  s)
inline

Construct a new generic scalar device view object from a timestamp scalar.

Parameters
sThe timestamp scalar to construct from

Definition at line 204 of file expressions.hpp.

◆ generic_scalar_device_view() [3/6]

template<typename T >
cudf::ast::generic_scalar_device_view::generic_scalar_device_view ( duration_scalar< T > &  s)
inline

Construct a new generic scalar device view object from a duration scalar.

Parameters
sThe duration scalar to construct from

Definition at line 214 of file expressions.hpp.

◆ generic_scalar_device_view() [4/6]

cudf::ast::generic_scalar_device_view::generic_scalar_device_view ( string_scalar s)
inline

Construct a new generic scalar device view object from a string scalar.

Parameters
sThe string scalar to construct from

Definition at line 223 of file expressions.hpp.

◆ generic_scalar_device_view() [5/6]

cudf::ast::generic_scalar_device_view::generic_scalar_device_view ( data_type  type,
void const *  data,
bool *  is_valid 
)
inlineprotected

Construct a new fixed width scalar device view object.

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 240 of file expressions.hpp.

◆ generic_scalar_device_view() [6/6]

cudf::ast::generic_scalar_device_view::generic_scalar_device_view ( data_type  type,
void const *  data,
bool *  is_valid,
size_type  size 
)
inlineprotected

Construct a new string scalar device view object.

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
sizeThe size of the string in bytes

Definition at line 253 of file expressions.hpp.

Member Function Documentation

◆ value()

template<typename T >
T const cudf::ast::generic_scalar_device_view::value ( ) const
inlinenoexcept

Returns the stored value.

Template Parameters
TThe desired type
Returns
The stored value

Definition at line 181 of file expressions.hpp.


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