16 namespace faiss {
namespace gpu {
27 inline int getDevice()
const {
virtual void searchImpl_(faiss::Index::idx_t n, const float *x, faiss::Index::idx_t k, float *distances, faiss::Index::idx_t *labels) const =0
Overridden to actually perform the search.
void addInternal_(Index::idx_t n, const float *x, const Index::idx_t *ids)
int device_
The GPU device we are resident on.
GpuResources * resources_
Manages streans, cuBLAS handles and scratch memory for devices.
long idx_t
all indices are this type
virtual void addImpl_(Index::idx_t n, const float *x, const Index::idx_t *ids)=0
Overridden to actually perform the add.
virtual void add(faiss::Index::idx_t, const float *x)
virtual void add_with_ids(Index::idx_t n, const float *x, const Index::idx_t *ids)
virtual void search(faiss::Index::idx_t n, const float *x, faiss::Index::idx_t k, float *distances, faiss::Index::idx_t *labels) const
MetricType
Some algorithms support both an inner product vetsion and a L2 search version.