structs_column_view.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022-2023, NVIDIA CORPORATION.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #pragma once
17 
18 #include <cudf/column/column.hpp>
21 
22 #include <rmm/cuda_stream_view.hpp>
23 
29 namespace cudf {
30 
41  public:
42  // Foundation members:
45  ~structs_column_view() = default;
58 
64  explicit structs_column_view(column_view const& col);
65 
71  [[nodiscard]] column_view parent() const;
72 
79  using column_view::offset;
80  using column_view::size;
81 
98  int index, rmm::cuda_stream_view stream = cudf::get_default_stream()) const;
99 }; // class structs_column_view; // end of group
101 } // namespace cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
size_type num_children() const noexcept
Returns the number of child columns.
auto child_begin() const noexcept
Returns iterator to the beginning of the ordered sequence of child column-views.
auto child_end() const noexcept
Returns iterator to the end of the ordered sequence of child column-views.
size_type null_count() const
Returns the count of null elements.
size_type size() const noexcept
Returns the number of elements in the column.
size_type offset() const noexcept
Returns the index of the first element relative to the base memory allocation, i.e....
bool has_nulls() const
Indicates if the column contains null elements, i.e., null_count() > 0
bitmask_type const * null_mask() const noexcept
Returns raw pointer to the underlying bitmask allocation.
Given a column view of struct type, an instance of this class provides a wrapper on this compound col...
column_view get_sliced_child(int index, rmm::cuda_stream_view stream=cudf::get_default_stream()) const
Returns the internal child column, applying any offset from the root.
column_view parent() const
Returns the parent column.
structs_column_view & operator=(structs_column_view const &)=default
Copy assignment operator.
structs_column_view(column_view const &col)
Construct a new structs column view object from a column view.
structs_column_view(structs_column_view &&)=default
Move constructor.
structs_column_view(structs_column_view const &)=default
Copy constructor.
structs_column_view & operator=(structs_column_view &&)=default
Move assignment operator.
Class definition for cudf::column.
column view class definitions
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
cuDF interfaces
Definition: aggregation.hpp:34