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

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

#include <scalar.hpp>

Inheritance diagram for cudf::struct_scalar:
cudf::scalar

Public Member Functions

 struct_scalar (struct_scalar &&other)=default
 
struct_scalaroperator= (struct_scalar const &other)=delete
 
struct_scalaroperator= (struct_scalar &&other)=delete
 
 struct_scalar (struct_scalar const &other, rmm::cuda_stream_view stream=rmm::cuda_stream_default, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
 
 struct_scalar (table_view const &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 struct scalar object from table_view. More...
 
 struct_scalar (host_span< column_view const > 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 struct scalar object from a host_span of column_views. More...
 
 struct_scalar (table &&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 struct scalar object from an existing table in device memory. More...
 
table_view view () const
 Returns a non-owning, immutable view to underlying device data.
 
- 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.
 
void set_valid_async (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.
 

Additional Inherited Members

- Protected Member Functions inherited from cudf::scalar
 scalar (scalar &&other)=default
 
 scalar (scalar const &other, 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 by deep copying another. More...
 
 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 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 struct value in device memory.

Definition at line 708 of file scalar.hpp.

Constructor & Destructor Documentation

◆ struct_scalar() [1/3]

cudf::struct_scalar::struct_scalar ( table_view const &  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 struct scalar object from table_view.

The input table_view is deep-copied.

Parameters
dataThe table 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.

◆ struct_scalar() [2/3]

cudf::struct_scalar::struct_scalar ( host_span< column_view const >  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 struct scalar object from a host_span of column_views.

The input column_views are deep-copied.

Parameters
dataThe column_views 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.

◆ struct_scalar() [3/3]

cudf::struct_scalar::struct_scalar ( table &&  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 struct scalar object from an existing table in device memory.

Note that this constructor moves the existing table data into the internal table data; no copies are performed.

Parameters
dataThe existing table data to take over.
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.

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