Commit 7abe81b4 authored by matthijs's avatar matthijs

Better support for low-mem GPUs

avoid reading beyond the end of an array in fvec_L2sqr and related functions
parent 1067735f
......@@ -267,8 +267,13 @@ void IndexIVFFlat::add_core (idx_t n, const float * x, const long *xids,
ntotal += n_add;
}
void IndexIVFFlatStats::reset()
{
memset ((void*)this, 0, sizeof (*this));
}
IndexIVFFlatStats indexIVFFlat_stats;
void IndexIVFFlat::search_knn_inner_product (
size_t nx,
......@@ -278,8 +283,9 @@ void IndexIVFFlat::search_knn_inner_product (
{
const size_t k = res->k;
size_t nlistv = 0, ndis = 0;
#pragma omp parallel for
#pragma omp parallel for reduction(+: nlistv, ndis)
for (size_t i = 0; i < nx; i++) {
const float * xi = x + i * d;
const long * keysi = keys + i * nprobe;
......@@ -298,7 +304,7 @@ void IndexIVFFlat::search_knn_inner_product (
key, ik, nlist);
throw;
}
nlistv++;
const size_t list_size = ids[key].size();
const float * list_vecs = vecs[key].data();
......@@ -310,9 +316,13 @@ void IndexIVFFlat::search_knn_inner_product (
minheap_push (k, simi, idxi, ip, ids[key][j]);
}
}
ndis += list_size;
}
minheap_reorder (k, simi, idxi);
}
indexIVFFlat_stats.nq += nx;
indexIVFFlat_stats.nlist += nlistv;
indexIVFFlat_stats.ndis += ndis;
}
......@@ -323,8 +333,9 @@ void IndexIVFFlat::search_knn_L2sqr (
float_maxheap_array_t * res) const
{
const size_t k = res->k;
size_t nlistv = 0, ndis = 0;
#pragma omp parallel for
#pragma omp parallel for reduction(+: nlistv, ndis)
for (size_t i = 0; i < nx; i++) {
const float * xi = x + i * d;
const long * keysi = keys + i * nprobe;
......@@ -343,7 +354,7 @@ void IndexIVFFlat::search_knn_L2sqr (
key, ik, nlist);
throw;
}
nlistv++;
const size_t list_size = ids[key].size();
const float * list_vecs = vecs[key].data();
......@@ -355,9 +366,13 @@ void IndexIVFFlat::search_knn_L2sqr (
maxheap_push (k, disi, idxi, disij, ids[key][j]);
}
}
ndis += list_size;
}
maxheap_reorder (k, disi, idxi);
}
indexIVFFlat_stats.nq += nx;
indexIVFFlat_stats.nlist += nlistv;
indexIVFFlat_stats.ndis += ndis;
}
......@@ -514,4 +529,141 @@ void IndexIVFFlat::reconstruct (idx_t key, float * recons) const
}
/*****************************************
* IndexIVFFlatIPBounds implementation
******************************************/
IndexIVFFlatIPBounds::IndexIVFFlatIPBounds (
Index * quantizer, size_t d, size_t nlist,
size_t fsize):
IndexIVFFlat(quantizer, d, nlist, METRIC_INNER_PRODUCT), fsize(fsize)
{
part_norms.resize(nlist);
}
void IndexIVFFlatIPBounds::add_core (idx_t n, const float * x, const long *xids,
const long *precomputed_idx) {
FAISS_ASSERT (is_trained);
const long * idx;
if (precomputed_idx) {
idx = precomputed_idx;
} else {
long * idx0 = new long [n];
quantizer->assign (n, x, idx0);
idx = idx0;
}
IndexIVFFlat::add_core(n, x, xids, idx);
// compute
const float * xi = x + fsize;
for (size_t i = 0; i < n; i++) {
float norm = std::sqrt (fvec_norm_L2sqr (xi, d - fsize));
part_norms[idx[i]].push_back(norm);
xi += d;
}
if (idx != precomputed_idx) {
delete [] idx;
}
}
namespace {
void search_bounds_knn_inner_product (
const IndexIVFFlatIPBounds & ivf,
const float *x,
const long *keys,
float_minheap_array_t *res,
const float *qnorms)
{
size_t k = res->k, nx = res->nh, nprobe = ivf.nprobe;
size_t d = ivf.d;
int fsize = ivf.fsize;
size_t nlistv = 0, ndis = 0, npartial = 0;
#pragma omp parallel for reduction(+: nlistv, ndis, npartial)
for (size_t i = 0; i < nx; i++) {
const float * xi = x + i * d;
const long * keysi = keys + i * nprobe;
float qnorm = qnorms[i];
float * __restrict simi = res->get_val (i);
long * __restrict idxi = res->get_ids (i);
minheap_heapify (k, simi, idxi);
for (size_t ik = 0; ik < nprobe; ik++) {
long key = keysi[ik]; /* select the list */
if (key < 0) {
// not enough centroids for multiprobe
continue;
}
assert (key < (long) ivf.nlist);
nlistv++;
const size_t list_size = ivf.ids[key].size();
const float * yj = ivf.vecs[key].data();
const float * bnorms = ivf.part_norms[key].data();
for (size_t j = 0; j < list_size; j++) {
float ip_part = fvec_inner_product (xi, yj, fsize);
float bound = ip_part + bnorms[j] * qnorm;
if (bound > simi[0]) {
float ip = ip_part + fvec_inner_product (
xi + fsize, yj + fsize, d - fsize);
if (ip > simi[0]) {
minheap_pop (k, simi, idxi);
minheap_push (k, simi, idxi, ip, ivf.ids[key][j]);
}
ndis ++;
}
yj += d;
}
npartial += list_size;
}
minheap_reorder (k, simi, idxi);
}
indexIVFFlat_stats.nq += nx;
indexIVFFlat_stats.nlist += nlistv;
indexIVFFlat_stats.ndis += ndis;
indexIVFFlat_stats.npartial += npartial;
}
}
void IndexIVFFlatIPBounds::search (
idx_t n, const float *x, idx_t k,
float *distances, idx_t *labels) const
{
// compute query remainder norms and distances
idx_t * idx = new idx_t [n * nprobe];
quantizer->assign (n, x, idx, nprobe);
float * qnorms = new float [n];
#pragma omp parallel for
for (size_t i = 0; i < n; i++) {
qnorms[i] = std::sqrt (fvec_norm_L2sqr (
x + i * d + fsize, d - fsize));
}
float_minheap_array_t res = {
size_t(n), size_t(k), labels, distances};
search_bounds_knn_inner_product (*this, x, idx, &res, qnorms);
delete [] qnorms;
delete [] idx;
}
} // namespace faiss
......@@ -104,6 +104,21 @@ struct IndexIVF: Index {
};
struct IndexIVFFlatStats {
size_t nq; // nb of queries run
size_t nlist; // nb of inverted lists scanned
size_t ndis; // nb of distancs computed
size_t npartial; // nb of bound computations (IndexIVFFlatIPBounds)
IndexIVFFlatStats () {reset (); }
void reset ();
};
// global var that collects them all
extern IndexIVFFlatStats indexIVFFlat_stats;
/** Inverted file with stored vectors. Here the inverted file
......@@ -124,7 +139,7 @@ struct IndexIVFFlat: IndexIVF {
/// same as add_with_ids, with precomputed coarse quantizer
void add_core (idx_t n, const float * x, const long *xids,
virtual void add_core (idx_t n, const float * x, const long *xids,
const long *precomputed_idx);
......@@ -173,8 +188,28 @@ struct IndexIVFFlat: IndexIVF {
IndexIVFFlat () {}
};
struct IndexIVFFlatIPBounds: IndexIVFFlat {
/// nb of dimensions of pre-filter
size_t fsize;
/// norm of remainder (dimensions fsize:d)
std::vector<std::vector<float> > part_norms;
IndexIVFFlatIPBounds (
Index * quantizer, size_t d, size_t nlist,
size_t fsize);
virtual void add_core (idx_t n, const float * x, const long *xids,
const long *precomputed_idx) override;
virtual void search (
idx_t n, const float *x, idx_t k,
float *distances, idx_t *labels) const override;
};
......
......@@ -13,6 +13,7 @@
#include "IndexIVFPQ.h"
#include <cmath>
#include <cstdio>
#include <cassert>
......@@ -154,9 +155,13 @@ void IndexIVFPQ::encode (long key, const float * x, uint8_t * code) const
void IndexIVFPQ::encode_multiple (size_t n, const long *keys,
const float * x, uint8_t * xcodes) const
void IndexIVFPQ::encode_multiple (size_t n, long *keys,
const float * x, uint8_t * xcodes,
bool compute_keys) const
{
if (compute_keys)
quantizer->assign (n, x, keys);
if (by_residual) {
float *residuals = new float [n * d];
// TODO: parallelize?
......@@ -169,6 +174,21 @@ void IndexIVFPQ::encode_multiple (size_t n, const long *keys,
}
}
void IndexIVFPQ::decode_multiple (size_t n, const long *keys,
const uint8_t * xcodes, float * x) const
{
pq.decode (xcodes, x, n);
if (by_residual) {
std::vector<float> centroid (d);
for (size_t i = 0; i < n; i++) {
quantizer->reconstruct (keys[i], centroid.data());
float *xi = x + i * d;
for (size_t j = 0; j < d; j++) {
xi [j] += centroid [j];
}
}
}
}
void IndexIVFPQ::add_with_ids (idx_t n, const float * x, const long *xids)
......@@ -397,7 +417,7 @@ void IndexIVFPQ::precompute_table ()
// squared norms of the PQ centroids
std::vector<float> r_norms (pq.M * pq.ksub, 0.0/0.0);
std::vector<float> r_norms (pq.M * pq.ksub, NAN);
for (int m = 0; m < pq.M; m++)
for (int j = 0; j < pq.ksub; j++)
r_norms [m * pq.ksub + j] =
......@@ -425,7 +445,7 @@ void IndexIVFPQ::precompute_table ()
precomputed_table.resize(cpq.ksub * pq.M * pq.ksub);
// reorder PQ centroid table
std::vector<float> centroids (d * cpq.ksub, 0.0/0.0);
std::vector<float> centroids (d * cpq.ksub, NAN);
for (int m = 0; m < cpq.M; m++) {
for (size_t i = 0; i < cpq.ksub; i++) {
......
......@@ -107,9 +107,22 @@ struct IndexIVFPQ: IndexIVF {
// map a vector to a binary code knowning the index
void encode (long key, const float * x, uint8_t * code) const;
/// same as encode, for multiple points at once
void encode_multiple (size_t n, const long *keys,
const float * x, uint8_t * codes) const;
/** Encode multiple vectors
*
* @param n nb vectors to encode
* @param keys posting list ids for those vectors (size n)
* @param x vectors (size n * d)
* @param codes output codes (size n * code_size)
* @param compute_keys if false, assume keys are precomputed,
* otherwise compute them
*/
void encode_multiple (size_t n, long *keys,
const float * x, uint8_t * codes,
bool compute_keys = false) const;
/// inverse of encode_multiple
void decode_multiple (size_t n, const long *keys,
const uint8_t * xcodes, float * x) const;
/** search a set of vectors, that are pre-quantized by the IVF
* quantizer. Fill in the corresponding heaps with the query
......
......@@ -171,7 +171,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;}</div>
<div class="ttc" id="structfaiss_1_1IndexFlatL2_html"><div class="ttname"><a href="structfaiss_1_1IndexFlatL2.html">faiss::IndexFlatL2</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00081">IndexFlat.h:81</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
......
......@@ -865,7 +865,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="structfaiss_1_1OperatingPoint_html_aa13782d6d26168531764cb64da941ced"><div class="ttname"><a href="structfaiss_1_1OperatingPoint.html#aa13782d6d26168531764cb64da941ced">faiss::OperatingPoint::key</a></div><div class="ttdeci">std::string key</div><div class="ttdoc">key that identifies this op pt </div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8h_source.html#l00090">AutoTune.h:90</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexFlat.html">faiss::IndexFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00024">IndexFlat.h:24</a></div></div>
<div class="ttc" id="structfaiss_1_1OperatingPoint_html_a2c023f1484e4748e3e97681bb1f4b78e"><div class="ttname"><a href="structfaiss_1_1OperatingPoint.html#a2c023f1484e4748e3e97681bb1f4b78e">faiss::OperatingPoint::cno</a></div><div class="ttdeci">long cno</div><div class="ttdoc">integer identifer </div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8h_source.html#l00091">AutoTune.h:91</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFPQR_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFPQR.html">faiss::IndexIVFPQR</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVFPQ_8h_source.html#l00189">IndexIVFPQ.h:189</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFPQR_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFPQR.html">faiss::IndexIVFPQR</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVFPQ_8h_source.html#l00202">IndexIVFPQ.h:202</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexPQ_html_af616e1f3c7bff7f62c2607b8079da43f"><div class="ttname"><a href="structfaiss_1_1IndexPQ.html#af616e1f3c7bff7f62c2607b8079da43f">faiss::IndexPQ::do_polysemous_training</a></div><div class="ttdeci">bool do_polysemous_training</div><div class="ttdoc">false = standard PQ </div><div class="ttdef"><b>Definition:</b> <a href="IndexPQ_8h_source.html#l00071">IndexPQ.h:71</a></div></div>
<div class="ttc" id="structfaiss_1_1OperatingPoints_html_a1702eeb680ce73ca8c1fd071955f0679"><div class="ttname"><a href="structfaiss_1_1OperatingPoints.html#a1702eeb680ce73ca8c1fd071955f0679">faiss::OperatingPoints::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8cpp_source.html#l00101">AutoTune.cpp:101</a></div></div>
<div class="ttc" id="structfaiss_1_1OperatingPoint_html"><div class="ttname"><a href="structfaiss_1_1OperatingPoint.html">faiss::OperatingPoint</a></div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8h_source.html#l00087">AutoTune.h:87</a></div></div>
......@@ -887,7 +887,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="structfaiss_1_1IndexPreTransform_html"><div class="ttname"><a href="structfaiss_1_1IndexPreTransform.html">faiss::IndexPreTransform</a></div><div class="ttdef"><b>Definition:</b> <a href="VectorTransform_8h_source.html#l00237">VectorTransform.h:237</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIDMap_html"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html">faiss::IndexIDMap</a></div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00026">MetaIndexes.h:26</a></div></div>
<div class="ttc" id="structfaiss_1_1AutoTuneCriterion_html_adcfaafb3f1b3449e2cfd553f0f603a5b"><div class="ttname"><a href="structfaiss_1_1AutoTuneCriterion.html#adcfaafb3f1b3449e2cfd553f0f603a5b">faiss::AutoTuneCriterion::nq</a></div><div class="ttdeci">idx_t nq</div><div class="ttdoc">nb of queries this criterion is evaluated on </div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8h_source.html#l00029">AutoTune.h:29</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
<div class="ttc" id="structfaiss_1_1OperatingPoints_html_a2829e78e01cc42c3a341622947663b31"><div class="ttname"><a href="structfaiss_1_1OperatingPoints.html#a2829e78e01cc42c3a341622947663b31">faiss::OperatingPoints::optimal_pts</a></div><div class="ttdeci">std::vector&lt; OperatingPoint &gt; optimal_pts</div><div class="ttdoc">optimal operating points, sorted by perf </div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8h_source.html#l00099">AutoTune.h:99</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlatIP_html"><div class="ttname"><a href="structfaiss_1_1IndexFlatIP.html">faiss::IndexFlatIP</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00075">IndexFlat.h:75</a></div></div>
<div class="ttc" id="structfaiss_1_1AutoTuneCriterion_html_a174f0de8e6fd01905f5fa2170f5039d8"><div class="ttname"><a href="structfaiss_1_1AutoTuneCriterion.html#a174f0de8e6fd01905f5fa2170f5039d8">faiss::AutoTuneCriterion::set_groundtruth</a></div><div class="ttdeci">void set_groundtruth(int gt_nnn, const float *gt_D_in, const idx_t *gt_I_in)</div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8cpp_source.html#l00037">AutoTune.cpp:37</a></div></div>
......
......@@ -238,7 +238,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="classfaiss_1_1gpu_1_1CpuTimer_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1CpuTimer.html">faiss::gpu::CpuTimer</a></div><div class="ttdoc">CPU wallclock elapsed timer. </div><div class="ttdef"><b>Definition:</b> <a href="Timer_8h_source.html#l00043">Timer.h:43</a></div></div>
<div class="ttc" id="structfaiss_1_1gpu_1_1GpuIndexFlatConfig_html"><div class="ttname"><a href="structfaiss_1_1gpu_1_1GpuIndexFlatConfig.html">faiss::gpu::GpuIndexFlatConfig</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuIndexFlat_8h_source.html#l00028">GpuIndexFlat.h:28</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1StandardGpuResources_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1StandardGpuResources.html">faiss::gpu::StandardGpuResources</a></div><div class="ttdef"><b>Definition:</b> <a href="StandardGpuResources_8h_source.html#l00024">StandardGpuResources.h:24</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1GpuIndexFlatL2_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1GpuIndexFlatL2.html">faiss::gpu::GpuIndexFlatL2</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuIndexFlat_8h_source.html#l00140">GpuIndexFlat.h:140</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1GpuIndexFlatL2_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1GpuIndexFlatL2.html">faiss::gpu::GpuIndexFlatL2</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuIndexFlat_8h_source.html#l00151">GpuIndexFlat.h:151</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1HostTensor_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1HostTensor.html">faiss::gpu::HostTensor</a></div><div class="ttdef"><b>Definition:</b> <a href="HostTensor_8cuh_source.html#l00023">HostTensor.cuh:23</a></div></div>
<div class="ttc" id="structfaiss_1_1gpu_1_1IndexWrapper_html"><div class="ttname"><a href="structfaiss_1_1gpu_1_1IndexWrapper.html">faiss::gpu::IndexWrapper</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexWrapper_8h_source.html#l00026">IndexWrapper.h:26</a></div></div>
</div><!-- fragment --></div><!-- contents -->
......
......@@ -240,7 +240,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="namespacefaiss_html_aa46fe38a858ecfde7e0fc0744939d5ad"><div class="ttname"><a href="namespacefaiss.html#aa46fe38a858ecfde7e0fc0744939d5ad">faiss::read_index</a></div><div class="ttdeci">Index * read_index(FILE *f, bool try_mmap)</div><div class="ttdef"><b>Definition:</b> <a href="index__io_8cpp_source.html#l00492">index_io.cpp:492</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1GpuResources_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1GpuResources.html">faiss::gpu::GpuResources</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuResources_8h_source.html#l00024">GpuResources.h:24</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1CpuTimer_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1CpuTimer.html">faiss::gpu::CpuTimer</a></div><div class="ttdoc">CPU wallclock elapsed timer. </div><div class="ttdef"><b>Definition:</b> <a href="Timer_8h_source.html#l00043">Timer.h:43</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1HostTensor_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1HostTensor.html">faiss::gpu::HostTensor</a></div><div class="ttdef"><b>Definition:</b> <a href="HostTensor_8cuh_source.html#l00023">HostTensor.cuh:23</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1GpuIndexIVFFlat_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html">faiss::gpu::GpuIndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuIndexIVFFlat_8h_source.html#l00025">GpuIndexIVFFlat.h:25</a></div></div>
<div class="ttc" id="structfaiss_1_1gpu_1_1IndexWrapper_html"><div class="ttname"><a href="structfaiss_1_1gpu_1_1IndexWrapper.html">faiss::gpu::IndexWrapper</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexWrapper_8h_source.html#l00026">IndexWrapper.h:26</a></div></div>
......
This diff is collapsed.
......@@ -124,8 +124,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordtype">bool</span> ignoreOutDistances = <span class="keyword">false</span>,</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; <span class="comment">// Hint to use a different sized tile for</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="comment">// multi-streaming the queries. If &lt;= 0, we use the</span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="comment">// default (256)</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordtype">int</span> tileSize = -1);</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="comment">// default</span></div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordtype">int</span> tileSizeOverride = -1);</div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="comment">/// Calculates brute-force inner product distance between `vectors`</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment">/// and `queries`, returning the k closest results seen</span></div>
......@@ -138,8 +138,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; Tensor&lt;int, 2, true&gt;&amp; outIndices,</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="comment">// Hint to use a different sized tile for</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// multi-streaming the queries. If &lt;= 0, we use the</span></div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="comment">// default (256)</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">int</span> tileSize = -1);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="comment">// default</span></div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordtype">int</span> tileSizeOverride = -1);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="preprocessor">#ifdef FAISS_USE_FLOAT16</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="preprocessor"></span><span class="keywordtype">void</span> runIPDistance(GpuResources* resources,</div>
......@@ -149,7 +149,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keywordtype">int</span> k,</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; Tensor&lt;half, 2, true&gt;&amp; outDistances,</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; Tensor&lt;int, 2, true&gt;&amp; outIndices,</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordtype">int</span> tileSize = -1);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="keywordtype">int</span> tileSizeOverride = -1);</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="keywordtype">void</span> runL2Distance(GpuResources* resources,</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; Tensor&lt;half, 2, true&gt;&amp; vectors,</div>
......@@ -160,7 +160,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; Tensor&lt;half, 2, true&gt;&amp; outDistances,</div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; Tensor&lt;int, 2, true&gt;&amp; outIndices,</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordtype">bool</span> ignoreOutDistances = <span class="keyword">false</span>,</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">int</span> tileSize = -1);</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">int</span> tileSizeOverride = -1);</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;} } <span class="comment">// namespace</span></div>
......
......@@ -441,7 +441,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="structfaiss_1_1gpu_1_1GpuClonerOptions_html_abc9c607f2dfc9f23942a523fb49c63fe"><div class="ttname"><a href="structfaiss_1_1gpu_1_1GpuClonerOptions.html#abc9c607f2dfc9f23942a523fb49c63fe">faiss::gpu::GpuClonerOptions::usePrecomputed</a></div><div class="ttdeci">bool usePrecomputed</div><div class="ttdoc">use precomputed tables? </div><div class="ttdef"><b>Definition:</b> <a href="GpuAutoTune_8h_source.html#l00040">GpuAutoTune.h:40</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexPreTransform_html"><div class="ttname"><a href="structfaiss_1_1IndexPreTransform.html">faiss::IndexPreTransform</a></div><div class="ttdef"><b>Definition:</b> <a href="VectorTransform_8h_source.html#l00237">VectorTransform.h:237</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1GpuResources_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1GpuResources.html">faiss::gpu::GpuResources</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuResources_8h_source.html#l00024">GpuResources.h:24</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
<div class="ttc" id="structfaiss_1_1gpu_1_1GpuMultipleClonerOptions_html"><div class="ttname"><a href="structfaiss_1_1gpu_1_1GpuMultipleClonerOptions.html">faiss::gpu::GpuMultipleClonerOptions</a></div><div class="ttdef"><b>Definition:</b> <a href="GpuAutoTune_8h_source.html#l00056">GpuAutoTune.h:56</a></div></div>
<div class="ttc" id="structfaiss_1_1ParameterSpace_html_aeaa27a715fe3fceef5da18d894976833"><div class="ttname"><a href="structfaiss_1_1ParameterSpace.html#aeaa27a715fe3fceef5da18d894976833">faiss::ParameterSpace::add_range</a></div><div class="ttdeci">ParameterRange &amp; add_range(const char *name)</div><div class="ttdoc">add a new parameter </div><div class="ttdef"><b>Definition:</b> <a href="AutoTune_8cpp_source.html#l00321">AutoTune.cpp:321</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html">faiss::IndexSplitVectors</a></div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00109">MetaIndexes.h:109</a></div></div>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -482,7 +482,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160;</div>
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160;</div>
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160;} <span class="comment">// namespace faiss</span></div>
<div class="ttc" id="namespacefaiss_html_a5eb1701e46123827966f2a56da893d1d"><div class="ttname"><a href="namespacefaiss.html#a5eb1701e46123827966f2a56da893d1d">faiss::knn_L2sqr_base_shift</a></div><div class="ttdeci">void knn_L2sqr_base_shift(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res, const float *base_shift)</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00870">utils.cpp:870</a></div></div>
<div class="ttc" id="namespacefaiss_html_a5eb1701e46123827966f2a56da893d1d"><div class="ttname"><a href="namespacefaiss.html#a5eb1701e46123827966f2a56da893d1d">faiss::knn_L2sqr_base_shift</a></div><div class="ttdeci">void knn_L2sqr_base_shift(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res, const float *base_shift)</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00872">utils.cpp:872</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlatL2BaseShift_html_a16e9bf1aec9d18b3ebbe78fea6bfecc0"><div class="ttname"><a href="structfaiss_1_1IndexFlatL2BaseShift.html#a16e9bf1aec9d18b3ebbe78fea6bfecc0">faiss::IndexFlatL2BaseShift::search</a></div><div class="ttdeci">virtual void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override</div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8cpp_source.html#l00124">IndexFlat.cpp:124</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexRefineFlat_html_ac3efe902315768afe83fa2b8ea5dc591"><div class="ttname"><a href="structfaiss_1_1IndexRefineFlat.html#ac3efe902315768afe83fa2b8ea5dc591">faiss::IndexRefineFlat::reset</a></div><div class="ttdeci">virtual void reset() override</div><div class="ttdoc">removes all elements from the database. </div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8cpp_source.html#l00184">IndexFlat.cpp:184</a></div></div>
<div class="ttc" id="structfaiss_1_1CMax_html"><div class="ttname"><a href="structfaiss_1_1CMax.html">faiss::CMax</a></div><div class="ttdef"><b>Definition:</b> <a href="Heap_8h_source.html#l00049">Heap.h:49</a></div></div>
......@@ -507,7 +507,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="namespacefaiss_html_ab29d725b808df6f142b80f21aa45e507"><div class="ttname"><a href="namespacefaiss.html#ab29d725b808df6f142b80f21aa45e507">faiss::range_search_inner_product</a></div><div class="ttdeci">void range_search_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float radius, RangeSearchResult *res)</div><div class="ttdoc">same as range_search_L2sqr for the inner product similarity </div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l01166">utils.cpp:1166</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html_a6970683faa021b7a6f1a0865c0d4eccd"><div class="ttname"><a href="structfaiss_1_1Index.html#a6970683faa021b7a6f1a0865c0d4eccd">faiss::Index::ntotal</a></div><div class="ttdeci">idx_t ntotal</div><div class="ttdoc">total nb of indexed vectors </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00067">Index.h:67</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html_aae095c6209a16347262408b3346193a3"><div class="ttname"><a href="structfaiss_1_1Index.html#aae095c6209a16347262408b3346193a3">faiss::Index::get_typename</a></div><div class="ttdeci">virtual std::string get_typename() const </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00188">Index.h:188</a></div></div>
<div class="ttc" id="namespacefaiss_html_a880c7318971f866267a86945aaa61b17"><div class="ttname"><a href="namespacefaiss.html#a880c7318971f866267a86945aaa61b17">faiss::knn_inner_product</a></div><div class="ttdeci">void knn_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_minheap_array_t *res)</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00830">utils.cpp:830</a></div></div>
<div class="ttc" id="namespacefaiss_html_a880c7318971f866267a86945aaa61b17"><div class="ttname"><a href="namespacefaiss.html#a880c7318971f866267a86945aaa61b17">faiss::knn_inner_product</a></div><div class="ttdeci">void knn_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_minheap_array_t *res)</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00832">utils.cpp:832</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlat_html_a406f028c702edec72477eacc5733f59c"><div class="ttname"><a href="structfaiss_1_1IndexFlat.html#a406f028c702edec72477eacc5733f59c">faiss::IndexFlat::add</a></div><div class="ttdeci">virtual void add(idx_t n, const float *x) override</div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8cpp_source.html#l00041">IndexFlat.cpp:41</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlat1D_html_a65736f2900865cd156faba4fcd260d05"><div class="ttname"><a href="structfaiss_1_1IndexFlat1D.html#a65736f2900865cd156faba4fcd260d05">faiss::IndexFlat1D::search</a></div><div class="ttdeci">virtual void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override</div><div class="ttdoc">Warn: the distances returned are L1 not L2. </div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8cpp_source.html#l00306">IndexFlat.cpp:306</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html_aced51b1ebc33c47ab3ae15ea906559a7"><div class="ttname"><a href="structfaiss_1_1Index.html#aced51b1ebc33c47ab3ae15ea906559a7">faiss::Index::search</a></div><div class="ttdeci">virtual void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const =0</div></div>
......@@ -516,7 +516,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="ttc" id="structfaiss_1_1IndexFlat_html_a14b51786e7f98be1954eef35d02813a7"><div class="ttname"><a href="structfaiss_1_1IndexFlat.html#a14b51786e7f98be1954eef35d02813a7">faiss::IndexFlat::compute_distance_subset</a></div><div class="ttdeci">void compute_distance_subset(idx_t n, const float *x, idx_t k, float *distances, const idx_t *labels) const </div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8cpp_source.html#l00085">IndexFlat.cpp:85</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html_a8e18f641854b2bde83ecff0a2f9a6f4e"><div class="ttname"><a href="structfaiss_1_1Index.html#a8e18f641854b2bde83ecff0a2f9a6f4e">faiss::Index::metric_type</a></div><div class="ttdeci">MetricType metric_type</div><div class="ttdoc">type of metric this index uses for search </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00074">Index.h:74</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html"><div class="ttname"><a href="structfaiss_1_1Index.html">faiss::Index</a></div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00061">Index.h:61</a></div></div>
<div class="ttc" id="namespacefaiss_html_a2f803e3d3b07cfab63699c89de161237"><div class="ttname"><a href="namespacefaiss.html#a2f803e3d3b07cfab63699c89de161237">faiss::knn_L2sqr</a></div><div class="ttdeci">void knn_L2sqr(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res)</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00850">utils.cpp:850</a></div></div>
<div class="ttc" id="namespacefaiss_html_a2f803e3d3b07cfab63699c89de161237"><div class="ttname"><a href="namespacefaiss.html#a2f803e3d3b07cfab63699c89de161237">faiss::knn_L2sqr</a></div><div class="ttdeci">void knn_L2sqr(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res)</div><div class="ttdef"><b>Definition:</b> <a href="utils_8cpp_source.html#l00852">utils.cpp:852</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html_a6e92732617c4dbe364e7678dd8773a7f"><div class="ttname"><a href="structfaiss_1_1Index.html#a6e92732617c4dbe364e7678dd8773a7f">faiss::Index::is_trained</a></div><div class="ttdeci">bool is_trained</div><div class="ttdoc">set if the Index does not require training, or if training is done already </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00071">Index.h:71</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html_a8f67dfd73993e192dc78f2c93d9d9532"><div class="ttname"><a href="structfaiss_1_1Index.html#a8f67dfd73993e192dc78f2c93d9d9532">faiss::Index::train</a></div><div class="ttdeci">virtual void train(idx_t n, const float *x)</div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00092">Index.h:92</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlat_html_a9001de47890fe5d2eced9551d3613d47"><div class="ttname"><a href="structfaiss_1_1IndexFlat.html#a9001de47890fe5d2eced9551d3613d47">faiss::IndexFlat::xb</a></div><div class="ttdeci">std::vector&lt; float &gt; xb</div><div class="ttdoc">database vectors, size ntotal * d </div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00026">IndexFlat.h:26</a></div></div>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -564,7 +564,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160;}</div>
<div class="ttc" id="classfaiss_1_1gpu_1_1StandardGpuResources_html_a6431477a7328ac147797b3b4e3fcf651"><div class="ttname"><a href="classfaiss_1_1gpu_1_1StandardGpuResources.html#a6431477a7328ac147797b3b4e3fcf651">faiss::gpu::StandardGpuResources::noTempMemory</a></div><div class="ttdeci">void noTempMemory()</div><div class="ttdef"><b>Definition:</b> <a href="StandardGpuResources_8cpp_source.html#l00072">StandardGpuResources.cpp:72</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlatL2_html"><div class="ttname"><a href="structfaiss_1_1IndexFlatL2.html">faiss::IndexFlatL2</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00081">IndexFlat.h:81</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlatIP_html"><div class="ttname"><a href="structfaiss_1_1IndexFlatIP.html">faiss::IndexFlatIP</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00075">IndexFlat.h:75</a></div></div>
<div class="ttc" id="classfaiss_1_1gpu_1_1StandardGpuResources_html"><div class="ttname"><a href="classfaiss_1_1gpu_1_1StandardGpuResources.html">faiss::gpu::StandardGpuResources</a></div><div class="ttdef"><b>Definition:</b> <a href="StandardGpuResources_8h_source.html#l00024">StandardGpuResources.h:24</a></div></div>
<div class="ttc" id="structfaiss_1_1Index_html"><div class="ttname"><a href="structfaiss_1_1Index.html">faiss::Index</a></div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00061">Index.h:61</a></div></div>
......
This diff is collapsed.
......@@ -194,7 +194,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;}</div>
<div class="ttc" id="structfaiss_1_1IndexFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexFlat.html">faiss::IndexFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00024">IndexFlat.h:24</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlatL2_html"><div class="ttname"><a href="structfaiss_1_1IndexFlatL2.html">faiss::IndexFlatL2</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00081">IndexFlat.h:81</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexFlatIP_html"><div class="ttname"><a href="structfaiss_1_1IndexFlatIP.html">faiss::IndexFlatIP</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexFlat_8h_source.html#l00075">IndexFlat.h:75</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFPQ_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFPQ.html">faiss::IndexIVFPQ</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVFPQ_8h_source.html#l00030">IndexIVFPQ.h:30</a></div></div>
</div><!-- fragment --></div><!-- contents -->
......
This diff is collapsed.
This diff is collapsed.
......@@ -241,7 +241,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;}</div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00113">IndexIVF.h:113</a></div></div>
<div class="ttc" id="structfaiss_1_1IndexIVFFlat_html"><div class="ttname"><a href="structfaiss_1_1IndexIVFFlat.html">faiss::IndexIVFFlat</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexIVF_8h_source.html#l00128">IndexIVF.h:128</a></div></div>
<div class="ttc" id="structfaiss_1_1MultiIndexQuantizer_html"><div class="ttname"><a href="structfaiss_1_1MultiIndexQuantizer.html">faiss::MultiIndexQuantizer</a></div><div class="ttdef"><b>Definition:</b> <a href="IndexPQ_8h_source.html#l00137">IndexPQ.h:137</a></div></div>
<div class="ttc" id="namespacefaiss_html_afd12191c638da74760ff397cf319752c"><div class="ttname"><a href="namespacefaiss.html#afd12191c638da74760ff397cf319752c">faiss::MetricType</a></div><div class="ttdeci">MetricType</div><div class="ttdoc">Some algorithms support both an inner product vetsion and a L2 search version. </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00044">Index.h:44</a></div></div>
</div><!-- fragment --></div><!-- contents -->
......
......@@ -95,6 +95,8 @@ Files</h2></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:test__blas_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>test_blas.cpp</b> <a href="test__blas_8cpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:test__ivfpq__codec_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>test_ivfpq_codec.cpp</b> <a href="test__ivfpq__codec_8cpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:test__ivfpq__indexing_8cpp"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><b>test_ivfpq_indexing.cpp</b> <a href="test__ivfpq__indexing_8cpp_source.html">[code]</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
......
This diff is collapsed.
This diff is collapsed.
......@@ -156,6 +156,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<li>decode()
: <a class="el" href="structfaiss_1_1ProductQuantizer.html#a7afbf9d96276f021981e99f064254208">faiss::ProductQuantizer</a>
</li>
<li>decode_multiple()
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#ae1fb0cc3051dec8e322a78c443f8fc9a">faiss::IndexIVFPQ</a>
</li>
<li>device_
: <a class="el" href="classfaiss_1_1gpu_1_1GpuIndex.html#a27b56209183310c8d57ffda796f02c6c">faiss::gpu::GpuIndex</a>
, <a class="el" href="structfaiss_1_1gpu_1_1StackDeviceMemory_1_1Stack.html#a0950e30ddd0008367a0fb109db9c01b9">faiss::gpu::StackDeviceMemory::Stack</a>
......@@ -174,7 +177,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
: <a class="el" href="classfaiss_1_1gpu_1_1IVFBase.html#a3a1c2031a4763f7d55bc8a400c63af66">faiss::gpu::IVFBase</a>
</li>
<li>DeviceTensor()
: <a class="el" href="classfaiss_1_1gpu_1_1DeviceTensor.html#a5036a292966adb3f5824dd952b903544">faiss::gpu::DeviceTensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;</a>
: <a class="el" href="classfaiss_1_1gpu_1_1DeviceTensor.html#afd9eaa5ca4c9cfa0c0143862bc8a48a4">faiss::gpu::DeviceTensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;</a>
</li>
<li>dim_
: <a class="el" href="classfaiss_1_1gpu_1_1IVFBase.html#aba3e3cfa469e5187f2d553fff10e0250">faiss::gpu::IVFBase</a>
......
......@@ -136,7 +136,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
, <a class="el" href="classfaiss_1_1gpu_1_1KernelTimer.html#ac79ab2b2ef60a3fb713f7c80380ad2b5">faiss::gpu::KernelTimer</a>
</li>
<li>encode_multiple()
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a947c6b15c2dde086a8e638fa69b7a7a6">faiss::IndexIVFPQ</a>
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a1ae6cdd996bbd398fa4e87646c8f3ba6">faiss::IndexIVFPQ</a>
</li>
<li>end()
: <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#a00d2d17504f63b9e834afac730a64324">faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;</a>
......
......@@ -128,6 +128,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<li>find_duplicates()
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#aee355b57acde203a3caed46a93e16a3c">faiss::IndexIVFPQ</a>
</li>
<li>fsize
: <a class="el" href="structfaiss_1_1IndexIVFFlatIPBounds.html#a32e550879d0bf5eecf0a939eb25b3c0c">faiss::IndexIVFFlatIPBounds</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
......
......@@ -128,6 +128,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
<li>parameter_ranges
: <a class="el" href="structfaiss_1_1ParameterSpace.html#a334c1bb54bc2b70950a4a63950728cbb">faiss::ParameterSpace</a>
</li>
<li>part_norms
: <a class="el" href="structfaiss_1_1IndexIVFFlatIPBounds.html#a07b988f02cc2f6fc3eb951609bfc0817">faiss::IndexIVFFlatIPBounds</a>
</li>
<li>PCAMat
: <a class="el" href="structfaiss_1_1PCAMatrix.html#aef5c130774e5d4f697a3e1c82647bfd3">faiss::PCAMatrix</a>
</li>
......@@ -141,8 +144,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
: <a class="el" href="structfaiss_1_1IndexFlat1D.html#a3442f0d86a14108534f99eea0b7d4d3f">faiss::IndexFlat1D</a>
</li>
<li>polysemous_ht
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a3093a0a3e128eafce6e0583b75e9662e">faiss::IndexIVFPQ</a>
, <a class="el" href="structfaiss_1_1IndexPQ.html#aff455f2adff6064939494dad6e3017bc">faiss::IndexPQ</a>
: <a class="el" href="structfaiss_1_1IndexPQ.html#aff455f2adff6064939494dad6e3017bc">faiss::IndexPQ</a>
, <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a3093a0a3e128eafce6e0583b75e9662e">faiss::IndexIVFPQ</a>
</li>
<li>polysemous_training
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a2b14cbb5acb3fc28a4df8fde3f5567cd">faiss::IndexIVFPQ</a>
......
This diff is collapsed.
This diff is collapsed.
......@@ -170,9 +170,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
, <a class="el" href="structfaiss_1_1OPQMatrix.html#a1e314577db0c6cd4a709503f73eb71e2">faiss::OPQMatrix</a>
, <a class="el" href="structfaiss_1_1IndexIVFPQCompact.html#a0ef8132fae22a50616fe1201c8b20588">faiss::IndexIVFPQCompact</a>
, <a class="el" href="structfaiss_1_1Clustering.html#a839f210abb11c7a1c7162e336e0ff9cf">faiss::Clustering</a>
, <a class="el" href="classfaiss_1_1gpu_1_1GpuIndexFlat.html#a0e74fad76628ddfb5ae3dc1d1c69f7e8">faiss::gpu::GpuIndexFlat</a>
, <a class="el" href="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a3c5b3760acb01814892fe93c72f08304">faiss::gpu::GpuIndexIVFFlat</a>
, <a class="el" href="classfaiss_1_1gpu_1_1GpuIndexIVFPQ.html#ac4814acafa4bc340a4c4bdcafd469b56">faiss::gpu::GpuIndexIVFPQ</a>
, <a class="el" href="classfaiss_1_1gpu_1_1GpuIndexFlat.html#add4d3c8dc767d4a81575829852f3996e">faiss::gpu::GpuIndexFlat</a>
, <a class="el" href="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a67baf715abe0b3dc8f5bcd040f286540">faiss::gpu::GpuIndexIVFFlat</a>
, <a class="el" href="classfaiss_1_1gpu_1_1GpuIndexIVFPQ.html#a74ff3a7214889e2aa81deb68de52f16b">faiss::gpu::GpuIndexIVFPQ</a>
, <a class="el" href="classfaiss_1_1gpu_1_1IndexProxy.html#aee6fe7e95b02238103a6a2d1f6d2cd00">faiss::gpu::IndexProxy</a>
, <a class="el" href="structfaiss_1_1IndexPreTransform.html#a416aaf28d7a533dcf7d2d7de434e993c">faiss::IndexPreTransform</a>
, <a class="el" href="structfaiss_1_1Index.html#a8f67dfd73993e192dc78f2c93d9d9532">faiss::Index</a>
......
This diff is collapsed.
This diff is collapsed.
......@@ -128,7 +128,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
, <a class="el" href="classfaiss_1_1gpu_1_1CpuTimer.html#a4a2795debf10bc7eb904d62356e41f0d">faiss::gpu::CpuTimer</a>
</li>
<li>encode_multiple()
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a947c6b15c2dde086a8e638fa69b7a7a6">faiss::IndexIVFPQ</a>
: <a class="el" href="structfaiss_1_1IndexIVFPQ.html#a1ae6cdd996bbd398fa4e87646c8f3ba6">faiss::IndexIVFPQ</a>
</li>
<li>end()
: <a class="el" href="classfaiss_1_1gpu_1_1Tensor.html#ad35e0c816162fd08e372b21b79cab6c1">faiss::gpu::Tensor&lt; T, Dim, Contig, IndexT, PtrTraits &gt;</a>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,7 @@ var searchData=
['eigen_5fpower',['eigen_power',['../structfaiss_1_1PCAMatrix.html#a4e48e801f98ba2cf57c03b0913d6fafc',1,'faiss::PCAMatrix']]],
['eigenvalues',['eigenvalues',['../structfaiss_1_1PCAMatrix.html#ae80e130c0667b66cea608c4926d7d561',1,'faiss::PCAMatrix']]],
['elapsedmilliseconds',['elapsedMilliseconds',['../classfaiss_1_1gpu_1_1KernelTimer.html#ac79ab2b2ef60a3fb713f7c80380ad2b5',1,'faiss::gpu::KernelTimer::elapsedMilliseconds()'],['../classfaiss_1_1gpu_1_1CpuTimer.html#a4a2795debf10bc7eb904d62356e41f0d',1,'faiss::gpu::CpuTimer::elapsedMilliseconds()']]],
['encode_5fmultiple',['encode_multiple',['../structfaiss_1_1IndexIVFPQ.html#a947c6b15c2dde086a8e638fa69b7a7a6',1,'faiss::IndexIVFPQ']]],
['encode_5fmultiple',['encode_multiple',['../structfaiss_1_1IndexIVFPQ.html#a1ae6cdd996bbd398fa4e87646c8f3ba6',1,'faiss::IndexIVFPQ']]],
['end',['end',['../classfaiss_1_1gpu_1_1Tensor.html#ad35e0c816162fd08e372b21b79cab6c1',1,'faiss::gpu::Tensor::end()'],['../classfaiss_1_1gpu_1_1Tensor.html#a00d2d17504f63b9e834afac730a64324',1,'faiss::gpu::Tensor::end() const ']]],
['equal',['equal',['../classfaiss_1_1gpu_1_1HostTensor.html#a55091065d8fd93f23d3cabbdb004b97c',1,'faiss::gpu::HostTensor']]],
['evaluate',['evaluate',['../structfaiss_1_1AutoTuneCriterion.html#a9084449e216b331c5f753a10c6de6a47',1,'faiss::AutoTuneCriterion::evaluate()'],['../structfaiss_1_1IntersectionCriterion.html#a6f7aef25852931b22298f7bb4c358791',1,'faiss::IntersectionCriterion::evaluate()']]],
......
......@@ -9,6 +9,7 @@ var searchData=
['finalblockmerge_3c_208_2c_20numthreads_2c_20k_2c_20v_2c_20numwarpq_2c_20dir_2c_20comp_20_3e',['FinalBlockMerge&lt; 8, NumThreads, K, V, NumWarpQ, Dir, Comp &gt;',['../structfaiss_1_1gpu_1_1FinalBlockMerge_3_018_00_01NumThreads_00_01K_00_01V_00_01NumWarpQ_00_01Dir_00_01Comp_01_4.html',1,'faiss::gpu']]],
['find_5fduplicates',['find_duplicates',['../structfaiss_1_1IndexIVFPQ.html#aee355b57acde203a3caed46a93e16a3c',1,'faiss::IndexIVFPQ']]],
['flatindex',['FlatIndex',['../classfaiss_1_1gpu_1_1FlatIndex.html',1,'faiss::gpu']]],
['fsize',['fsize',['../structfaiss_1_1IndexIVFFlatIPBounds.html#a32e550879d0bf5eecf0a939eb25b3c0c',1,'faiss::IndexIVFFlatIPBounds']]],
['fvec_5fl2sqr',['fvec_L2sqr',['../namespacefaiss.html#a7466bd32de31640860393a701eaac5ad',1,'faiss']]],
['fvec_5fmadd',['fvec_madd',['../namespacefaiss.html#a40328c31abd0bbba5bd95d7de951e847',1,'faiss']]],
['fvec_5fmadd_5fand_5fargmin',['fvec_madd_and_argmin',['../namespacefaiss.html#a9da63b8bb84460f5e8ccf8e17622cc7a',1,'faiss']]],
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var searchData=
[
['fsize',['fsize',['../structfaiss_1_1IndexIVFFlatIPBounds.html#a32e550879d0bf5eecf0a939eb25b3c0c',1,'faiss::IndexIVFFlatIPBounds']]]
];
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
docs/html/structfaiss_1_1IndexIVF.png

1.66 KB | W: | H:

docs/html/structfaiss_1_1IndexIVF.png

1.94 KB | W: | H:

docs/html/structfaiss_1_1IndexIVF.png
docs/html/structfaiss_1_1IndexIVF.png
docs/html/structfaiss_1_1IndexIVF.png
docs/html/structfaiss_1_1IndexIVF.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment