Rust module: cuvs::cagra::index
Source: rust/cuvs/src/cagra/index.rs
CAGRA ANN Index
Methods
Builds a new Index from the dataset for efficient search.
res - Resources to useparams - Parameters for building the indexdataset - A row-major matrix on either the host or device to indexSource: rust/cuvs/src/cagra/index.rs:38
Creates a new empty index
Source: rust/cuvs/src/cagra/index.rs:52
Perform a Approximate Nearest Neighbors search on the Index
res - Resources to useparams - Parameters to use in searching the indexqueries - A matrix in device memory to query forneighbors - Matrix in device memory that receives the indices of the nearest neighborsdistances - Matrix in device memory that receives the distances of the nearest neighborsSource: rust/cuvs/src/cagra/index.rs:69
Perform a filtered Approximate Nearest Neighbors search on the Index
Like search, but accepts a bitset filter to exclude
vectors during graph traversal. Filtered vectors are never visited,
giving better recall than post-filtering.
res - Resources to useparams - Parameters to use in searching the indexqueries - A matrix in device memory to query forneighbors - Matrix in device memory that receives the indices of the nearest neighborsdistances - Matrix in device memory that receives the distances of the nearest neighborsbitset - A 1-D uint32 device tensor with ceil(n_rows / 32) elements.
Each bit corresponds to a dataset row: bit 1 = include, bit 0 = exclude.Source: rust/cuvs/src/cagra/index.rs:107
Save the CAGRA index to file.
Experimental, both the API and the serialization format are subject to change.
res - Resources to usefilename - The file path for saving the indexinclude_dataset - Whether to write out the dataset to the fileSource: rust/cuvs/src/cagra/index.rs:143
Save the CAGRA index to file in hnswlib format.
NOTE: The saved index can only be read by the hnswlib wrapper in cuVS, as the serialization format is not compatible with the original hnswlib.
Experimental, both the API and the serialization format are subject to change.
res - Resources to usefilename - The file path for saving the indexSource: rust/cuvs/src/cagra/index.rs:166
Load a CAGRA index from file.
Experimental, both the API and the serialization format are subject to change.
res - Resources to usefilename - The path of the file that stores the indexSource: rust/cuvs/src/cagra/index.rs:179
Source: rust/cuvs/src/cagra/index.rs:17