14 #include "GpuIndexIVF.h"
16 namespace faiss {
struct IndexIVFFlat; }
18 namespace faiss {
namespace gpu {
32 bool useFloat16CoarseQuantizer,
34 bool useFloat16IVFStorage,
37 IndicesOptions indicesOptions,
52 IndicesOptions indicesOptions,
72 void reset()
override;
90 void set_typename()
override;
94 bool useFloat16IVFStorage_;
97 size_t reserveMemoryVecs_;
void copyFrom(const faiss::IndexIVFFlat *index)
void train(Index::idx_t n, const float *x) override
void copyTo(faiss::IndexIVFFlat *index) const
void reserveMemory(size_t numVecs)
Reserve GPU memory in our inverted lists for this number of vectors.
long idx_t
all indices are this type
void add_with_ids(Index::idx_t n, const float *x, const Index::idx_t *xids) override
GpuIndexIVFFlat(GpuResources *resources, int device, bool useFloat16CoarseQuantizer, bool useFloat16IVFStorage, int dims, int nlist, IndicesOptions indicesOptions, faiss::MetricType metric)
void reset() override
removes all elements from the database.
void search(faiss::Index::idx_t n, const float *x, faiss::Index::idx_t k, float *distances, faiss::Index::idx_t *labels) const override
MetricType
Some algorithms support both an inner product vetsion and a L2 search version.