[−][src]Struct faiss::index::IndexImpl
Native implementation of a Faiss Index running on the CPU.
Implementations
impl IndexImpl[src]
pub fn as_flat(self) -> Result<FlatIndexImpl>[src]
Non-idiomatic name, prefer into_flat instead
Attempt a dynamic cast of an index to the flat index type.
pub fn into_flat(self) -> Result<FlatIndexImpl>[src]
Attempt a dynamic cast of an index to the flat index type.
impl IndexImpl[src]
pub fn as_lsh(self) -> Result<LshIndex>[src]
Non-idiomatic name, prefer into_lsh instead
Attempt a dynamic cast of an index to the LSH index type.
pub fn into_lsh(self) -> Result<LshIndex>[src]
Attempt a dynamic cast of an index to the LSH index type.
impl IndexImpl[src]
pub fn to_gpu<'gpu, G: 'gpu>(
&self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResources, [src]
&self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResources,
Build a GPU index from the given CPU native index.
Errors
The operation fails if the index type does not provide GPU support.
pub fn into_gpu<'gpu, G: 'gpu>(
self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResources, [src]
self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResources,
Build a GPU index from the given CPU native index. The index residing in CPU memory is discarded in the process.
Errors
The operation fails if the index does not provide GPU support.
impl IndexImpl[src]
pub fn inner_ptr(&self) -> *mut FaissIndex[src]
impl IndexImpl[src]
pub fn try_clone(&self) -> Result<Self>[src]
Create an independent clone of this index.
Errors
May result in a native error if the clone operation is not supported for the internal type of index.
Trait Implementations
impl CpuIndex for IndexImpl[src]
impl Debug for IndexImpl[src]
impl Drop for IndexImpl[src]
impl FromInnerPtr for IndexImpl[src]
unsafe fn from_inner_ptr(inner_ptr: *mut FaissIndex) -> Self[src]
impl Index for IndexImpl[src]
fn is_trained(&self) -> bool[src]
fn ntotal(&self) -> u64[src]
fn d(&self) -> u32[src]
fn metric_type(&self) -> MetricType[src]
fn add(&mut self, x: &[f32]) -> Result<()>[src]
fn add_with_ids(&mut self, x: &[f32], xids: &[Idx]) -> Result<()>[src]
fn train(&mut self, x: &[f32]) -> Result<()>[src]
fn assign(&mut self, query: &[f32], k: usize) -> Result<AssignSearchResult>[src]
fn search(&mut self, query: &[f32], k: usize) -> Result<SearchResult>[src]
fn range_search(
&mut self,
query: &[f32],
radius: f32
) -> Result<RangeSearchResult>[src]
&mut self,
query: &[f32],
radius: f32
) -> Result<RangeSearchResult>
fn reset(&mut self) -> Result<()>[src]
fn remove_ids(&mut self, sel: &IdSelector) -> Result<usize>[src]
impl NativeIndex for IndexImpl[src]
fn inner_ptr(&self) -> *mut FaissIndex[src]
impl Send for IndexImpl[src]
impl Sync for IndexImpl[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,