2018-12-20 00:48:35 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" / >
< meta http-equiv = "X-UA-Compatible" content = "IE=9" / >
< meta name = "generator" content = "Doxygen 1.8.5" / >
< title > Faiss: faiss::gpu::BinaryFlatIndex Class Reference< / title >
< link href = "tabs.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "jquery.js" > < / script >
< script type = "text/javascript" src = "dynsections.js" > < / script >
< link href = "search/search.css" rel = "stylesheet" type = "text/css" / >
< script type = "text/javascript" src = "search/search.js" > < / script >
< script type = "text/javascript" >
$(document).ready(function() { searchBox.OnSelectItem(0); });
< / script >
< link href = "doxygen.css" rel = "stylesheet" type = "text/css" / >
< / head >
< body >
< div id = "top" > <!-- do not remove this div, it is closed by doxygen! -->
< div id = "titlearea" >
< table cellspacing = "0" cellpadding = "0" >
< tbody >
< tr style = "height: 56px;" >
< td style = "padding-left: 0.5em;" >
< div id = "projectname" > Faiss
< / div >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
< script type = "text/javascript" >
var searchBox = new SearchBox("searchBox", "search",false,'Search');
< / script >
< div id = "navrow1" class = "tabs" >
< ul class = "tablist" >
< li > < a href = "index.html" > < span > Main  Page< / span > < / a > < / li >
< li > < a href = "namespaces.html" > < span > Namespaces< / span > < / a > < / li >
< li class = "current" > < a href = "annotated.html" > < span > Classes< / span > < / a > < / li >
< li > < a href = "files.html" > < span > Files< / span > < / a > < / li >
< li >
< div id = "MSearchBox" class = "MSearchBoxInactive" >
< span class = "left" >
< img id = "MSearchSelect" src = "search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
< input type = "text" id = "MSearchField" value = "Search" accesskey = "S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
< / span > < span class = "right" >
< a id = "MSearchClose" href = "javascript:searchBox.CloseResultsWindow()" > < img id = "MSearchCloseImg" border = "0" src = "search/close.png" alt = "" / > < / a >
< / span >
< / div >
< / li >
< / ul >
< / div >
< div id = "navrow2" class = "tabs2" >
< ul class = "tablist" >
< li > < a href = "annotated.html" > < span > Class  List< / span > < / a > < / li >
< li > < a href = "classes.html" > < span > Class  Index< / span > < / a > < / li >
< li > < a href = "hierarchy.html" > < span > Class  Hierarchy< / span > < / a > < / li >
< li > < a href = "functions.html" > < span > Class  Members< / span > < / a > < / li >
< / ul >
< / div >
<!-- window showing the filter options -->
< div id = "MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
< a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(0)" > < span class = "SelectionMark" >   < / span > All< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(1)" > < span class = "SelectionMark" >   < / span > Classes< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(2)" > < span class = "SelectionMark" >   < / span > Namespaces< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(3)" > < span class = "SelectionMark" >   < / span > Functions< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(4)" > < span class = "SelectionMark" >   < / span > Variables< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(5)" > < span class = "SelectionMark" >   < / span > Typedefs< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(6)" > < span class = "SelectionMark" >   < / span > Enumerations< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(7)" > < span class = "SelectionMark" >   < / span > Enumerator< / a > < a class = "SelectItem" href = "javascript:void(0)" onclick = "searchBox.OnSelectItem(8)" > < span class = "SelectionMark" >   < / span > Friends< / a > < / div >
<!-- iframe showing the search results (closed by default) -->
< div id = "MSearchResultsWindow" >
< iframe src = "javascript:void(0)" frameborder = "0"
name="MSearchResults" id="MSearchResults">
< / iframe >
< / div >
< div id = "nav-path" class = "navpath" >
< ul >
< li class = "navelem" > < a class = "el" href = "namespacefaiss.html" > faiss< / a > < / li > < li class = "navelem" > < b > gpu< / b > < / li > < li class = "navelem" > < a class = "el" href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html" > BinaryFlatIndex< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "classfaiss_1_1gpu_1_1BinaryFlatIndex-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::gpu::BinaryFlatIndex Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > Holder of GPU resources for a particular flat index.
< a href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html#details" > More...< / a > < / p >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a1067a5f135486b6edb9d8b32c8036fcf" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a1067a5f135486b6edb9d8b32c8036fcf" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < b > BinaryFlatIndex< / b > (< a class = "el" href = "classfaiss_1_1gpu_1_1GpuResources.html" > GpuResources< / a > *res, int dim, MemorySpace space)< / td > < / tr >
< tr class = "separator:a1067a5f135486b6edb9d8b32c8036fcf" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa3440ccb9bc693cbc89386b8cc981565" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aa3440ccb9bc693cbc89386b8cc981565" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html#aa3440ccb9bc693cbc89386b8cc981565" > getSize< / a > () const < / td > < / tr >
< tr class = "memdesc:aa3440ccb9bc693cbc89386b8cc981565" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the number of vectors we contain. < br / > < / td > < / tr >
< tr class = "separator:aa3440ccb9bc693cbc89386b8cc981565" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad1ad4c1cf5a2fab98010d7e866ac0868" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ad1ad4c1cf5a2fab98010d7e866ac0868" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < b > getDim< / b > () const < / td > < / tr >
< tr class = "separator:ad1ad4c1cf5a2fab98010d7e866ac0868" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a897e1b584bda7a949e5e8644d0bc972b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a897e1b584bda7a949e5e8644d0bc972b" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html#a897e1b584bda7a949e5e8644d0bc972b" > reserve< / a > (size_t numVecs, cudaStream_t stream)< / td > < / tr >
< tr class = "memdesc:a897e1b584bda7a949e5e8644d0bc972b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Reserve storage that can contain at least this many vectors. < br / > < / td > < / tr >
< tr class = "separator:a897e1b584bda7a949e5e8644d0bc972b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0cc143e913b7a06e3ed31e5a6b546a6b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a0cc143e913b7a06e3ed31e5a6b546a6b" > < / a >
< a class = "el" href = "classfaiss_1_1gpu_1_1Tensor.html" > Tensor< / a > < unsigned char, 2, true > &   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html#a0cc143e913b7a06e3ed31e5a6b546a6b" > getVectorsRef< / a > ()< / td > < / tr >
< tr class = "memdesc:a0cc143e913b7a06e3ed31e5a6b546a6b" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns a reference to our vectors currently in use. < br / > < / td > < / tr >
< tr class = "separator:a0cc143e913b7a06e3ed31e5a6b546a6b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a65b1723d69c35a0de606700ad8b66ac5" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a65b1723d69c35a0de606700ad8b66ac5" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > query< / b > (< a class = "el" href = "classfaiss_1_1gpu_1_1Tensor.html" > Tensor< / a > < unsigned char, 2, true > & vecs, int k, < a class = "el" href = "classfaiss_1_1gpu_1_1Tensor.html" > Tensor< / a > < int, 2, true > & outDistances, < a class = "el" href = "classfaiss_1_1gpu_1_1Tensor.html" > Tensor< / a > < int, 2, true > & outIndices)< / td > < / tr >
< tr class = "separator:a65b1723d69c35a0de606700ad8b66ac5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa633251a14afbbf6a6652ae193b68790" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html#aa633251a14afbbf6a6652ae193b68790" > add< / a > (const unsigned char *data, int numVecs, cudaStream_t stream)< / td > < / tr >
< tr class = "separator:aa633251a14afbbf6a6652ae193b68790" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6b31cef9564d47f0d188ae34c4b5eacc" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a6b31cef9564d47f0d188ae34c4b5eacc" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1BinaryFlatIndex.html#a6b31cef9564d47f0d188ae34c4b5eacc" > reset< / a > ()< / td > < / tr >
< tr class = "memdesc:a6b31cef9564d47f0d188ae34c4b5eacc" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Free all storage. < br / > < / td > < / tr >
< tr class = "separator:a6b31cef9564d47f0d188ae34c4b5eacc" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Holder of GPU resources for a particular flat index. < / p >
2019-05-28 22:17:22 +08:00
< p > Definition at line < a class = "el" href = "BinaryFlatIndex_8cuh_source.html#l00020" > 20< / a > of file < a class = "el" href = "BinaryFlatIndex_8cuh_source.html" > BinaryFlatIndex.cuh< / a > .< / p >
2018-12-20 00:48:35 +08:00
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
< a class = "anchor" id = "aa633251a14afbbf6a6652ae193b68790" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::gpu::BinaryFlatIndex::add < / td >
< td > (< / td >
< td class = "paramtype" > const unsigned char *  < / td >
< td class = "paramname" > < em > data< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > numVecs< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > cudaStream_t  < / td >
< td class = "paramname" > < em > stream< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Add vectors to ourselves; the pointer passed can be on the host or the device < / p >
2019-05-28 22:17:22 +08:00
< p > Definition at line < a class = "el" href = "BinaryFlatIndex_8cu_source.html#l00062" > 62< / a > of file < a class = "el" href = "BinaryFlatIndex_8cu_source.html" > BinaryFlatIndex.cu< / a > .< / p >
2018-12-20 00:48:35 +08:00
< / div >
< / div >
< hr / > The documentation for this class was generated from the following files:< ul >
2019-05-28 22:17:22 +08:00
< li > /data/users/hoss/faiss/gpu/impl/< a class = "el" href = "BinaryFlatIndex_8cuh_source.html" > BinaryFlatIndex.cuh< / a > < / li >
< li > /data/users/hoss/faiss/gpu/impl/< a class = "el" href = "BinaryFlatIndex_8cu_source.html" > BinaryFlatIndex.cu< / a > < / li >
2018-12-20 00:48:35 +08:00
< / ul >
< / div > <!-- contents -->
<!-- start footer part -->
< hr class = "footer" / > < address class = "footer" > < small >
Generated by   < a href = "http://www.doxygen.org/index.html" >
< img class = "footer" src = "doxygen.png" alt = "doxygen" / >
< / a > 1.8.5
< / small > < / address >
< / body >
< / html >