<divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment"> * This source code is licensed under the CC-by-NC license found in the</span></div>
<divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment"> * LICENSE file in the root directory of this source tree.</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">// Copyright 2004-present Facebook. All Rights Reserved.</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="comment">/// Wrapper around the GPU implementation that looks like</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> /// Constructs a new instance with an empty flat quantizer; the user</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment"> /// provides the number of lists desired.</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment">// Is our IVF storage of vectors in float16?</span></div>
<divclass="line"><aname="l00040"></a><spanclass="lineno"> 40</span> <spanclass="comment"> /// Call to initialize ourselves from a GpuIndexFlat instance. The</span></div>
<divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span> <spanclass="comment"> /// quantizer must match the dimension parameters specified; if</span></div>
<divclass="line"><aname="l00042"></a><spanclass="lineno"> 42</span> <spanclass="comment"> /// populated, it must also match the number of list elements</span></div>
<divclass="line"><aname="l00044"></a><spanclass="lineno"> 44</span> <spanclass="comment"> /// The index must also be present on the same device as ourselves.</span></div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="comment"> /// We do not own this quantizer instance.</span></div>
<divclass="line"><aname="l00057"></a><spanclass="lineno"> 57</span> <spanclass="comment"> /// Reserve GPU memory in our inverted lists for this number of vectors</span></div>
<divclass="line"><aname="l00060"></a><spanclass="lineno"> 60</span> <spanclass="comment"> /// Initialize ourselves from the given CPU index; will overwrite</span></div>
<divclass="line"><aname="l00061"></a><spanclass="lineno"> 61</span> <spanclass="comment"> /// all data in ourselves</span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span> <spanclass="comment"> /// Copy ourselves to the given CPU index; will overwrite all data</span></div>
<divclass="line"><aname="l00065"></a><spanclass="lineno"> 65</span> <spanclass="comment"> /// in the index instance</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="comment"> /// After adding vectors, one can call this to reclaim device memory</span></div>
<divclass="line"><aname="l00069"></a><spanclass="lineno"> 69</span> <spanclass="comment"> /// to exactly the amount needed. Returns space reclaimed in bytes</span></div>
<divclass="line"><aname="l00074"></a><spanclass="lineno"> 74</span> <spanclass="keyword">virtual</span><spanclass="keywordtype">void</span><aclass="code"href="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a67baf715abe0b3dc8f5bcd040f286540">train</a>(<aclass="code"href="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">Index::idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* x);</div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment"> /// Called from GpuIndex for add/add_with_ids</span></div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment"> /// Instance that we own; contains the inverted list</span></div>
<divclass="ttc"id="classfaiss_1_1gpu_1_1GpuIndexIVFFlat_html_a329d7734f1285788d10c1fbf1f88d72f"><divclass="ttname"><ahref="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a329d7734f1285788d10c1fbf1f88d72f">faiss::gpu::GpuIndexIVFFlat::reserveMemory</a></div><divclass="ttdeci">void reserveMemory(size_t numVecs)</div><divclass="ttdoc">Reserve GPU memory in our inverted lists for this number of vectors. </div><divclass="ttdef"><b>Definition:</b><ahref="GpuIndexIVFFlat_8cu_source.html#l00095">GpuIndexIVFFlat.cu:95</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index_html_a040c6aed1f224f3ea7bf58eebc0c31a4"><divclass="ttname"><ahref="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">faiss::Index::idx_t</a></div><divclass="ttdeci">long idx_t</div><divclass="ttdoc">all indices are this type </div><divclass="ttdef"><b>Definition:</b><ahref="Index_8h_source.html#l00064">Index.h:64</a></div></div>
<divclass="ttc"id="classfaiss_1_1gpu_1_1GpuIndexIVFFlat_html_a3f866d85ea33b73fe57c93a3c2d2b8d8"><divclass="ttname"><ahref="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a3f866d85ea33b73fe57c93a3c2d2b8d8">faiss::gpu::GpuIndexIVFFlat::searchImpl_</a></div><divclass="ttdeci">virtual void searchImpl_(faiss::Index::idx_t n, const float *x, faiss::Index::idx_t k, float *distances, faiss::Index::idx_t *labels) const </div><divclass="ttdoc">Called from GpuIndex for search. </div><divclass="ttdef"><b>Definition:</b><ahref="GpuIndexIVFFlat_8cu_source.html#l00245">GpuIndexIVFFlat.cu:245</a></div></div>
<divclass="ttc"id="classfaiss_1_1gpu_1_1GpuIndexIVFFlat_html_a35d260fb106ff469229bd605caad4b80"><divclass="ttname"><ahref="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a35d260fb106ff469229bd605caad4b80">faiss::gpu::GpuIndexIVFFlat::reset</a></div><divclass="ttdeci">virtual void reset()</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="GpuIndexIVFFlat_8cu_source.html#l00174">GpuIndexIVFFlat.cu:174</a></div></div>
<divclass="ttc"id="classfaiss_1_1gpu_1_1GpuIndexIVFFlat_html_a67baf715abe0b3dc8f5bcd040f286540"><divclass="ttname"><ahref="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a67baf715abe0b3dc8f5bcd040f286540">faiss::gpu::GpuIndexIVFFlat::train</a></div><divclass="ttdeci">virtual void train(Index::idx_t n, const float *x)</div><divclass="ttdef"><b>Definition:</b><ahref="GpuIndexIVFFlat_8cu_source.html#l00186">GpuIndexIVFFlat.cu:186</a></div></div>
<divclass="ttc"id="classfaiss_1_1gpu_1_1GpuIndexIVFFlat_html_adf7fae773edca26edac2d01f7cdcd0c4"><divclass="ttname"><ahref="classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#adf7fae773edca26edac2d01f7cdcd0c4">faiss::gpu::GpuIndexIVFFlat::addImpl_</a></div><divclass="ttdeci">virtual void addImpl_(faiss::Index::idx_t n, const float *x, const faiss::Index::idx_t *ids)</div><divclass="ttdoc">Called from GpuIndex for add/add_with_ids. </div><divclass="ttdef"><b>Definition:</b><ahref="GpuIndexIVFFlat_8cu_source.html#l00214">GpuIndexIVFFlat.cu:214</a></div></div>
<divclass="ttc"id="namespacefaiss_html_afd12191c638da74760ff397cf319752c"><divclass="ttname"><ahref="namespacefaiss.html#afd12191c638da74760ff397cf319752c">faiss::MetricType</a></div><divclass="ttdeci">MetricType</div><divclass="ttdoc">Some algorithms support both an inner product vetsion and a L2 search version. </div><divclass="ttdef"><b>Definition:</b><ahref="Index_8h_source.html#l00044">Index.h:44</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hrclass="footer"/><addressclass="footer"><small>
Generated by  <ahref="http://www.doxygen.org/index.html">