filling.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2021, 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 
17 #pragma once
18 
19 #include <cudf/types.hpp>
20 
21 #include <memory>
22 
23 namespace cudf {
57  size_type begin,
58  size_type end,
59  scalar const& value);
60 
83 std::unique_ptr<column> fill(
84  column_view const& input,
85  size_type begin,
86  size_type end,
87  scalar const& value,
88  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
89 
120 std::unique_ptr<table> repeat(
121  table_view const& input_table,
122  column_view const& count,
123  bool check_count = false,
124  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
125 
146 std::unique_ptr<table> repeat(
147  table_view const& input_table,
148  size_type count,
149  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
150 
174 std::unique_ptr<column> sequence(
175  size_type size,
176  scalar const& init,
177  scalar const& step,
178  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
179 
200 std::unique_ptr<column> sequence(
201  size_type size,
202  scalar const& init,
203  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
204 
228 std::unique_ptr<cudf::column> calendrical_month_sequence(
229  size_type size,
230  scalar const& init,
231  size_type months,
232  rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());
233  // end of group
235 } // namespace cudf
cudf::calendrical_month_sequence
std::unique_ptr< cudf::column > calendrical_month_sequence(size_type size, scalar const &init, size_type months, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Generate a sequence of timestamps beginning at init and incrementing by months for each successive el...
cudf::repeat
std::unique_ptr< table > repeat(table_view const &input_table, column_view const &count, bool check_count=false, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Repeat rows of a Table.
cudf::size_type
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:84
cudf::column_view
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Definition: column_view.hpp:300
types.hpp
Type declarations for libcudf.
cudf::fill_in_place
void fill_in_place(mutable_column_view &destination, size_type begin, size_type end, scalar const &value)
Fills a range of elements in-place in a column with a scalar value.
cudf::mutable_column_view
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
Definition: column_view.hpp:448
cudf::scalar
An owning class to represent a singular value.
Definition: scalar.hpp:46
cudf::table_view
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:154
cudf
cuDF interfaces
Definition: aggregation.hpp:34
cudf::fill
std::unique_ptr< column > fill(column_view const &input, size_type begin, size_type end, scalar const &value, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Fills a range of elements in a column out-of-place with a scalar value.
cudf::sequence
std::unique_ptr< column > sequence(size_type size, scalar const &init, scalar const &step, rmm::mr::device_memory_resource *mr=rmm::mr::get_current_device_resource())
Fills a column with a sequence of value specified by an initial value and a step.
rmm::mr::device_memory_resource