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,
76 virtual void set_typename();
93 bool useFloat16IVFStorage_;
96 size_t reserveMemoryVecs_;
void copyFrom(const faiss::IndexIVFFlat *index)
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
virtual void searchImpl_(faiss::Index::idx_t n, const float *x, faiss::Index::idx_t k, float *distances, faiss::Index::idx_t *labels) const
Called from GpuIndex for search.
virtual void reset()
removes all elements from the database.
virtual void train(Index::idx_t n, const float *x)
virtual void addImpl_(faiss::Index::idx_t n, const float *x, const faiss::Index::idx_t *ids)
Called from GpuIndex for add/add_with_ids.
GpuIndexIVFFlat(GpuResources *resources, int device, bool useFloat16CoarseQuantizer, bool useFloat16IVFStorage, int dims, int nlist, IndicesOptions indicesOptions, faiss::MetricType metric)
MetricType
Some algorithms support both an inner product vetsion and a L2 search version.