1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Bridge definitions for libcudf search operations.
//!
//! Provides GPU-accelerated binary search and containment checks.
#[cxx::bridge(namespace = "cudf_shims")]
pub mod ffi {
unsafe extern "C++" {
include!("search_shim.h");
include!("table_shim.h");
include!("column_shim.h");
type OwnedTable = crate::table::ffi::OwnedTable;
type OwnedColumn = crate::column::ffi::OwnedColumn;
/// Find the lower bound indices for each row in `values` within a sorted `table`.
fn lower_bound(
table: &OwnedTable,
values: &OwnedTable,
orders: &[i32],
null_orders: &[i32],
) -> Result<UniquePtr<OwnedColumn>>;
/// Find the upper bound indices for each row in `values` within a sorted `table`.
fn upper_bound(
table: &OwnedTable,
values: &OwnedTable,
orders: &[i32],
null_orders: &[i32],
) -> Result<UniquePtr<OwnedColumn>>;
/// For each element in `needles`, check if it exists in `haystack`.
fn contains_column(
haystack: &OwnedColumn,
needles: &OwnedColumn,
) -> Result<UniquePtr<OwnedColumn>>;
type OwnedScalar = crate::scalar::ffi::OwnedScalar;
/// Check if a scalar value exists in a column.
fn contains_scalar(haystack: &OwnedColumn, needle: &OwnedScalar) -> Result<bool>;
}
}