search.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/column/column.hpp>
20 #include <cudf/scalar/scalar.hpp>
21 #include <cudf/table/table.hpp>
22 #include <cudf/types.hpp>
23 
24 #include <rmm/mr/device/per_device_resource.hpp>
25 #include <rmm/resource_ref.hpp>
26 
27 #include <vector>
28 
29 namespace cudf {
71 std::unique_ptr<column> lower_bound(
72  table_view const& haystack,
73  table_view const& needles,
74  std::vector<order> const& column_order,
75  std::vector<null_order> const& null_precedence,
76  rmm::cuda_stream_view stream = cudf::get_default_stream(),
77  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
78 
113 std::unique_ptr<column> upper_bound(
114  table_view const& haystack,
115  table_view const& needles,
116  std::vector<order> const& column_order,
117  std::vector<null_order> const& null_precedence,
118  rmm::cuda_stream_view stream = cudf::get_default_stream(),
119  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
120 
139 bool contains(column_view const& haystack,
140  scalar const& needle,
141  rmm::cuda_stream_view stream = cudf::get_default_stream());
142 
164 std::unique_ptr<column> contains(
165  column_view const& haystack,
166  column_view const& needles,
167  rmm::cuda_stream_view stream = cudf::get_default_stream(),
168  rmm::device_async_resource_ref mr = rmm::mr::get_current_device_resource());
169  // end of group
171 } // namespace cudf
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
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
Class definition for cudf::column.
std::unique_ptr< column > upper_bound(table_view const &haystack, table_view const &needles, std::vector< order > const &column_order, std::vector< null_order > const &null_precedence, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Find largest indices in a sorted table where values should be inserted to maintain order.
bool contains(column_view const &haystack, scalar const &needle, rmm::cuda_stream_view stream=cudf::get_default_stream())
Check if the given needle value exists in the haystack column.
std::unique_ptr< column > lower_bound(table_view const &haystack, table_view const &needles, std::vector< order > const &column_order, std::vector< null_order > const &null_precedence, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Find smallest indices in a sorted table where values should be inserted to maintain order.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
cuDF interfaces
Definition: aggregation.hpp:34
Class definitions for cudf::scalar.
Class definition for cudf::table.
Type declarations for libcudf.