2018-02-23 23:44:31 +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::OnDiskInvertedLists Struct 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" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html" > OnDiskInvertedLists< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#nested-classes" > Classes< / a > |
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "#pub-attribs" > Public Attributes< / a > |
< a href = "structfaiss_1_1OnDiskInvertedLists-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::OnDiskInvertedLists Struct Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < code > #include < < a class = "el" href = "OnDiskInvertedLists_8h_source.html" > OnDiskInvertedLists.h< / a > > < / code > < / p >
< div class = "dynheader" >
Inheritance diagram for faiss::OnDiskInvertedLists:< / div >
< div class = "dyncontent" >
< div class = "center" >
< img src = "structfaiss_1_1OnDiskInvertedLists.png" usemap = "#faiss::OnDiskInvertedLists_map" alt = "" / >
< map id = "faiss::OnDiskInvertedLists_map" name = "faiss::OnDiskInvertedLists_map" >
< area href = "structfaiss_1_1InvertedLists.html" alt = "faiss::InvertedLists" shape = "rect" coords = "0,0,156,24" / >
< / map >
< / div > < / div >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "nested-classes" > < / a >
Classes< / h2 > < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1List.html" > List< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1OngoingPrefetch.html" > OngoingPrefetch< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:" > < td class = "memItemLeft" align = "right" valign = "top" > struct   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1Slot.html" > Slot< / a > < / td > < / tr >
< tr class = "separator:" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < 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:acce006c1c63aee12d45c7f7dbeb8bb23" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "acce006c1c63aee12d45c7f7dbeb8bb23" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html#acce006c1c63aee12d45c7f7dbeb8bb23" > OnDiskInvertedLists< / a > (size_t < a class = "el" href = "structfaiss_1_1InvertedLists.html#afaf8b7aa3e846aa4553f6aae67827ec8" > nlist< / a > , size_t < a class = "el" href = "structfaiss_1_1InvertedLists.html#ae06049e4259edb47d443ef87bdedc744" > code_size< / a > , const char *filename)< / td > < / tr >
< tr class = "memdesc:acce006c1c63aee12d45c7f7dbeb8bb23" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > are inverted lists mapped read-only < br / > < / td > < / tr >
< tr class = "separator:acce006c1c63aee12d45c7f7dbeb8bb23" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a19b264dfe5a541c1427d3b635ad887f5" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a19b264dfe5a541c1427d3b635ad887f5" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html#a19b264dfe5a541c1427d3b635ad887f5" > list_size< / a > (size_t list_no) const override< / td > < / tr >
< tr class = "memdesc:a19b264dfe5a541c1427d3b635ad887f5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > get the size of a list < br / > < / td > < / tr >
< tr class = "separator:a19b264dfe5a541c1427d3b635ad887f5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1695e1d8d64a00e8e5f57ebf2210cb87" > < td class = "memItemLeft" align = "right" valign = "top" > const uint8_t *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html#a1695e1d8d64a00e8e5f57ebf2210cb87" > get_codes< / a > (size_t list_no) const override< / td > < / tr >
< tr class = "separator:a1695e1d8d64a00e8e5f57ebf2210cb87" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae54e7c6abc10c3d59ea3cd1113466957" > < td class = "memItemLeft" align = "right" valign = "top" > const idx_t *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html#ae54e7c6abc10c3d59ea3cd1113466957" > get_ids< / a > (size_t list_no) const override< / td > < / tr >
< tr class = "separator:ae54e7c6abc10c3d59ea3cd1113466957" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a762cfcc06fe60dbaa807ce72723531a9" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a762cfcc06fe60dbaa807ce72723531a9" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < b > add_entries< / b > (size_t list_no, size_t n_entry, const idx_t *ids, const uint8_t *code) override< / td > < / tr >
< tr class = "separator:a762cfcc06fe60dbaa807ce72723531a9" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a4d64d34d7ce9b242bb840c218fc3059c" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a4d64d34d7ce9b242bb840c218fc3059c" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > update_entries< / b > (size_t list_no, size_t offset, size_t n_entry, const idx_t *ids, const uint8_t *code) override< / td > < / tr >
< tr class = "separator:a4d64d34d7ce9b242bb840c218fc3059c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6b2faf11aea3dcb1dbf07a52af33099b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a6b2faf11aea3dcb1dbf07a52af33099b" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > resize< / b > (size_t list_no, size_t new_size) override< / td > < / tr >
< tr class = "separator:a6b2faf11aea3dcb1dbf07a52af33099b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-05-28 22:17:22 +08:00
< tr class = "memitem:abd32c2ce4f8b530dc5934a12a138e8ce" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "abd32c2ce4f8b530dc5934a12a138e8ce" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < b > merge_from< / b > (const < a class = "el" href = "structfaiss_1_1InvertedLists.html" > InvertedLists< / a > **ils, int n_il, bool verbose=false)< / td > < / tr >
< tr class = "separator:abd32c2ce4f8b530dc5934a12a138e8ce" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0dbb919e454c26aaa1b907bdf35d3b55" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a0dbb919e454c26aaa1b907bdf35d3b55" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html#a0dbb919e454c26aaa1b907bdf35d3b55" > crop_invlists< / a > (size_t l0, size_t l1)< / td > < / tr >
< tr class = "memdesc:a0dbb919e454c26aaa1b907bdf35d3b55" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > restrict the inverted lists to l0:l1 without touching the mmapped region < br / > < / td > < / tr >
< tr class = "separator:a0dbb919e454c26aaa1b907bdf35d3b55" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a04ad61e3a23ced0aea032bf1e699436d" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html#a04ad61e3a23ced0aea032bf1e699436d" > prefetch_lists< / a > (const idx_t *list_nos, int < a class = "el" href = "structfaiss_1_1InvertedLists.html#afaf8b7aa3e846aa4553f6aae67827ec8" > nlist< / a > ) const override< / td > < / tr >
< tr class = "separator:a04ad61e3a23ced0aea032bf1e699436d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-23 23:44:31 +08:00
< tr class = "memitem:afbdee1f61b80b7748028fa95d3d09a6b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "afbdee1f61b80b7748028fa95d3d09a6b" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > do_mmap< / b > ()< / td > < / tr >
< tr class = "separator:afbdee1f61b80b7748028fa95d3d09a6b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a11bf6949899bc7f11be17322dec68ee5" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a11bf6949899bc7f11be17322dec68ee5" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > update_totsize< / b > (size_t new_totsize)< / td > < / tr >
< tr class = "separator:a11bf6949899bc7f11be17322dec68ee5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a48854bce4aa01698b5b3fb0d636caac0" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a48854bce4aa01698b5b3fb0d636caac0" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > resize_locked< / b > (size_t list_no, size_t new_size)< / td > < / tr >
< tr class = "separator:a48854bce4aa01698b5b3fb0d636caac0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8f351c2423c5f87f61241eb7df8d50f0" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a8f351c2423c5f87f61241eb7df8d50f0" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < b > allocate_slot< / b > (size_t capacity)< / td > < / tr >
< tr class = "separator:a8f351c2423c5f87f61241eb7df8d50f0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a27fc559dcc2e48a7dded1a99540cb22a" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a27fc559dcc2e48a7dded1a99540cb22a" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > free_slot< / b > (size_t offset, size_t capacity)< / td > < / tr >
< tr class = "separator:a27fc559dcc2e48a7dded1a99540cb22a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "inherit_header pub_methods_structfaiss_1_1InvertedLists" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_methods_structfaiss_1_1InvertedLists')" > < img src = "closed.png" alt = "-" / >   Public Member Functions inherited from < a class = "el" href = "structfaiss_1_1InvertedLists.html" > faiss::InvertedLists< / a > < / td > < / tr >
< tr class = "memitem:a83d053d03720d938dc4fc4e2f674619c inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a83d053d03720d938dc4fc4e2f674619c" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < b > InvertedLists< / b > (size_t < a class = "el" href = "structfaiss_1_1InvertedLists.html#afaf8b7aa3e846aa4553f6aae67827ec8" > nlist< / a > , size_t < a class = "el" href = "structfaiss_1_1InvertedLists.html#ae06049e4259edb47d443ef87bdedc744" > code_size< / a > )< / td > < / tr >
< tr class = "separator:a83d053d03720d938dc4fc4e2f674619c inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-05-28 22:17:22 +08:00
< tr class = "memitem:ad6a2111630ecd67ee5119d5198abcfb1 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ad6a2111630ecd67ee5119d5198abcfb1" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#ad6a2111630ecd67ee5119d5198abcfb1" > release_codes< / a > (size_t list_no, const uint8_t *codes) const < / td > < / tr >
< tr class = "memdesc:ad6a2111630ecd67ee5119d5198abcfb1 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > release codes returned by get_codes (default implementation is nop < br / > < / td > < / tr >
< tr class = "separator:ad6a2111630ecd67ee5119d5198abcfb1 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae1618d2b5dca2704d3af8ced58548ac9 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae1618d2b5dca2704d3af8ced58548ac9" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#ae1618d2b5dca2704d3af8ced58548ac9" > release_ids< / a > (size_t list_no, const idx_t *ids) const < / td > < / tr >
< tr class = "memdesc:ae1618d2b5dca2704d3af8ced58548ac9 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > release ids returned by get_ids < br / > < / td > < / tr >
< tr class = "separator:ae1618d2b5dca2704d3af8ced58548ac9 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-23 23:44:31 +08:00
< tr class = "memitem:a21b52cdb0601cd225bd7924932310876 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > virtual idx_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#a21b52cdb0601cd225bd7924932310876" > get_single_id< / a > (size_t list_no, size_t offset) const < / td > < / tr >
< tr class = "separator:a21b52cdb0601cd225bd7924932310876 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:afc2760bed7c210f2fad9b03109f561ee inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > virtual const uint8_t *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#afc2760bed7c210f2fad9b03109f561ee" > get_single_code< / a > (size_t list_no, size_t offset) const < / td > < / tr >
< tr class = "separator:afc2760bed7c210f2fad9b03109f561ee inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:acd3e36cc06fc49e02773e403a84dba95 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "acd3e36cc06fc49e02773e403a84dba95" > < / a >
virtual size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#acd3e36cc06fc49e02773e403a84dba95" > add_entry< / a > (size_t list_no, idx_t theid, const uint8_t *code)< / td > < / tr >
< tr class = "memdesc:acd3e36cc06fc49e02773e403a84dba95 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > add one entry to an inverted list < br / > < / td > < / tr >
< tr class = "separator:acd3e36cc06fc49e02773e403a84dba95 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a57e1382949b91f77acc46790b6431056 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a57e1382949b91f77acc46790b6431056" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < b > update_entry< / b > (size_t list_no, size_t offset, idx_t id, const uint8_t *code)< / td > < / tr >
< tr class = "separator:a57e1382949b91f77acc46790b6431056 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a72e736253a669dad5f6e5188168e5c60 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a72e736253a669dad5f6e5188168e5c60" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < b > reset< / b > ()< / td > < / tr >
< tr class = "separator:a72e736253a669dad5f6e5188168e5c60 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-12-20 00:48:35 +08:00
< tr class = "memitem:ac2a0686121ef5bdd6eb70f7eb3cf9b3a inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ac2a0686121ef5bdd6eb70f7eb3cf9b3a" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#ac2a0686121ef5bdd6eb70f7eb3cf9b3a" > merge_from< / a > (< a class = "el" href = "structfaiss_1_1InvertedLists.html" > InvertedLists< / a > *oivf, size_t add_id)< / td > < / tr >
< tr class = "memdesc:ac2a0686121ef5bdd6eb70f7eb3cf9b3a inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > move all entries from oivf (empty on output) < br / > < / td > < / tr >
< tr class = "separator:ac2a0686121ef5bdd6eb70f7eb3cf9b3a inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-05-28 22:17:22 +08:00
< tr class = "memitem:aacf34f6cf392771fe2e68210cd4e009b inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aacf34f6cf392771fe2e68210cd4e009b" > < / a >
double  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#aacf34f6cf392771fe2e68210cd4e009b" > imbalance_factor< / a > () const < / td > < / tr >
< tr class = "memdesc:aacf34f6cf392771fe2e68210cd4e009b inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > 1= perfectly balanced, > 1: imbalanced < br / > < / td > < / tr >
< tr class = "separator:aacf34f6cf392771fe2e68210cd4e009b inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a156de8be4b21a0dfa9a48a3918a0b5c3 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a156de8be4b21a0dfa9a48a3918a0b5c3" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#a156de8be4b21a0dfa9a48a3918a0b5c3" > print_stats< / a > () const < / td > < / tr >
< tr class = "memdesc:a156de8be4b21a0dfa9a48a3918a0b5c3 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > display some stats about the inverted lists < br / > < / td > < / tr >
< tr class = "separator:a156de8be4b21a0dfa9a48a3918a0b5c3 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a722eef5a0e5bf5dcf78228a903e16af9 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a722eef5a0e5bf5dcf78228a903e16af9" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#a722eef5a0e5bf5dcf78228a903e16af9" > compute_ntotal< / a > () const < / td > < / tr >
< tr class = "memdesc:a722eef5a0e5bf5dcf78228a903e16af9 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > sum up list sizes < br / > < / td > < / tr >
< tr class = "separator:a722eef5a0e5bf5dcf78228a903e16af9 inherit pub_methods_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-23 23:44:31 +08:00
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-attribs" > < / a >
Public Attributes< / h2 > < / td > < / tr >
< tr class = "memitem:a96715d36dae381fc45204f091198d932" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a96715d36dae381fc45204f091198d932" > < / a >
std::vector< < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1List.html" > List< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < b > lists< / b > < / td > < / tr >
< tr class = "separator:a96715d36dae381fc45204f091198d932" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:acb138d838eeb3c732a8cf0b460f051a0" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "acb138d838eeb3c732a8cf0b460f051a0" > < / a >
std::list< < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1Slot.html" > Slot< / a > >   < / td > < td class = "memItemRight" valign = "bottom" > < b > slots< / b > < / td > < / tr >
< tr class = "separator:acb138d838eeb3c732a8cf0b460f051a0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a9a6b94bbf12d81248cf3a093d8dddee0" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a9a6b94bbf12d81248cf3a093d8dddee0" > < / a >
std::string  < / td > < td class = "memItemRight" valign = "bottom" > < b > filename< / b > < / td > < / tr >
< tr class = "separator:a9a6b94bbf12d81248cf3a093d8dddee0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a85ad4a6336e9593450aa555ea598194c" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a85ad4a6336e9593450aa555ea598194c" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < b > totsize< / b > < / td > < / tr >
< tr class = "separator:a85ad4a6336e9593450aa555ea598194c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0adc16674053bb53b34b284f0a9c02a6" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a0adc16674053bb53b34b284f0a9c02a6" > < / a >
uint8_t *  < / td > < td class = "memItemRight" valign = "bottom" > < b > ptr< / b > < / td > < / tr >
< tr class = "separator:a0adc16674053bb53b34b284f0a9c02a6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:accf9f3461466233fa612402437d0e5ff" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "accf9f3461466233fa612402437d0e5ff" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < b > read_only< / b > < / td > < / tr >
< tr class = "separator:accf9f3461466233fa612402437d0e5ff" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aebd05c108fe85af4b095dad8e8915421" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aebd05c108fe85af4b095dad8e8915421" > < / a >
< a class = "el" href = "structfaiss_1_1LockLevels.html" > LockLevels< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < b > locks< / b > < / td > < / tr >
< tr class = "separator:aebd05c108fe85af4b095dad8e8915421" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a93eb0db0f7b9774061e956ef20f46550" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a93eb0db0f7b9774061e956ef20f46550" > < / a >
< a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1OngoingPrefetch.html" > OngoingPrefetch< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < b > pf< / b > < / td > < / tr >
< tr class = "separator:a93eb0db0f7b9774061e956ef20f46550" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2019-05-28 22:17:22 +08:00
< tr class = "memitem:af8d76f7a52fe47da75e2845d2ac36797" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "af8d76f7a52fe47da75e2845d2ac36797" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < b > prefetch_nthread< / b > < / td > < / tr >
< tr class = "separator:af8d76f7a52fe47da75e2845d2ac36797" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2018-02-23 23:44:31 +08:00
< tr class = "inherit_header pub_attribs_structfaiss_1_1InvertedLists" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_attribs_structfaiss_1_1InvertedLists')" > < img src = "closed.png" alt = "-" / >   Public Attributes inherited from < a class = "el" href = "structfaiss_1_1InvertedLists.html" > faiss::InvertedLists< / a > < / td > < / tr >
< tr class = "memitem:afaf8b7aa3e846aa4553f6aae67827ec8 inherit pub_attribs_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "afaf8b7aa3e846aa4553f6aae67827ec8" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#afaf8b7aa3e846aa4553f6aae67827ec8" > nlist< / a > < / td > < / tr >
< tr class = "memdesc:afaf8b7aa3e846aa4553f6aae67827ec8 inherit pub_attribs_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > number of possible key values < br / > < / td > < / tr >
< tr class = "separator:afaf8b7aa3e846aa4553f6aae67827ec8 inherit pub_attribs_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae06049e4259edb47d443ef87bdedc744 inherit pub_attribs_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae06049e4259edb47d443ef87bdedc744" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1InvertedLists.html#ae06049e4259edb47d443ef87bdedc744" > code_size< / a > < / td > < / tr >
< tr class = "memdesc:ae06049e4259edb47d443ef87bdedc744 inherit pub_attribs_structfaiss_1_1InvertedLists" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > code size per vector in bytes < br / > < / td > < / tr >
< tr class = "separator:ae06049e4259edb47d443ef87bdedc744 inherit pub_attribs_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "inherited" > < / a >
Additional Inherited Members< / h2 > < / td > < / tr >
< tr class = "inherit_header pub_types_structfaiss_1_1InvertedLists" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_types_structfaiss_1_1InvertedLists')" > < img src = "closed.png" alt = "-" / >   Public Types inherited from < a class = "el" href = "structfaiss_1_1InvertedLists.html" > faiss::InvertedLists< / a > < / td > < / tr >
< tr class = "memitem:a2bb406f72dcad45cf03974ff14bfa473 inherit pub_types_structfaiss_1_1InvertedLists" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a2bb406f72dcad45cf03974ff14bfa473" > < / a >
2019-05-28 22:17:22 +08:00
typedef < a class = "el" href = "structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea" > Index::idx_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < b > idx_t< / b > < / td > < / tr >
2018-02-23 23:44:31 +08:00
< tr class = "separator:a2bb406f72dcad45cf03974ff14bfa473 inherit pub_types_structfaiss_1_1InvertedLists" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > On-disk storage of inverted lists.< / p >
< p > The data is stored in a mmapped chunk of memory (base ptointer ptr, size totsize). Each list is a range of memory that contains (object < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists_1_1List.html" > List< / a > ) that contains:< / p >
< ul >
< li > uint8_t codes[capacity * code_size]< / li >
< li > followed by idx_t ids[capacity]< / li >
< / ul >
< p > in each of the arrays, the size < = capacity first elements are used, the rest is not initialized.< / p >
< p > Addition and resize are supported by:< / p >
< ul >
< li > roundind up the capacity of the lists to a power of two< / li >
< li > maintaining a list of empty slots, sorted by size.< / li >
< li > resizing the mmapped block is adjusted as needed.< / li >
< / ul >
< p > An < a class = "el" href = "structfaiss_1_1OnDiskInvertedLists.html" > OnDiskInvertedLists< / a > is compact if the size == capacity for all lists and there are no available slots.< / p >
2018-12-20 00:48:35 +08:00
< p > Addition to the invlists is slow. For incremental add it is better to use a default < a class = "el" href = "structfaiss_1_1ArrayInvertedLists.html" title = "simple (default) implementation as an array of inverted lists " > ArrayInvertedLists< / a > object and convert it to an OnDisk with merge_from.< / p >
2018-02-23 23:44:31 +08:00
< p > When it is known that a set of lists will be accessed, it is useful to call prefetch_lists, that launches a set of threads to read the lists in parallel. < / p >
2019-05-28 22:17:22 +08:00
< p > Definition at line < a class = "el" href = "OnDiskInvertedLists_8h_source.html#l00051" > 51< / a > of file < a class = "el" href = "OnDiskInvertedLists_8h_source.html" > OnDiskInvertedLists.h< / a > .< / p >
2018-02-23 23:44:31 +08:00
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
< a class = "anchor" id = "a1695e1d8d64a00e8e5f57ebf2210cb87" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > const uint8_t * faiss::OnDiskInvertedLists::get_codes < / td >
< td > (< / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > list_no< / em > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2018-12-20 00:48:35 +08:00
< p > get the codes for an inverted list must be released by release_codes< / p >
2018-02-23 23:44:31 +08:00
< dl class = "section return" > < dt > Returns< / dt > < dd > codes size list_size * code_size < / dd > < / dl >
< p > Implements < a class = "el" href = "structfaiss_1_1InvertedLists.html#a60b12f9efe940b617a8380adceef4032" > faiss::InvertedLists< / a > .< / p >
2019-05-28 22:17:22 +08:00
< p > Definition at line < a class = "el" href = "OnDiskInvertedLists_8cpp_source.html#l00404" > 404< / a > of file < a class = "el" href = "OnDiskInvertedLists_8cpp_source.html" > OnDiskInvertedLists.cpp< / a > .< / p >
2018-02-23 23:44:31 +08:00
< / div >
< / div >
< a class = "anchor" id = "ae54e7c6abc10c3d59ea3cd1113466957" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
2019-05-28 22:17:22 +08:00
< td class = "memname" > const < a class = "el" href = "structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea" > Index::idx_t< / a > * faiss::OnDiskInvertedLists::get_ids < / td >
2018-02-23 23:44:31 +08:00
< td > (< / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > list_no< / em > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
2018-12-20 00:48:35 +08:00
< p > get the ids for an inverted list must be released by release_ids< / p >
2018-02-23 23:44:31 +08:00
< dl class = "section return" > < dt > Returns< / dt > < dd > ids size list_size < / dd > < / dl >
< p > Implements < a class = "el" href = "structfaiss_1_1InvertedLists.html#a3ab6b389d8d85c5fbf23889064df7e95" > faiss::InvertedLists< / a > .< / p >
2019-05-28 22:17:22 +08:00
< p > Definition at line < a class = "el" href = "OnDiskInvertedLists_8cpp_source.html#l00413" > 413< / a > of file < a class = "el" href = "OnDiskInvertedLists_8cpp_source.html" > OnDiskInvertedLists.cpp< / a > .< / p >
2018-02-23 23:44:31 +08:00
< / div >
< / div >
2019-05-28 22:17:22 +08:00
< a class = "anchor" id = "a04ad61e3a23ced0aea032bf1e699436d" > < / a >
2018-02-23 23:44:31 +08:00
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::OnDiskInvertedLists::prefetch_lists < / td >
< td > (< / td >
2019-05-28 22:17:22 +08:00
< td class = "paramtype" > const idx_t *  < / td >
2018-02-23 23:44:31 +08:00
< td class = "paramname" > < em > list_nos< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > nlist< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > prepare the following lists (default does nothing) a list can be -1 hence the signed long < / p >
2019-05-28 22:17:22 +08:00
< p > Reimplemented from < a class = "el" href = "structfaiss_1_1InvertedLists.html#ac537aa14d2731c0ff907169211389b76" > faiss::InvertedLists< / a > .< / p >
2018-02-23 23:44:31 +08:00
2019-05-28 22:17:22 +08:00
< p > Definition at line < a class = "el" href = "OnDiskInvertedLists_8cpp_source.html#l00260" > 260< / a > of file < a class = "el" href = "OnDiskInvertedLists_8cpp_source.html" > OnDiskInvertedLists.cpp< / a > .< / p >
2018-02-23 23:44:31 +08:00
< / div >
< / div >
< hr / > The documentation for this struct was generated from the following files:< ul >
2019-05-28 22:17:22 +08:00
< li > /data/users/hoss/faiss/< a class = "el" href = "OnDiskInvertedLists_8h_source.html" > OnDiskInvertedLists.h< / a > < / li >
< li > /data/users/hoss/faiss/< a class = "el" href = "OnDiskInvertedLists_8cpp_source.html" > OnDiskInvertedLists.cpp< / a > < / li >
2018-02-23 23:44:31 +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 >