100 template <
typename T>
101 __device__ T
const&
value() const noexcept
112 template <
typename T>
124 template <
typename T>
127 return static_cast<T*
>(
_data);
136 template <
typename T>
137 __device__ T
const*
data() const noexcept
139 return static_cast<T const*
>(
_data);
165 template <
typename T>
175 __device__ T&
value() noexcept {
return fixed_width_scalar_device_view_base::value<T>(); }
182 __device__ T
const&
value() const noexcept
184 return fixed_width_scalar_device_view_base::value<T>();
199 __device__ T*
data() noexcept {
return fixed_width_scalar_device_view_base::data<T>(); }
206 __device__ T
const*
data() const noexcept
208 return fixed_width_scalar_device_view_base::data<T>();
234 template <
typename T>
254 template <
typename T>
284 __device__
rep_type const&
rep() const noexcept {
return *_data; }
327 [[nodiscard]] __device__
char const*
data() const noexcept
329 return static_cast<char const*
>(_data);
347 template <
typename T>
367 template <
typename T>
390 template <
typename T>
413 template <
typename T>
425 template <
typename T>
437 template <
typename T>
Indicator for the logical data type of an element in a column.
A type-erased scalar_device_view where the value is a fixed width type.
T const & value() const noexcept
Returns const reference to stored value.
T & value() noexcept
Returns reference to stored value.
T const * data() const noexcept
Returns a const raw pointer to the value in device memory.
void set_value(T value)
Stores the value in scalar.
void * _data
Pointer to device memory containing the value.
T * data() noexcept
Returns a raw pointer to the value in device memory.
fixed_width_scalar_device_view_base(data_type type, void *data, bool *is_valid)
Construct a new fixed width scalar device view object.
A type of scalar_device_view where the value is a fixed width type.
void set_value(T value)
Stores the value in scalar.
T & value() noexcept
Returns reference to stored value.
T value_type
The value type of the scalar.
T * data() noexcept
Returns a raw pointer to the value in device memory.
fixed_width_scalar_device_view(data_type type, T *data, bool *is_valid)
Construct a new fixed width scalar device view object.
T const * data() const noexcept
Returns a const raw pointer to the value in device memory.
T const & value() const noexcept
Returns const reference to stored value.
T * data()
Returns a raw pointer to the value in device memory.
A non-owning view of scalar from device that is trivially copyable and usable in CUDA device code.
data_type _type
Value data type.
bool is_valid() const noexcept
Returns whether the scalar holds a valid value (i.e., not null).
void set_valid(bool is_valid) noexcept
Updates the validity of the value.
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.
data_type type() const noexcept
Returns the value type.
A type of scalar_device_view that stores a pointer to a duration value.
duration_scalar_device_view(data_type type, T *data, bool *is_valid)
Construct a new duration scalar device view object from data and validity pointers.
An owning class to represent a duration value in device memory.
A type of scalar_device_view that stores a pointer to a fixed_point value.
typename T::rep rep_type
The representation type of the fixed_point value.
rep_type const & rep() const noexcept
Get the value of the scalar, as a rep_type.
fixed_point_scalar_device_view(data_type type, rep_type *data, bool *is_valid)
Construct a new fixed point scalar device view object from data and validity pointers.
void set_value(rep_type value)
Stores the value in scalar.
An owning class to represent a fixed_point number in device memory.
rep_type * data()
Returns a raw pointer to the value in device memory.
A type of scalar_device_view that stores a pointer to a numerical value.
numeric_scalar_device_view(data_type type, T *data, bool *is_valid)
Construct a new numeric scalar device view object from data and validity pointers.
An owning class to represent a numerical value in device memory.
bool * validity_data()
Returns a raw pointer to the validity bool in device memory.
data_type type() const noexcept
Returns the scalar's logical value type.
A type of scalar_device_view that stores a pointer to a string value.
ValueType value() const noexcept
Returns string_view of the value of this scalar.
char const * data() const noexcept
Returns a raw pointer to the value in device memory.
size_type size() const noexcept
Returns the size of the string in bytes.
string_scalar_device_view(data_type type, char const *data, bool *is_valid, size_type size)
Construct a new string scalar device view object from string data, size and validity pointers.
An owning class to represent a string in device memory.
size_type size() const
Returns the size of the string in bytes.
char const * data() const
Returns a raw pointer to the string in device memory.
A non-owning, immutable view of device data that is a variable length char array representing a UTF-8...
A type of scalar_device_view that stores a pointer to a timestamp value.
timestamp_scalar_device_view(data_type type, T *data, bool *is_valid)
Construct a new timestamp scalar device view object.
An owning class to represent a timestamp value in device memory.
int32_t size_type
Row index type for columns and tables.
@ EMPTY
Always null with no underlying data.
auto get_scalar_device_view(numeric_scalar< T > &s)
Get the device view of a numeric_scalar.
Class definitions for cudf::scalar.
Class definition for cudf::string_view.
Type declarations for libcudf.