An owning class to represent a fixed_point number in device memory. More...
#include <scalar.hpp>
Public Types | |
using | rep_type = typename T::rep |
The representation type of the fixed_point number. | |
using | value_type = T |
The value type of the fixed_point number. | |
Public Member Functions | |
fixed_point_scalar (fixed_point_scalar &&other)=default | |
Move constructor for fixed_point_scalar. More... | |
fixed_point_scalar & | operator= (fixed_point_scalar const &other)=delete |
fixed_point_scalar & | operator= (fixed_point_scalar &&other)=delete |
fixed_point_scalar (fixed_point_scalar const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new fixed_point scalar object by deep copying another. More... | |
fixed_point_scalar (rep_type value, numeric::scale_type scale, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new fixed_point scalar object from already shifted value and scale. More... | |
fixed_point_scalar (rep_type value, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new fixed_point scalar object from a value and default 0-scale. More... | |
fixed_point_scalar (T value, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new fixed_point scalar object from a fixed_point number. More... | |
fixed_point_scalar (rmm::device_scalar< rep_type > &&data, numeric::scale_type scale, bool is_valid=true, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new fixed_point scalar object from existing device memory. More... | |
rep_type | value (rmm::cuda_stream_view stream=cudf::get_default_stream()) const |
Get the value of the scalar. More... | |
T | fixed_point_value (rmm::cuda_stream_view stream=cudf::get_default_stream()) const |
Get the decimal32, decimal64 or decimal128. More... | |
operator value_type () const | |
Explicit conversion operator to get the value of the scalar on the host. | |
rep_type * | data () |
Returns a raw pointer to the value in device memory. More... | |
rep_type const * | data () const |
Returns a const raw pointer to the value in device memory. More... | |
Public Member Functions inherited from cudf::scalar | |
scalar & | operator= (scalar const &other)=delete |
scalar & | operator= (scalar &&other)=delete |
data_type | type () const noexcept |
Returns the scalar's logical value type. More... | |
void | set_valid_async (bool is_valid, rmm::cuda_stream_view stream=cudf::get_default_stream()) |
Updates the validity of the value. More... | |
bool | is_valid (rmm::cuda_stream_view stream=cudf::get_default_stream()) const |
Indicates whether the scalar contains a valid value. More... | |
bool * | validity_data () |
Returns a raw pointer to the validity bool in device memory. More... | |
bool const * | validity_data () const |
Return a const raw pointer to the validity bool in device memory. More... | |
Protected Attributes | |
rmm::device_scalar< rep_type > | _data |
device memory containing the value | |
Protected Attributes inherited from cudf::scalar | |
data_type | _type {type_id::EMPTY} |
Logical type of value in the scalar. | |
cudf::detail::device_scalar< bool > | _is_valid |
Device bool signifying validity. | |
Additional Inherited Members | |
Protected Member Functions inherited from cudf::scalar | |
scalar (scalar &&other)=default | |
Move constructor for scalar. More... | |
scalar (scalar const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new scalar object by deep copying another. More... | |
scalar (data_type type, bool is_valid=false, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref()) | |
Construct a new scalar object. More... | |
An owning class to represent a fixed_point number in device memory.
T | the data type of the fixed_point number. |
Definition at line 302 of file scalar.hpp.
|
default |
Move constructor for fixed_point_scalar.
other | The other fixed_point_scalar to move from. |
cudf::fixed_point_scalar< T >::fixed_point_scalar | ( | fixed_point_scalar< T > const & | other, |
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Construct a new fixed_point scalar object by deep copying another.
other | The scalar to copy. |
stream | CUDA stream used for device memory operations. |
mr | Device memory resource to use for device memory allocation. |
cudf::fixed_point_scalar< T >::fixed_point_scalar | ( | rep_type | value, |
numeric::scale_type | scale, | ||
bool | is_valid = true , |
||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Construct a new fixed_point scalar object from already shifted value and scale.
value | The initial shifted value of the fixed_point scalar. |
scale | The scale of the fixed_point scalar. |
is_valid | Whether the value held by the scalar is valid. |
stream | CUDA stream used for device memory operations. |
mr | Device memory resource to use for device memory allocation. |
cudf::fixed_point_scalar< T >::fixed_point_scalar | ( | rep_type | value, |
bool | is_valid = true , |
||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Construct a new fixed_point scalar object from a value and default 0-scale.
value | The initial value of the fixed_point scalar. |
is_valid | Whether the value held by the scalar is valid. |
stream | CUDA stream used for device memory operations. |
mr | Device memory resource to use for device memory allocation. |
cudf::fixed_point_scalar< T >::fixed_point_scalar | ( | T | value, |
bool | is_valid = true , |
||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Construct a new fixed_point scalar object from a fixed_point number.
value | The fixed_point number from which the fixed_point scalar will be initialized. |
is_valid | Whether the value held by the scalar is valid. |
stream | CUDA stream used for device memory operations. |
mr | Device memory resource to use for device memory allocation. |
cudf::fixed_point_scalar< T >::fixed_point_scalar | ( | rmm::device_scalar< rep_type > && | data, |
numeric::scale_type | scale, | ||
bool | is_valid = true , |
||
rmm::cuda_stream_view | stream = cudf::get_default_stream() , |
||
rmm::device_async_resource_ref | mr = cudf::get_current_device_resource_ref() |
||
) |
Construct a new fixed_point scalar object from existing device memory.
data | The scalar's data in device memory. |
scale | The scale of the fixed_point scalar. |
is_valid | Whether the value held by the scalar is valid. |
stream | CUDA stream used for device memory operations. |
mr | Device memory resource to use for device memory allocation. |
rep_type* cudf::fixed_point_scalar< T >::data | ( | ) |
Returns a raw pointer to the value in device memory.
rep_type const* cudf::fixed_point_scalar< T >::data | ( | ) | const |
Returns a const raw pointer to the value in device memory.
T cudf::fixed_point_scalar< T >::fixed_point_value | ( | rmm::cuda_stream_view | stream = cudf::get_default_stream() | ) | const |
Get the decimal32, decimal64 or decimal128.
stream | CUDA stream used for device memory operations. |
rep_type cudf::fixed_point_scalar< T >::value | ( | rmm::cuda_stream_view | stream = cudf::get_default_stream() | ) | const |
Get the value of the scalar.
stream | CUDA stream used for device memory operations. |