For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
GitHubCUDA-X
    • Home
    • Installation
  • Getting Started
    • Introduction
    • Integrations
    • Use-cases
  • User Guide
    • API Guide
    • Benchmarking Guide
    • Field Guide
    • References
  • Developer Guide
    • Coding Guidelines
    • Contributing
  • API Reference
    • C API Documentation
    • Cpp API Documentation
    • Python API Documentation
    • Java API Documentation
    • Rust API Documentation
      • cuVS Cluster
      • cuVS Cluster Kmeans
      • cuVS Cluster Kmeans Params
      • cuVS
      • cuVS Dlpack
      • cuVS Error
      • cuVS Resources
      • cuVS Distance
      • cuVS Distance Type
      • cuVS Brute Force
      • cuVS Cagra
      • cuVS Cagra Index
      • cuVS Cagra Index Params
      • cuVS Cagra Search Params
      • cuVS IVF Flat
      • cuVS IVF Flat Index
      • cuVS IVF Flat Index Params
      • cuVS IVF Flat Search Params
      • cuVS IVF PQ
      • cuVS IVF PQ Index
      • cuVS IVF PQ Index Params
      • cuVS IVF PQ Search Params
      • cuVS Vamana
      • cuVS Vamana Index
      • cuVS Vamana Index Params
    • Go API Documentation
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogocuVS
GitHubCUDA-X
On this page
  • Index
  • build
  • Arguments
  • new
  • search
  • Arguments
API ReferenceRust API Documentation

Ivf Pq Index Module

||View as Markdown|
Previous

cuVS IVF PQ

Next

cuVS IVF PQ Index Params

Rust module: cuvs::ivf_pq::index

Source: rust/cuvs/src/ivf_pq/index.rs

Index

1#[derive(Debug)]
2pub struct Index(ffi::cuvsIvfPqIndex_t); {
3 /* private fields */
4}

Ivf-Pq ANN Index

Methods

NameSource
buildrust/cuvs/src/ivf_pq/index.rs:25
newrust/cuvs/src/ivf_pq/index.rs:39
searchrust/cuvs/src/ivf_pq/index.rs:56

build

1pub fn build<T: Into<ManagedTensor>>(
2res: &Resources,
3params: &IndexParams,
4dataset: T,
5) -> Result<Index>

Builds a new Index from the dataset for efficient search.

Arguments

  • res - Resources to use
  • params - Parameters for building the index
  • dataset - A row-major matrix on either the host or device to index

Source: rust/cuvs/src/ivf_pq/index.rs:25

new

1pub fn new() -> Result<Index>

Creates a new empty index

Source: rust/cuvs/src/ivf_pq/index.rs:39

search

1pub fn search(
2&self,
3res: &Resources,
4params: &SearchParams,
5queries: &ManagedTensor,
6neighbors: &ManagedTensor,
7distances: &ManagedTensor,
8) -> Result<()>

Perform a Approximate Nearest Neighbors search on the Index

Arguments

  • res - Resources to use
  • params - Parameters to use in searching the index
  • queries - A matrix in device memory to query for
  • neighbors - Matrix in device memory that receives the indices of the nearest neighbors
  • distances - Matrix in device memory that receives the distances of the nearest neighbors

Source: rust/cuvs/src/ivf_pq/index.rs:56

Source: rust/cuvs/src/ivf_pq/index.rs:15