Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cudf::detail::fixed_width_scalar< T > Class Template Reference
Inheritance diagram for cudf::detail::fixed_width_scalar< T >:
cudf::scalar cudf::chrono_scalar< T > cudf::numeric_scalar< T > cudf::duration_scalar< T > cudf::timestamp_scalar< T >

Public Types

using value_type = T
 

Public Member Functions

 fixed_width_scalar (fixed_width_scalar &&other)=default
 
 fixed_width_scalar (fixed_width_scalar const &other)=default
 
fixed_width_scalaroperator= (fixed_width_scalar const &other)=delete
 
fixed_width_scalaroperator= (fixed_width_scalar &&other)=delete
 
void set_value (T value, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
 Set the value of the scalar. More...
 
 operator value_type () const
 Implicit conversion operator to get the value of the scalar on the host.
 
value (rmm::cuda_stream_view stream=rmm::cuda_stream_default) const
 Get the value of the scalar. More...
 
T * data ()
 Returns a raw pointer to the value in device memory.
 
T const * data () const
 Returns a const raw pointer to the value in device memory.
 
- Public Member Functions inherited from cudf::scalar
 scalar (scalar &&other)=default
 
 scalar (scalar const &other)=default
 
scalaroperator= (scalar const &other)=delete
 
scalaroperator= (scalar &&other)=delete
 
data_type type () const noexcept
 Returns the scalar's logical value type.
 
void set_valid (bool is_valid, rmm::cuda_stream_view stream=rmm::cuda_stream_default)
 Updates the validity of the value. More...
 
bool is_valid (rmm::cuda_stream_view stream=rmm::cuda_stream_default) const
 Indicates whether the scalar contains a valid value. More...
 
bool * validity_data ()
 Returns a raw pointer to the validity bool in device memory.
 
bool const * validity_data () const
 Returns a const raw pointer to the validity bool in device memory.
 

Protected Member Functions

 fixed_width_scalar (T value, bool is_valid=true, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new fixed width scalar object. More...
 
 fixed_width_scalar (rmm::device_scalar< T > &&data, bool is_valid=true, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new fixed width scalar object from existing device memory. More...
 
- Protected Member Functions inherited from cudf::scalar
 scalar (data_type type, bool is_valid=false, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new scalar object. More...
 

Protected Attributes

rmm::device_scalar< T > _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.
 
rmm::device_scalar< bool > _is_valid {}
 Device bool signifying validity.
 

Detailed Description

template<typename T>
class cudf::detail::fixed_width_scalar< T >

Definition at line 127 of file scalar.hpp.

Constructor & Destructor Documentation

◆ fixed_width_scalar() [1/2]

template<typename T >
cudf::detail::fixed_width_scalar< T >::fixed_width_scalar ( value,
bool  is_valid = true,
rmm::cuda_stream_view  stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource mr = rmm::mr::get_current_device_resource() 
)
inlineprotected

Construct a new fixed width scalar object.

Parameters
[in]valueThe initial value of the scalar
[in]is_validWhether the value held by the scalar is valid
[in]streamCUDA stream used for device memory operations.
[in]mrDevice memory resource to use for device memory allocation

Definition at line 189 of file scalar.hpp.

◆ fixed_width_scalar() [2/2]

template<typename T >
cudf::detail::fixed_width_scalar< T >::fixed_width_scalar ( rmm::device_scalar< T > &&  data,
bool  is_valid = true,
rmm::cuda_stream_view  stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource mr = rmm::mr::get_current_device_resource() 
)
inlineprotected

Construct a new fixed width scalar object from existing device memory.

Parameters
[in]dataThe scalar's data in device memory
[in]is_validWhether the value held by the scalar is valid
[in]streamCUDA stream used for device memory operations.
[in]mrDevice memory resource to use for device memory allocation

Definition at line 205 of file scalar.hpp.

Member Function Documentation

◆ set_value()

template<typename T >
void cudf::detail::fixed_width_scalar< T >::set_value ( value,
rmm::cuda_stream_view  stream = rmm::cuda_stream_default 
)
inline

Set the value of the scalar.

Parameters
valueNew value of scalar
streamCUDA stream used for device memory operations.

Definition at line 145 of file scalar.hpp.

◆ value()

template<typename T >
T cudf::detail::fixed_width_scalar< T >::value ( rmm::cuda_stream_view  stream = rmm::cuda_stream_default) const
inline

Get the value of the scalar.

Parameters
streamCUDA stream used for device memory operations.

Definition at line 161 of file scalar.hpp.


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