Struct faiss::index::gpu::GpuIndexImpl [−][src]
pub struct GpuIndexImpl<'gpu, I> { /* fields omitted */ }
Expand description
Native GPU implementation of a Faiss index. GPU indexes in Faiss are first
built on the CPU, and subsequently transferred to one or more GPU’s via the
into_gpu
or to_gpu
methods. Calling into_cpu
(or to_cpu
)
enables the user to bring the index back to CPU memory.
When using to_gpu
or to_cpu
, the indexes will contain the same
indexed vectors, but are independent at the point of creation. The use of
into_gpu
or into_cpu
isn’t necessarily faster, but will automatically
free the originating index.
The 'gpu
lifetime ensures that the GPU resources are in scope for as
long as the index lives.
Implementations
Trait Implementations
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.
Auto Trait Implementations
impl<'gpu, I> RefUnwindSafe for GpuIndexImpl<'gpu, I> where
I: RefUnwindSafe,
impl<'gpu, I> !Sync for GpuIndexImpl<'gpu, I>
impl<'gpu, I> Unpin for GpuIndexImpl<'gpu, I> where
I: Unpin,
impl<'gpu, I> UnwindSafe for GpuIndexImpl<'gpu, I> where
I: UnwindSafe,