Public Member Functions | List of all members
cudf::list_scalar Class Reference

An owning class to represent a list value in device memory. More...

#include <scalar.hpp>

Inheritance diagram for cudf::list_scalar:
cudf::scalar

Public Member Functions

 list_scalar (list_scalar &&other)=default
 Move constructor for list_scalar. More...
 
list_scalaroperator= (list_scalar const &other)=delete
 
list_scalaroperator= (list_scalar &&other)=delete
 
 list_scalar (list_scalar const &other, rmm::cuda_stream_view stream=cudf::default_stream_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new list scalar object by deep copying another. More...
 
 list_scalar (cudf::column_view const &data, bool is_valid=true, rmm::cuda_stream_view stream=cudf::default_stream_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new list scalar object from column_view. More...
 
 list_scalar (cudf::column &&data, bool is_valid=true, rmm::cuda_stream_view stream=cudf::default_stream_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new list scalar object from existing column. More...
 
column_view view () const
 Returns a non-owning, immutable view to underlying device data. More...
 
- Public Member Functions inherited from cudf::scalar
scalaroperator= (scalar const &other)=delete
 
scalaroperator= (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::default_stream_value)
 Updates the validity of the value. More...
 
bool is_valid (rmm::cuda_stream_view stream=cudf::default_stream_value) 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...
 

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::default_stream_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new scalar object by deep copying another. More...
 
 scalar (data_type type, bool is_valid=false, rmm::cuda_stream_view stream=cudf::default_stream_value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 Construct a new scalar object. More...
 
- 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

An owning class to represent a list value in device memory.

Definition at line 725 of file scalar.hpp.

Constructor & Destructor Documentation

◆ list_scalar() [1/4]

cudf::list_scalar::list_scalar ( list_scalar &&  other)
default

Move constructor for list_scalar.

Parameters
otherThe other list_scalar to move from.

◆ list_scalar() [2/4]

cudf::list_scalar::list_scalar ( list_scalar const &  other,
rmm::cuda_stream_view  stream = cudf::default_stream_value,
rmm::mr::device_memory_resource mr = rmm::mr::get_current_device_resource() 
)

Construct a new list scalar object by deep copying another.

Parameters
otherThe scalar to copy.
streamCUDA stream used for device memory operations.
mrDevice memory resource to use for device memory allocation.

◆ list_scalar() [3/4]

cudf::list_scalar::list_scalar ( cudf::column_view const &  data,
bool  is_valid = true,
rmm::cuda_stream_view  stream = cudf::default_stream_value,
rmm::mr::device_memory_resource mr = rmm::mr::get_current_device_resource() 
)

Construct a new list scalar object from column_view.

The input column_view is copied.

Parameters
dataThe column data to copy.
is_validWhether the value held by the scalar is valid.
streamCUDA stream used for device memory operations.
mrDevice memory resource to use for device memory allocation.

◆ list_scalar() [4/4]

cudf::list_scalar::list_scalar ( cudf::column &&  data,
bool  is_valid = true,
rmm::cuda_stream_view  stream = cudf::default_stream_value,
rmm::mr::device_memory_resource mr = rmm::mr::get_current_device_resource() 
)

Construct a new list scalar object from existing column.

Parameters
dataThe column to take ownership of.
is_validWhether the value held by the scalar is valid.
streamCUDA stream used for device memory operations.
mrDevice memory resource to use for device memory allocation.

Member Function Documentation

◆ view()

column_view cudf::list_scalar::view ( ) const

Returns a non-owning, immutable view to underlying device data.

Returns
A non-owning, immutable view to underlying device data

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