30 #include <type_traits>
39 namespace CUDF_EXPORT
cudf {
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)}
131 CUDF_EXPECTS(size >= 0,
"Column size cannot be negative.");
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 non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
A container of nullable device data as a column of elements.
column(column_view view, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Construct a new column by deep copying the contents of a column_view.
data_type type() const noexcept
Returns the column's logical element type.
bool has_nulls() const noexcept
Indicates whether the column contains null elements.
size_type null_count() const
Returns the count of null elements.
size_type num_children() const noexcept
Returns the number of child columns.
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.
mutable_column_view mutable_view()
Creates a mutable, non-owning view of the column's data, null mask, and children.
column(column &&other) noexcept
Move the contents from other to create a new column.
column const & child(size_type child_index) const noexcept
Returns a const reference to the specified child.
column & child(size_type child_index) noexcept
Returns a reference to the specified child.
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.
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.
column(column const &other, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Construct a new column object by deep copying the contents of other.
bool nullable() const noexcept
Indicates whether it is possible for the column to contain null values, i.e., it has an allocated nul...
contents release() noexcept
Releases ownership of the column's contents.
size_type size() const noexcept
Returns the number of elements.
void set_null_count(size_type new_null_count)
Updates the count of null elements.
Indicator for the logical data type of an element in a column.
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
column view class definitions
cudf::size_type null_count(bitmask_type const *bitmask, size_type start, size_type stop, rmm::cuda_stream_view stream=cudf::get_default_stream())
Given a validity bitmask, counts the number of null elements (unset bits) in the range [start,...
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
cuda::mr::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
device_memory_resource * get_current_device_resource()
#define CUDF_EXPECTS(...)
Macro for checking (pre-)conditions that throws an exception when a condition is violated.
int32_t size_type
Row index type for columns and tables.
constexpr bool is_chrono()
Indicates whether the type T is a chrono type.
APIs for managing validity bitmasks.
Wrapper for the contents of a column.
std::unique_ptr< rmm::device_buffer > data
data device memory buffer
std::unique_ptr< rmm::device_buffer > null_mask
null mask device memory buffer
std::vector< std::unique_ptr< column > > children
child columns
Type declarations for libcudf.