13 #include "IVFBase.cuh"
15 namespace faiss {
namespace gpu {
25 IndicesOptions indicesOptions,
57 size_t getVectorMemorySize()
const;
61 const bool l2Distance_;
64 const bool useFloat16_;
Holder of GPU resources for a particular flat index.
Base inverted list functionality for IVFFlat and IVFPQ.
IVFFlat(GpuResources *resources, FlatIndex *quantizer, bool l2Distance, bool useFloat16, IndicesOptions indicesOptions, MemorySpace space)
Construct from a quantizer that has elemen.
int classifyAndAddVectors(Tensor< float, 2, true > &vecs, Tensor< long, 1, true > &indices)
void addCodeVectorsFromCpu(int listId, const float *vecs, const long *indices, size_t numVecs)
void query(Tensor< float, 2, true > &queries, int nprobe, int k, Tensor< float, 2, true > &outDistances, Tensor< long, 2, true > &outIndices)
std::vector< float > getListVectors(int listId) const
Return the vectors of a particular list back to the CPU.