Skip to content

Instantly share code, notes, and snippets.

@Enet4
Created April 11, 2018 23:29
Show Gist options
  • Save Enet4/335957999756a6163b711030e7a2841b to your computer and use it in GitHub Desktop.
Save Enet4/335957999756a6163b711030e7a2841b to your computer and use it in GitHub Desktop.
ConcurrentIndex in faiss-rs
/// Trait for a Faiss index that can be safely searched over multiple threads.
pub trait ConcurrentIndex: Index {
fn assign(&self, q: &[f32], k: usize) -> Result<AssignSearchResult>;
fn search(&self, q: &[f32], k: usize) -> Result<SearchResult>;
fn range_search(&self, q: &[f32], radius: f32) -> Result<RangeSearchResult>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment