Go to the documentation of this file.
22 #include <cudf/utilities/default_stream.hpp>
24 #include <rmm/cuda_stream_view.hpp>
26 #include <rmm/device_uvector.hpp>
30 #include <type_traits>
86 template <typename T, CUDF_ENABLE_IF(cudf::is_numeric<T>() or
cudf::
is_chrono<T>())>
91 other.
size() <=
static_cast<std::size_t
>(std::numeric_limits<size_type>::max()),
92 "The device_uvector size exceeds the column size limit",
97 _null_mask{std::move(null_mask)},
117 template <
typename B1,
typename B2 = rmm::device_buffer>
123 std::vector<std::unique_ptr<column>>&& children = {})
126 _data{std::forward<B1>(data)},
127 _null_mask{std::forward<B2>(null_mask)},
129 _children{std::move(children)}
219 [[nodiscard]]
bool nullable() const noexcept {
return (_null_mask.
size() > 0); }
252 return *_children[child_index];
261 std::unique_ptr<rmm::device_buffer>
data;
330 std::vector<std::unique_ptr<column>> _children{};
A container of nullable device data as a column of elements.
size_type null_count() const
Returns the count of null elements.
column(column_view view, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Construct a new column by deep copying the contents of a column_view.
std::unique_ptr< rmm::device_buffer > null_mask
null mask device memory buffer
int32_t size_type
Row index type for columns and tables.
size_type num_children() const noexcept
Returns the number of child columns.
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Type declarations for libcudf.
column(column const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Construct a new column object by deep copying the contents of other.
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
std::size_t size() const noexcept
size_type size() const noexcept
Returns the number of elements.
void set_null_mask(rmm::device_buffer const &new_null_mask, size_type new_null_count, rmm::cuda_stream_view stream=cudf::get_default_stream())
Sets the column's null value indicator bitmask to new_null_mask.
Wrapper for the contents of a column.
mutable_column_view mutable_view()
Creates a mutable, non-owning view of the column's data, null mask, and children.
column(data_type dtype, size_type size, B1 &&data, B2 &&null_mask, size_type null_count, std::vector< std::unique_ptr< column >> &&children={})
Construct a new column from existing device memory.
Indicator for the logical data type of an element in a column.
column & child(size_type child_index) noexcept
Returns a reference to the specified child.
void set_null_mask(rmm::device_buffer &&new_null_mask, size_type new_null_count)
Sets the column's null value indicator bitmask to new_null_mask.
bool has_nulls() const noexcept
Indicates whether the column contains null elements.
bool nullable() const noexcept
Indicates whether it is possible for the column to contain null values, i.e., it has an allocated nul...
column_view view() const
Creates an immutable, non-owning view of the column's data and children.
constexpr bool is_chrono()
Indicates whether the type T is a chrono type.
APIs for managing validity bitmasks.
std::unique_ptr< rmm::device_buffer > data
data device memory buffer
void set_null_count(size_type new_null_count)
Updates the count of null elements.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
contents release() noexcept
Releases ownership of the column's contents.
std::vector< std::unique_ptr< column > > children
child columns
column view class definitions
column const & child(size_type child_index) const noexcept
Returns a const reference to the specified child.
column(column &&other) noexcept
Move the contents from other to create a new column.
#define CUDF_EXPECTS(...)
Macro for checking (pre-)conditions that throws an exception when a condition is violated.
data_type type() const noexcept
Returns the column's logical element type.