filling.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2024, 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>
21 
22 #include <rmm/mr/device/per_device_resource.hpp>
23 #include <rmm/resource_ref.hpp>
24 
25 #include <memory>
26 
27 namespace cudf {
62  size_type begin,
63  size_type end,
64  scalar const& value,
65  rmm::cuda_stream_view stream = cudf::get_default_stream());
66 
90 std::unique_ptr<column> fill(
91  column_view const& input,
92  size_type begin,
93  size_type end,
94  scalar const& value,
95  rmm::cuda_stream_view stream = cudf::get_default_stream(),
96  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
97 
126 std::unique_ptr<table> repeat(
127  table_view const& input_table,
128  column_view const& count,
129  rmm::cuda_stream_view stream = cudf::get_default_stream(),
130  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
131 
151 std::unique_ptr<table> repeat(
152  table_view const& input_table,
153  size_type count,
154  rmm::cuda_stream_view stream = cudf::get_default_stream(),
155  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
156 
181 std::unique_ptr<column> sequence(
182  size_type size,
183  scalar const& init,
184  scalar const& step,
185  rmm::cuda_stream_view stream = cudf::get_default_stream(),
186  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
187 
209 std::unique_ptr<column> sequence(
210  size_type size,
211  scalar const& init,
212  rmm::cuda_stream_view stream = cudf::get_default_stream(),
213  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
214 
239 std::unique_ptr<cudf::column> calendrical_month_sequence(
240  size_type size,
241  scalar const& init,
242  size_type months,
243  rmm::cuda_stream_view stream = cudf::get_default_stream(),
244  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
245  // end of group
247 } // namespace cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
A non-owning, mutable view of device data as a column of elements, some of which may be null as indic...
An owning class to represent a singular value.
Definition: scalar.hpp:49
A set of cudf::column_view's of the same size.
Definition: table_view.hpp:187
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
void fill_in_place(mutable_column_view &destination, size_type begin, size_type end, scalar const &value, rmm::cuda_stream_view stream=cudf::get_default_stream())
Fills a range of elements in-place in a column with a scalar value.
std::unique_ptr< column > sequence(size_type size, scalar const &init, scalar const &step, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Fills a column with a sequence of value specified by an initial value and a step.
std::unique_ptr< table > repeat(table_view const &input_table, column_view const &count, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Repeat rows of a Table.
std::unique_ptr< cudf::column > calendrical_month_sequence(size_type size, scalar const &init, size_type months, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Generate a sequence of timestamps beginning at init and incrementing by months for each successive el...
std::unique_ptr< column > fill(column_view const &input, size_type begin, size_type end, scalar const &value, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Fills a range of elements in a column out-of-place with a scalar value.
int32_t size_type
Row index type for columns and tables.
Definition: types.hpp:93
cuDF interfaces
Definition: aggregation.hpp:34
Type declarations for libcudf.