[][src]Struct faiss::index::IndexImpl

pub struct IndexImpl { /* fields omitted */ }

Native implementation of a Faiss Index running on the CPU.

Implementations

impl IndexImpl[src]

pub fn as_flat(self) -> Result<FlatIndexImpl>[src]

👎 Deprecated since 0.8.0:

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]

👎 Deprecated since 0.8.0:

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]

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]

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]

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]

impl Index for IndexImpl[src]

impl NativeIndex for IndexImpl[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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.