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
/*
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
//! IVF-Flat: an inverted-file index over uncompressed ("flat") vectors. It
//! partitions the dataset into `n_lists` clusters and, at query time, scans only
//! the `n_probes` closest clusters — a simple knob to trade recall for speed.
//!
//! Build an [`Index`] from a dataset, then [`search`](Index::search) it with
//! device-resident queries and output buffers. Tensors are borrowed through the
//! `AsDlTensor` / `AsDlTensorMut` traits; see the [`dlpack`](crate::dlpack)
//! module for the tensor model and `examples/cagra.rs` for the same build/search
//! workflow.
pub use crate;
pub use Index;
pub use ;
use crateDLPackError;
use crateLibraryError;
/// Error type for IVF-Flat operations.