15 #include "utils/WorkerThread.h"
19 namespace faiss {
namespace gpu {
48 void reset()
override;
70 void set_typename()
override;
74 int count()
const {
return indices_.size(); }
77 const faiss::Index* at(
int i)
const {
return indices_[i].first; }
83 std::unique_ptr<WorkerThread>>> indices_;
98 float kmeans_clustering_gpu (
int ngpu,
size_t d,
size_t n,
size_t k,
void removeIndex(faiss::Index *index)
void runOnIndex(std::function< void(faiss::Index *)> f)
void train(Index::idx_t n, const float *x) override
void reconstruct(idx_t, float *v) const override
reconstructs from the first index
long idx_t
all indices are this type
void addIndex(faiss::Index *index)
void add(Index::idx_t n, const float *x) override
void search(faiss::Index::idx_t n, const float *x, faiss::Index::idx_t k, float *distances, faiss::Index::idx_t *labels) const override