Struct faiss::index::IndexImpl [−][src]
pub struct IndexImpl { /* fields omitted */ }
Expand description
Native implementation of a Faiss Index running on the CPU.
Implementations
👎 Deprecated since 0.8.0: Non-idiomatic name, prefer into_flat
instead
Non-idiomatic name, prefer into_flat
instead
Attempt a dynamic cast of an index to the flat index type.
Attempt a dynamic cast of an index to the flat index type.
Attempt a dynamic cast of an index to the IVF flat index type.
Attempt a dynamic cast of an index to the Scalar Quantizer index type.
Attempt a dynamic cast of an index to the IVF Scalar Quantizer index type.
pub fn to_gpu<'gpu, G: 'gpu>(
&self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
pub fn to_gpu<'gpu, G: 'gpu>(
&self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
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: GpuResourcesProvider,
pub fn into_gpu<'gpu, G: 'gpu>(
self,
gpu_res: &'gpu G,
device: i32
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
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.
pub fn to_gpu_multiple<'gpu, G: 'gpu>(
&self,
gpu_res: &'gpu [G],
devices: &[i32]
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
pub fn to_gpu_multiple<'gpu, G: 'gpu>(
&self,
gpu_res: &'gpu [G],
devices: &[i32]
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
Build a GPU index from the given CPU native index.
Errors
The operation fails if the number of GPU resources and number of devices do not match, or the index does not provide GPU support.
pub fn into_gpu_multiple<'gpu, G: 'gpu>(
self,
gpu_res: &'gpu [G],
devices: &[i32]
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
pub fn into_gpu_multiple<'gpu, G: 'gpu>(
self,
gpu_res: &'gpu [G],
devices: &[i32]
) -> Result<GpuIndexImpl<'gpu, IndexImpl>> where
G: GpuResourcesProvider,
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 number of GPU resources and number of devices do not match, or the index does not provide GPU support.
Trait Implementations
Create an index using the given pointer to a native object. Read more
Whether the Index does not require training, or if training is done already
The metric type assumed by the index
Add new data vectors to the index.
This assumes a C-contiguous memory slice of vectors, where the total
number of vectors is x.len() / d
. Read more
Add new data vectors to the index with IDs.
This assumes a C-contiguous memory slice of vectors, where the total
number of vectors is x.len() / d
.
Not all index types may support this operation. Read more
Similar to search
, but only provides the labels.
Perform a search for the k
closest vectors to the given query vectors.
Perform a ranged search for the vectors closest to the given query vectors by the given radius. Read more
Remove data vectors represented by IDs.
Set Index verbosity level
Retrieve a pointer to the native index object.