2017-02-23 06:26:44 +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::StackDeviceMemory 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_1StackDeviceMemory.html" > StackDeviceMemory< / 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 = "#pro-methods" > Protected Member Functions< / a > |
< a href = "#pro-attribs" > Protected Attributes< / a > |
< a href = "classfaiss_1_1gpu_1_1StackDeviceMemory-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::gpu::StackDeviceMemory Class Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < code > #include < < a class = "el" href = "StackDeviceMemory_8h_source.html" > StackDeviceMemory.h< / a > > < / code > < / p >
< div class = "dynheader" >
Inheritance diagram for faiss::gpu::StackDeviceMemory:< / div >
< div class = "dyncontent" >
< div class = "center" >
< img src = "classfaiss_1_1gpu_1_1StackDeviceMemory.png" usemap = "#faiss::gpu::StackDeviceMemory_map" alt = "" / >
< map id = "faiss::gpu::StackDeviceMemory_map" name = "faiss::gpu::StackDeviceMemory_map" >
< area href = "classfaiss_1_1gpu_1_1DeviceMemory.html" title = "Manages temporary memory allocations on a GPU device. " alt = "faiss::gpu::DeviceMemory" shape = "rect" coords = "0,0,188,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_1gpu_1_1StackDeviceMemory_1_1Range.html" > Range< / 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_1gpu_1_1StackDeviceMemory_1_1Stack.html" > Stack< / 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:a130f900c32ba91ae1f872c7ee506a93e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a130f900c32ba91ae1f872c7ee506a93e" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#a130f900c32ba91ae1f872c7ee506a93e" > StackDeviceMemory< / a > (int device, size_t allocPerDevice)< / td > < / tr >
< tr class = "memdesc:a130f900c32ba91ae1f872c7ee506a93e" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Allocate a new region of memory that we manage. < br / > < / td > < / tr >
< tr class = "separator:a130f900c32ba91ae1f872c7ee506a93e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:afd7a84b8cd1f747d873cdd1ab07e8a4b" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#afd7a84b8cd1f747d873cdd1ab07e8a4b" > StackDeviceMemory< / a > (int device, void *p, size_t size, bool isOwner)< / td > < / tr >
< tr class = "separator:afd7a84b8cd1f747d873cdd1ab07e8a4b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab9dac6d8953630121f60fb804599f648" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ab9dac6d8953630121f60fb804599f648" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#ab9dac6d8953630121f60fb804599f648" > getDevice< / a > () const override< / td > < / tr >
< tr class = "memdesc:ab9dac6d8953630121f60fb804599f648" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the device we are managing memory for. < br / > < / td > < / tr >
< tr class = "separator:ab9dac6d8953630121f60fb804599f648" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a9d9a5dcdb2d016cf00d14b8831db638b" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "el" href = "classfaiss_1_1gpu_1_1DeviceMemoryReservation.html" > DeviceMemoryReservation< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#a9d9a5dcdb2d016cf00d14b8831db638b" > getMemory< / a > (cudaStream_t stream, size_t size) override< / td > < / tr >
< tr class = "separator:a9d9a5dcdb2d016cf00d14b8831db638b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a66e82485ab7a89be137f85a82ea94fd0" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a66e82485ab7a89be137f85a82ea94fd0" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#a66e82485ab7a89be137f85a82ea94fd0" > getSizeAvailable< / a > () const override< / td > < / tr >
< tr class = "memdesc:a66e82485ab7a89be137f85a82ea94fd0" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns the current size available without calling cudaMalloc. < br / > < / td > < / tr >
< tr class = "separator:a66e82485ab7a89be137f85a82ea94fd0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae4fab99808556307b17241c45503a4b0" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae4fab99808556307b17241c45503a4b0" > < / a >
std::string  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#ae4fab99808556307b17241c45503a4b0" > toString< / a > () const override< / td > < / tr >
< tr class = "memdesc:ae4fab99808556307b17241c45503a4b0" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Returns a string containing our current memory manager state. < br / > < / td > < / tr >
< tr class = "separator:ae4fab99808556307b17241c45503a4b0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad1659533968bccdb288b1682e7feb234" > < td class = "memItemLeft" align = "right" valign = "top" > size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#ad1659533968bccdb288b1682e7feb234" > getHighWaterCudaMalloc< / a > () const override< / td > < / tr >
< tr class = "separator:ad1659533968bccdb288b1682e7feb234" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pro-methods" > < / a >
Protected Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a90d71c070c01e655f8cc877bb1d9a884" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a90d71c070c01e655f8cc877bb1d9a884" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > returnAllocation< / b > (< a class = "el" href = "classfaiss_1_1gpu_1_1DeviceMemoryReservation.html" > DeviceMemoryReservation< / a > & m) override< / td > < / tr >
< tr class = "separator:a90d71c070c01e655f8cc877bb1d9a884" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pro-attribs" > < / a >
Protected Attributes< / h2 > < / td > < / tr >
< tr class = "memitem:ac54f49a3be6b7fe4f1fc70094075d875" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ac54f49a3be6b7fe4f1fc70094075d875" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#ac54f49a3be6b7fe4f1fc70094075d875" > device_< / a > < / td > < / tr >
< tr class = "memdesc:ac54f49a3be6b7fe4f1fc70094075d875" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Our device. < br / > < / td > < / tr >
< tr class = "separator:ac54f49a3be6b7fe4f1fc70094075d875" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a323a632f397eaf3df3034595762c6a29" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a323a632f397eaf3df3034595762c6a29" > < / a >
< a class = "el" href = "structfaiss_1_1gpu_1_1StackDeviceMemory_1_1Stack.html" > Stack< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "classfaiss_1_1gpu_1_1StackDeviceMemory.html#a323a632f397eaf3df3034595762c6a29" > stack_< / a > < / td > < / tr >
< tr class = "memdesc:a323a632f397eaf3df3034595762c6a29" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Memory stack. < br / > < / td > < / tr >
< tr class = "separator:a323a632f397eaf3df3034595762c6a29" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Device memory manager that provides temporary memory allocations out of a region of memory < / p >
2017-06-21 21:54:28 +08:00
< p > Definition at line < a class = "el" href = "StackDeviceMemory_8h_source.html#l00022" > 22< / a > of file < a class = "el" href = "StackDeviceMemory_8h_source.html" > StackDeviceMemory.h< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div > < h2 class = "groupheader" > Constructor & Destructor Documentation< / h2 >
< a class = "anchor" id = "afd7a84b8cd1f747d873cdd1ab07e8a4b" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > faiss::gpu::StackDeviceMemory::StackDeviceMemory < / td >
< td > (< / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > device< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > void *  < / td >
< td class = "paramname" > < em > p< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > size< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > isOwner< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Manage a region of memory for a particular device, with or without ownership < / p >
2017-06-21 21:54:28 +08:00
< p > Definition at line < a class = "el" href = "StackDeviceMemory_8cpp_source.html#l00185" > 185< / a > of file < a class = "el" href = "StackDeviceMemory_8cpp_source.html" > StackDeviceMemory.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< h2 class = "groupheader" > Member Function Documentation< / h2 >
< a class = "anchor" id = "ad1659533968bccdb288b1682e7feb234" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > size_t faiss::gpu::StackDeviceMemory::getHighWaterCudaMalloc < / td >
< td > (< / td >
< td class = "paramname" > < / 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 > Returns the high-water mark of cudaMalloc allocations for our device < / p >
< p > Implements < a class = "el" href = "classfaiss_1_1gpu_1_1DeviceMemory.html#a908f5dad096de49eed81af60258c4655" > faiss::gpu::DeviceMemory< / a > .< / p >
2017-06-21 21:54:28 +08:00
< p > Definition at line < a class = "el" href = "StackDeviceMemory_8cpp_source.html#l00223" > 223< / a > of file < a class = "el" href = "StackDeviceMemory_8cpp_source.html" > StackDeviceMemory.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "a9d9a5dcdb2d016cf00d14b8831db638b" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > < a class = "el" href = "classfaiss_1_1gpu_1_1DeviceMemoryReservation.html" > DeviceMemoryReservation< / a > faiss::gpu::StackDeviceMemory::getMemory < / td >
< td > (< / td >
< td class = "paramtype" > cudaStream_t  < / td >
< td class = "paramname" > < em > stream< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > size< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / 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 > Obtains a temporary memory allocation for our device, whose usage is ordered with respect to the given stream. < / p >
< p > Implements < a class = "el" href = "classfaiss_1_1gpu_1_1DeviceMemory.html#a4adf60b9a0561e6319aa5cb7f42558d7" > faiss::gpu::DeviceMemory< / a > .< / p >
2017-06-21 21:54:28 +08:00
< p > Definition at line < a class = "el" href = "StackDeviceMemory_8cpp_source.html#l00200" > 200< / a > of file < a class = "el" href = "StackDeviceMemory_8cpp_source.html" > StackDeviceMemory.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< hr / > The documentation for this class was generated from the following files:< ul >
2017-03-21 01:33:21 +08:00
< li > /data/users/matthijs/github_faiss/faiss/gpu/utils/< a class = "el" href = "StackDeviceMemory_8h_source.html" > StackDeviceMemory.h< / a > < / li >
< li > /data/users/matthijs/github_faiss/faiss/gpu/utils/< a class = "el" href = "StackDeviceMemory_8cpp_source.html" > StackDeviceMemory.cpp< / a > < / li >
2017-02-23 06:26:44 +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 >