Public Member Functions | |
| GpuIndexIVF (GpuResources *resources, int dims, faiss::MetricType metric, int nlist, GpuIndexIVFConfig config=GpuIndexIVFConfig()) | |
| void | copyFrom (const faiss::IndexIVF *index) |
| Copy what we need from the CPU equivalent. | |
| void | copyTo (faiss::IndexIVF *index) const |
| Copy what we have to the CPU equivalent. | |
| int | getNumLists () const |
| Returns the number of inverted lists we're managing. | |
| GpuIndexFlat * | getQuantizer () |
| Return the quantizer we're using. | |
| void | setNumProbes (int nprobe) |
| Sets the number of list probes per query. | |
| int | getNumProbes () const |
| Returns our current number of list probes per query. | |
| void | add (Index::idx_t n, const float *x) override |
Public Member Functions inherited from faiss::gpu::GpuIndex | |
| GpuIndex (GpuResources *resources, int dims, faiss::MetricType metric, GpuIndexConfig config) | |
| int | getDevice () const |
| GpuResources * | getResources () |
| void | add_with_ids (Index::idx_t n, const float *x, const Index::idx_t *ids) 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 |
Public Member Functions inherited from faiss::Index | |
| Index (idx_t d=0, MetricType metric=METRIC_L2) | |
| virtual void | train (idx_t n, const float *x) |
| virtual void | range_search (idx_t n, const float *x, float radius, RangeSearchResult *result) const |
| void | assign (idx_t n, const float *x, idx_t *labels, idx_t k=1) |
| virtual void | reset ()=0 |
| removes all elements from the database. | |
| virtual long | remove_ids (const IDSelector &sel) |
| virtual void | reconstruct (idx_t key, float *recons) const |
| virtual void | reconstruct_n (idx_t i0, idx_t ni, float *recons) const |
| virtual void | search_and_reconstruct (idx_t n, const float *x, idx_t k, float *distances, idx_t *labels, float *recons) const |
| void | compute_residual (const float *x, float *residual, idx_t key) const |
| void | display () const |
Public Attributes | |
| ClusteringParameters | cp |
Public Attributes inherited from faiss::Index | |
| int | d |
| vector dimension | |
| idx_t | ntotal |
| total nb of indexed vectors | |
| bool | verbose |
| verbosity level | |
| bool | is_trained |
| set if the Index does not require training, or if training is done already | |
| MetricType | metric_type |
| type of metric this index uses for search | |
Protected Member Functions | |
| void | trainQuantizer_ (faiss::Index::idx_t n, const float *x) |
Protected Member Functions inherited from faiss::gpu::GpuIndex | |
| void | addInternal_ (Index::idx_t n, const float *x, const Index::idx_t *ids) |
| virtual void | addImpl_ (Index::idx_t n, const float *x, const Index::idx_t *ids)=0 |
| Overridden to actually perform the add. | |
| 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. | |
Protected Attributes | |
| GpuIndexIVFConfig | ivfConfig_ |
| int | nlist_ |
| Number of inverted lists that we manage. | |
| int | nprobe_ |
| Number of inverted list probes per query. | |
| GpuIndexFlat * | quantizer_ |
| Quantizer for inverted lists. | |
Protected Attributes inherited from faiss::gpu::GpuIndex | |
| GpuResources * | resources_ |
| Manages streans, cuBLAS handles and scratch memory for devices. | |
| const int | device_ |
| The GPU device we are resident on. | |
| const MemorySpace | memorySpace_ |
| The memory space of our primary storage on the GPU. | |
Additional Inherited Members | |
Public Types inherited from faiss::Index | |
| typedef long | idx_t |
| all indices are this type | |
Definition at line 36 of file GpuIndexIVF.h.
|
overridevirtual |
x can be resident on the CPU or any GPU; the proper copies are performed Forwards to add_with_ids; assigns IDs as needed FIXME: remove override for C++03 compatibility
Reimplemented from faiss::gpu::GpuIndex.
Definition at line 213 of file GpuIndexIVF.cu.
| ClusteringParameters faiss::gpu::GpuIndexIVF::cp |
Exposed as IndexIVF does to allow overriding clustering parameters
Definition at line 81 of file GpuIndexIVF.h.
1.8.5