Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: RefTensorHandle Class Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('classarmnn_1_1_ref_tensor_handle.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#pub-methods">Public Member Functions</a> | |
| 85 | <a href="classarmnn_1_1_ref_tensor_handle-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">RefTensorHandle Class Reference</div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for RefTensorHandle:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1_ref_tensor_handle.png" usemap="#RefTensorHandle_map" alt=""/> |
| 97 | <map id="RefTensorHandle_map" name="RefTensorHandle_map"> |
| 98 | <area href="classarmnn_1_1_i_tensor_handle.html" alt="ITensorHandle" shape="rect" coords="0,0,110,24"/> |
| 99 | </map> |
| 100 | </div></div> |
| 101 | <table class="memberdecls"> |
| 102 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 103 | Public Member Functions</h2></td></tr> |
| 104 | <tr class="memitem:a510db81e4993428cb96a9841a7c4eab7"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a510db81e4993428cb96a9841a7c4eab7">RefTensorHandle</a> (const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> &tensorInfo, std::shared_ptr< <a class="el" href="classarmnn_1_1_ref_memory_manager.html">RefMemoryManager</a> > &memoryManager)</td></tr> |
| 105 | <tr class="separator:a510db81e4993428cb96a9841a7c4eab7"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:a12f67e38708e4226dd63f7dfd8d2116c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a12f67e38708e4226dd63f7dfd8d2116c">RefTensorHandle</a> (const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> &tensorInfo, std::shared_ptr< <a class="el" href="classarmnn_1_1_ref_memory_manager.html">RefMemoryManager</a> > &memoryManager, <a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> importFlags)</td></tr> |
| 107 | <tr class="separator:a12f67e38708e4226dd63f7dfd8d2116c"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:a769131890e3759a1e42257e201a5a12f"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a769131890e3759a1e42257e201a5a12f">~RefTensorHandle</a> ()</td></tr> |
| 109 | <tr class="separator:a769131890e3759a1e42257e201a5a12f"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:aca21728cdaa75f9d656d25ae7200ade5"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#aca21728cdaa75f9d656d25ae7200ade5">Manage</a> () override</td></tr> |
| 111 | <tr class="separator:aca21728cdaa75f9d656d25ae7200ade5"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a8518772c5d692e334a76617582b10b92"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a8518772c5d692e334a76617582b10b92">Allocate</a> () override</td></tr> |
| 113 | <tr class="separator:a8518772c5d692e334a76617582b10b92"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:ab6c52b35388890f2c563afbebfb456a6"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classarmnn_1_1_i_tensor_handle.html">ITensorHandle</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#ab6c52b35388890f2c563afbebfb456a6">GetParent</a> () const override</td></tr> |
| 115 | <tr class="separator:ab6c52b35388890f2c563afbebfb456a6"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="memitem:adc70d69d2748d1432e4999d4af361f3b"><td class="memItemLeft" align="right" valign="top">virtual const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#adc70d69d2748d1432e4999d4af361f3b">Map</a> (bool) const override</td></tr> |
| 117 | <tr class="separator:adc70d69d2748d1432e4999d4af361f3b"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a88ab6decf78c152e746b7d8dc2dd931f"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a88ab6decf78c152e746b7d8dc2dd931f">Unmap</a> () const override</td></tr> |
| 119 | <tr class="memdesc:a88ab6decf78c152e746b7d8dc2dd931f"><td class="mdescLeft"> </td><td class="mdescRight">Unmap the tensor data. <a href="#a88ab6decf78c152e746b7d8dc2dd931f">More...</a><br /></td></tr> |
| 120 | <tr class="separator:a88ab6decf78c152e746b7d8dc2dd931f"><td class="memSeparator" colspan="2"> </td></tr> |
| 121 | <tr class="memitem:a967f220393d291f71dabce0c06bf9b6c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a967f220393d291f71dabce0c06bf9b6c">GetStrides</a> () const override</td></tr> |
| 122 | <tr class="separator:a967f220393d291f71dabce0c06bf9b6c"><td class="memSeparator" colspan="2"> </td></tr> |
| 123 | <tr class="memitem:a8e8d2fbabcac19f9e12779080ddff54e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a8e8d2fbabcac19f9e12779080ddff54e">GetShape</a> () const override</td></tr> |
| 124 | <tr class="separator:a8e8d2fbabcac19f9e12779080ddff54e"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | <tr class="memitem:a66e8f43a5b42b500871ed96e15419567"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#a66e8f43a5b42b500871ed96e15419567">GetTensorInfo</a> () const</td></tr> |
| 126 | <tr class="separator:a66e8f43a5b42b500871ed96e15419567"><td class="memSeparator" colspan="2"> </td></tr> |
| 127 | <tr class="memitem:ada8abaac0e81a715dedadf76aaadcbac"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#ada8abaac0e81a715dedadf76aaadcbac">GetImportFlags</a> () const override</td></tr> |
| 128 | <tr class="memdesc:ada8abaac0e81a715dedadf76aaadcbac"><td class="mdescLeft"> </td><td class="mdescRight">Get flags describing supported import sources. <a href="#ada8abaac0e81a715dedadf76aaadcbac">More...</a><br /></td></tr> |
| 129 | <tr class="separator:ada8abaac0e81a715dedadf76aaadcbac"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <tr class="memitem:ab1766bd9f6a7902c5806178f3fd68f0b"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html#ab1766bd9f6a7902c5806178f3fd68f0b">Import</a> (void *memory, <a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488">MemorySource</a> source) override</td></tr> |
| 131 | <tr class="separator:ab1766bd9f6a7902c5806178f3fd68f0b"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | <tr class="inherit_header pub_methods_classarmnn_1_1_i_tensor_handle"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_1_1_i_tensor_handle')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_1_1_i_tensor_handle.html">ITensorHandle</a></td></tr> |
| 133 | <tr class="memitem:aff95f063e2b8041b3d0e4b4dc0e3821d inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_tensor_handle.html#aff95f063e2b8041b3d0e4b4dc0e3821d">~ITensorHandle</a> ()</td></tr> |
| 134 | <tr class="separator:aff95f063e2b8041b3d0e4b4dc0e3821d inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | <tr class="memitem:a270c8f844df649b9b0599c1e4db44cd3 inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_tensor_handle.html#a270c8f844df649b9b0599c1e4db44cd3">Map</a> (bool blocking=<a class="el" href="_ref_layer_tests_8cpp.html#a37f1c3ccc9fc906be85185350dd83d48">true</a>)</td></tr> |
| 136 | <tr class="separator:a270c8f844df649b9b0599c1e4db44cd3 inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:ab2be1412c91842a072ad94759f52033e inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_i_tensor_handle.html#ab2be1412c91842a072ad94759f52033e">Unmap</a> ()</td></tr> |
| 138 | <tr class="memdesc:ab2be1412c91842a072ad94759f52033e inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="mdescLeft"> </td><td class="mdescRight">Unmap the tensor data that was previously mapped with call to <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a9afbc055a017adf1bc38ee137bca6e90">Map()</a>. <a href="classarmnn_1_1_i_tensor_handle.html#ab2be1412c91842a072ad94759f52033e">More...</a><br /></td></tr> |
| 139 | <tr class="separator:ab2be1412c91842a072ad94759f52033e inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | </table> |
| 141 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 142 | <div class="textblock"> |
| 143 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00015">15</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 144 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 145 | <a id="a510db81e4993428cb96a9841a7c4eab7"></a> |
| 146 | <h2 class="memtitle"><span class="permalink"><a href="#a510db81e4993428cb96a9841a7c4eab7">◆ </a></span>RefTensorHandle() <span class="overload">[1/2]</span></h2> |
| 147 | |
| 148 | <div class="memitem"> |
| 149 | <div class="memproto"> |
| 150 | <table class="memname"> |
| 151 | <tr> |
| 152 | <td class="memname"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html">RefTensorHandle</a> </td> |
| 153 | <td>(</td> |
| 154 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td> |
| 155 | <td class="paramname"><em>tensorInfo</em>, </td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td class="paramkey"></td> |
| 159 | <td></td> |
| 160 | <td class="paramtype">std::shared_ptr< <a class="el" href="classarmnn_1_1_ref_memory_manager.html">RefMemoryManager</a> > & </td> |
| 161 | <td class="paramname"><em>memoryManager</em> </td> |
| 162 | </tr> |
| 163 | <tr> |
| 164 | <td></td> |
| 165 | <td>)</td> |
| 166 | <td></td><td></td> |
| 167 | </tr> |
| 168 | </table> |
| 169 | </div><div class="memdoc"> |
| 170 | |
| 171 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00010">10</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 172 | |
| 173 | <p class="reference">Referenced by <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00055">RefTensorHandle::GetImportFlags()</a>.</p> |
| 174 | <div class="fragment"><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  :</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  m_TensorInfo(tensorInfo),</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  m_MemoryManager(memoryManager),</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  m_Pool(<span class="keyword">nullptr</span>),</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  m_UnmanagedMemory(<span class="keyword">nullptr</span>),</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  m_ImportFlags(static_cast<MemorySourceFlags>(<a class="code" href="namespacearmnn.html#ae2f04a162585c0a5222a537efd5456aeaec0fc0100c4fc1ce4eea230c3dc10360">MemorySource::Undefined</a>)),</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  m_Imported(<span class="keyword">false</span>)</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> }</div><div class="ttc" id="namespacearmnn_html_ae2f04a162585c0a5222a537efd5456aeaec0fc0100c4fc1ce4eea230c3dc10360"><div class="ttname"><a href="namespacearmnn.html#ae2f04a162585c0a5222a537efd5456aeaec0fc0100c4fc1ce4eea230c3dc10360">armnn::Compute::Undefined</a></div></div> |
| 175 | </div><!-- fragment --> |
| 176 | </div> |
| 177 | </div> |
| 178 | <a id="a12f67e38708e4226dd63f7dfd8d2116c"></a> |
| 179 | <h2 class="memtitle"><span class="permalink"><a href="#a12f67e38708e4226dd63f7dfd8d2116c">◆ </a></span>RefTensorHandle() <span class="overload">[2/2]</span></h2> |
| 180 | |
| 181 | <div class="memitem"> |
| 182 | <div class="memproto"> |
| 183 | <table class="memname"> |
| 184 | <tr> |
| 185 | <td class="memname"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html">RefTensorHandle</a> </td> |
| 186 | <td>(</td> |
| 187 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td> |
| 188 | <td class="paramname"><em>tensorInfo</em>, </td> |
| 189 | </tr> |
| 190 | <tr> |
| 191 | <td class="paramkey"></td> |
| 192 | <td></td> |
| 193 | <td class="paramtype">std::shared_ptr< <a class="el" href="classarmnn_1_1_ref_memory_manager.html">RefMemoryManager</a> > & </td> |
| 194 | <td class="paramname"><em>memoryManager</em>, </td> |
| 195 | </tr> |
| 196 | <tr> |
| 197 | <td class="paramkey"></td> |
| 198 | <td></td> |
| 199 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> </td> |
| 200 | <td class="paramname"><em>importFlags</em> </td> |
| 201 | </tr> |
| 202 | <tr> |
| 203 | <td></td> |
| 204 | <td>)</td> |
| 205 | <td></td><td></td> |
| 206 | </tr> |
| 207 | </table> |
| 208 | </div><div class="memdoc"> |
| 209 | |
| 210 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00021">21</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 211 | <div class="fragment"><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  : m_TensorInfo(tensorInfo),</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  m_MemoryManager(memoryManager),</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  m_Pool(<span class="keyword">nullptr</span>),</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  m_UnmanagedMemory(<span class="keyword">nullptr</span>),</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  m_ImportFlags(importFlags),</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  m_Imported(<span class="keyword">false</span>)</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> }</div></div><!-- fragment --> |
| 212 | </div> |
| 213 | </div> |
| 214 | <a id="a769131890e3759a1e42257e201a5a12f"></a> |
| 215 | <h2 class="memtitle"><span class="permalink"><a href="#a769131890e3759a1e42257e201a5a12f">◆ </a></span>~RefTensorHandle()</h2> |
| 216 | |
| 217 | <div class="memitem"> |
| 218 | <div class="memproto"> |
| 219 | <table class="memname"> |
| 220 | <tr> |
| 221 | <td class="memname">~<a class="el" href="classarmnn_1_1_ref_tensor_handle.html">RefTensorHandle</a> </td> |
| 222 | <td>(</td> |
| 223 | <td class="paramname"></td><td>)</td> |
| 224 | <td></td> |
| 225 | </tr> |
| 226 | </table> |
| 227 | </div><div class="memdoc"> |
| 228 | |
| 229 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00033">33</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 230 | <div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">if</span> (!m_Pool)</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="comment">// unmanaged</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keywordflow">if</span> (!m_Imported)</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  {</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  ::operator <span class="keyword">delete</span>(m_UnmanagedMemory);</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  }</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  }</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> }</div></div><!-- fragment --> |
| 231 | </div> |
| 232 | </div> |
| 233 | <h2 class="groupheader">Member Function Documentation</h2> |
| 234 | <a id="a8518772c5d692e334a76617582b10b92"></a> |
| 235 | <h2 class="memtitle"><span class="permalink"><a href="#a8518772c5d692e334a76617582b10b92">◆ </a></span>Allocate()</h2> |
| 236 | |
| 237 | <div class="memitem"> |
| 238 | <div class="memproto"> |
| 239 | <table class="mlabels"> |
| 240 | <tr> |
| 241 | <td class="mlabels-left"> |
| 242 | <table class="memname"> |
| 243 | <tr> |
| 244 | <td class="memname">void Allocate </td> |
| 245 | <td>(</td> |
| 246 | <td class="paramname"></td><td>)</td> |
| 247 | <td></td> |
| 248 | </tr> |
| 249 | </table> |
| 250 | </td> |
| 251 | <td class="mlabels-right"> |
| 252 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 253 | </tr> |
| 254 | </table> |
| 255 | </div><div class="memdoc"> |
| 256 | <p>Indicate to the memory manager that this resource is no longer active. This is used to compute overlapping lifetimes of resources. </p> |
| 257 | |
| 258 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a5cceed8b707a09bf27eb61f17acf8a88">ITensorHandle</a>.</p> |
| 259 | |
| 260 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00053">53</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 261 | |
| 262 | <p class="reference">References <a class="el" href="_tensor_8cpp_source.html#l00213">TensorInfo::GetNumBytes()</a>.</p> |
| 263 | <div class="fragment"><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> {</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">if</span> (!m_UnmanagedMemory)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">if</span> (!m_Pool)</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  {</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="comment">// unmanaged</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  m_UnmanagedMemory = ::operator <span class="keyword">new</span>(m_TensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#abcbdfb544ece4c31d0b37715ad0f3be0">GetNumBytes</a>());</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  }</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  m_MemoryManager->Allocate(m_Pool);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  }</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">throw</span> InvalidArgumentException(<span class="stringliteral">"RefTensorHandle::Allocate Trying to allocate a RefTensorHandle"</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="stringliteral">"that already has allocated memory."</span>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_abcbdfb544ece4c31d0b37715ad0f3be0"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#abcbdfb544ece4c31d0b37715ad0f3be0">armnn::TensorInfo::GetNumBytes</a></div><div class="ttdeci">unsigned int GetNumBytes() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.html#l00213">Tensor.cpp:213</a></div></div> |
| 264 | </div><!-- fragment --> |
| 265 | </div> |
| 266 | </div> |
| 267 | <a id="ada8abaac0e81a715dedadf76aaadcbac"></a> |
| 268 | <h2 class="memtitle"><span class="permalink"><a href="#ada8abaac0e81a715dedadf76aaadcbac">◆ </a></span>GetImportFlags()</h2> |
| 269 | |
| 270 | <div class="memitem"> |
| 271 | <div class="memproto"> |
| 272 | <table class="mlabels"> |
| 273 | <tr> |
| 274 | <td class="mlabels-left"> |
| 275 | <table class="memname"> |
| 276 | <tr> |
| 277 | <td class="memname">virtual <a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> GetImportFlags </td> |
| 278 | <td>(</td> |
| 279 | <td class="paramname"></td><td>)</td> |
| 280 | <td> const</td> |
| 281 | </tr> |
| 282 | </table> |
| 283 | </td> |
| 284 | <td class="mlabels-right"> |
| 285 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 286 | </tr> |
| 287 | </table> |
| 288 | </div><div class="memdoc"> |
| 289 | |
| 290 | <p>Get flags describing supported import sources. </p> |
| 291 | |
| 292 | <p>Reimplemented from <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a55cddc2dbb32d680cd85b635ba370e48">ITensorHandle</a>.</p> |
| 293 | |
| 294 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00055">55</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 295 | |
| 296 | <p class="reference">References <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00106">RefTensorHandle::Import()</a>, and <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00010">RefTensorHandle::RefTensorHandle()</a>.</p> |
| 297 | <div class="fragment"><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keywordflow">return</span> m_ImportFlags;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div></div><!-- fragment --> |
| 298 | </div> |
| 299 | </div> |
| 300 | <a id="ab6c52b35388890f2c563afbebfb456a6"></a> |
| 301 | <h2 class="memtitle"><span class="permalink"><a href="#ab6c52b35388890f2c563afbebfb456a6">◆ </a></span>GetParent()</h2> |
| 302 | |
| 303 | <div class="memitem"> |
| 304 | <div class="memproto"> |
| 305 | <table class="mlabels"> |
| 306 | <tr> |
| 307 | <td class="mlabels-left"> |
| 308 | <table class="memname"> |
| 309 | <tr> |
| 310 | <td class="memname">virtual <a class="el" href="classarmnn_1_1_i_tensor_handle.html">ITensorHandle</a>* GetParent </td> |
| 311 | <td>(</td> |
| 312 | <td class="paramname"></td><td>)</td> |
| 313 | <td> const</td> |
| 314 | </tr> |
| 315 | </table> |
| 316 | </td> |
| 317 | <td class="mlabels-right"> |
| 318 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 319 | </tr> |
| 320 | </table> |
| 321 | </div><div class="memdoc"> |
| 322 | <p>Get the parent tensor if this is a subtensor. </p><dl class="section return"><dt>Returns</dt><dd>a pointer to the parent tensor. Otherwise nullptr if not a subtensor. </dd></dl> |
| 323 | |
| 324 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a437893b8dcf58a0b68b70e1ad7933be6">ITensorHandle</a>.</p> |
| 325 | |
| 326 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00029">29</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 327 | |
| 328 | <p class="reference">References <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00074">RefTensorHandle::Map()</a>, and <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a9afbc055a017adf1bc38ee137bca6e90">ITensorHandle::Map()</a>.</p> |
| 329 | <div class="fragment"><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="keywordflow">return</span> <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  }</div></div><!-- fragment --> |
| 330 | </div> |
| 331 | </div> |
| 332 | <a id="a8e8d2fbabcac19f9e12779080ddff54e"></a> |
| 333 | <h2 class="memtitle"><span class="permalink"><a href="#a8e8d2fbabcac19f9e12779080ddff54e">◆ </a></span>GetShape()</h2> |
| 334 | |
| 335 | <div class="memitem"> |
| 336 | <div class="memproto"> |
| 337 | <table class="mlabels"> |
| 338 | <tr> |
| 339 | <td class="mlabels-left"> |
| 340 | <table class="memname"> |
| 341 | <tr> |
| 342 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> GetShape </td> |
| 343 | <td>(</td> |
| 344 | <td class="paramname"></td><td>)</td> |
| 345 | <td> const</td> |
| 346 | </tr> |
| 347 | </table> |
| 348 | </td> |
| 349 | <td class="mlabels-right"> |
| 350 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 351 | </tr> |
| 352 | </table> |
| 353 | </div><div class="memdoc"> |
| 354 | <p>Get the number of elements for each dimension ordered from slowest iterating dimension to fastest iterating dimension. </p><dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> filled with the number of elements for each dimension. </dd></dl> |
| 355 | |
| 356 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#affd5aae75cad90f472f96cfd25a13f29">ITensorHandle</a>.</p> |
| 357 | |
| 358 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00045">45</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 359 | |
| 360 | <p class="reference">References <a class="el" href="_tensor_8hpp_source.html#l00088">TensorInfo::GetShape()</a>.</p> |
| 361 | <div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keywordflow">return</span> m_TensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>();</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00088">Tensor.hpp:88</a></div></div> |
| 362 | </div><!-- fragment --> |
| 363 | </div> |
| 364 | </div> |
| 365 | <a id="a967f220393d291f71dabce0c06bf9b6c"></a> |
| 366 | <h2 class="memtitle"><span class="permalink"><a href="#a967f220393d291f71dabce0c06bf9b6c">◆ </a></span>GetStrides()</h2> |
| 367 | |
| 368 | <div class="memitem"> |
| 369 | <div class="memproto"> |
| 370 | <table class="mlabels"> |
| 371 | <tr> |
| 372 | <td class="mlabels-left"> |
| 373 | <table class="memname"> |
| 374 | <tr> |
| 375 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> GetStrides </td> |
| 376 | <td>(</td> |
| 377 | <td class="paramname"></td><td>)</td> |
| 378 | <td> const</td> |
| 379 | </tr> |
| 380 | </table> |
| 381 | </td> |
| 382 | <td class="mlabels-right"> |
| 383 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 384 | </tr> |
| 385 | </table> |
| 386 | </div><div class="memdoc"> |
| 387 | <p>Get the strides for each dimension ordered from largest to smallest where the smallest value is the same as the size of a single element in the tensor. </p><dl class="section return"><dt>Returns</dt><dd>a <a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> filled with the strides for each dimension </dd></dl> |
| 388 | |
| 389 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a30c3e09ce55369b66469443a4ca5ef03">ITensorHandle</a>.</p> |
| 390 | |
| 391 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00040">40</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 392 | |
| 393 | <p class="reference">References <a class="el" href="_cpu_tensor_handle_8cpp_source.html#l00014">armnn::GetUnpaddedTensorStrides()</a>.</p> |
| 394 | <div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearmnn.html#a36e8f52330a21eeab3cc7c4e030f3583">GetUnpaddedTensorStrides</a>(m_TensorInfo);</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  }</div><div class="ttc" id="namespacearmnn_html_a36e8f52330a21eeab3cc7c4e030f3583"><div class="ttname"><a href="namespacearmnn.html#a36e8f52330a21eeab3cc7c4e030f3583">armnn::GetUnpaddedTensorStrides</a></div><div class="ttdeci">TensorShape GetUnpaddedTensorStrides(const TensorInfo &tensorInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_cpu_tensor_handle_8cpp_source.html#l00014">CpuTensorHandle.cpp:14</a></div></div> |
| 395 | </div><!-- fragment --> |
| 396 | </div> |
| 397 | </div> |
| 398 | <a id="a66e8f43a5b42b500871ed96e15419567"></a> |
| 399 | <h2 class="memtitle"><span class="permalink"><a href="#a66e8f43a5b42b500871ed96e15419567">◆ </a></span>GetTensorInfo()</h2> |
| 400 | |
| 401 | <div class="memitem"> |
| 402 | <div class="memproto"> |
| 403 | <table class="mlabels"> |
| 404 | <tr> |
| 405 | <td class="mlabels-left"> |
| 406 | <table class="memname"> |
| 407 | <tr> |
| 408 | <td class="memname">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a>& GetTensorInfo </td> |
| 409 | <td>(</td> |
| 410 | <td class="paramname"></td><td>)</td> |
| 411 | <td> const</td> |
| 412 | </tr> |
| 413 | </table> |
| 414 | </td> |
| 415 | <td class="mlabels-right"> |
| 416 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 417 | </tr> |
| 418 | </table> |
| 419 | </div><div class="memdoc"> |
| 420 | |
| 421 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00050">50</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 422 | |
| 423 | <p class="reference">Referenced by <a class="el" href="_ref_workload_utils_8hpp_source.html#l00025">armnn::GetTensorInfo()</a>.</p> |
| 424 | <div class="fragment"><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">return</span> m_TensorInfo;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  }</div></div><!-- fragment --> |
| 425 | </div> |
| 426 | </div> |
| 427 | <a id="ab1766bd9f6a7902c5806178f3fd68f0b"></a> |
| 428 | <h2 class="memtitle"><span class="permalink"><a href="#ab1766bd9f6a7902c5806178f3fd68f0b">◆ </a></span>Import()</h2> |
| 429 | |
| 430 | <div class="memitem"> |
| 431 | <div class="memproto"> |
| 432 | <table class="mlabels"> |
| 433 | <tr> |
| 434 | <td class="mlabels-left"> |
| 435 | <table class="memname"> |
| 436 | <tr> |
| 437 | <td class="memname">bool Import </td> |
| 438 | <td>(</td> |
| 439 | <td class="paramtype">void * </td> |
| 440 | <td class="paramname"><em>memory</em>, </td> |
| 441 | </tr> |
| 442 | <tr> |
| 443 | <td class="paramkey"></td> |
| 444 | <td></td> |
| 445 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488">MemorySource</a> </td> |
| 446 | <td class="paramname"><em>source</em> </td> |
| 447 | </tr> |
| 448 | <tr> |
| 449 | <td></td> |
| 450 | <td>)</td> |
| 451 | <td></td><td></td> |
| 452 | </tr> |
| 453 | </table> |
| 454 | </td> |
| 455 | <td class="mlabels-right"> |
| 456 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 457 | </tr> |
| 458 | </table> |
| 459 | </div><div class="memdoc"> |
| 460 | <p>Import externally allocated memory </p><dl class="params"><dt>Parameters</dt><dd> |
| 461 | <table class="params"> |
| 462 | <tr><td class="paramname">memory</td><td>base address of the memory being imported. </td></tr> |
| 463 | <tr><td class="paramname">source</td><td>source of the allocation for the memory being imported. </td></tr> |
| 464 | </table> |
| 465 | </dd> |
| 466 | </dl> |
| 467 | <dl class="section return"><dt>Returns</dt><dd>true on success or false on failure </dd></dl> |
| 468 | |
| 469 | <p>Reimplemented from <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a4f81a9eff30c9b9fe76f5b83af470ba7">ITensorHandle</a>.</p> |
| 470 | |
| 471 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00106">106</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 472 | |
| 473 | <p class="reference">References <a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">armnn::Malloc</a>.</p> |
| 474 | |
| 475 | <p class="reference">Referenced by <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00055">RefTensorHandle::GetImportFlags()</a>.</p> |
| 476 | <div class="fragment"><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> {</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keywordflow">if</span> (m_ImportFlags & static_cast<MemorySourceFlags>(source))</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="keywordflow">if</span> (source == <a class="code" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">MemorySource::Malloc</a>)</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  {</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="comment">// Check memory alignment</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  constexpr uintptr_t alignment = <span class="keyword">sizeof</span>(size_t);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordflow">if</span> (reinterpret_cast<uintptr_t>(memory) % alignment)</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">if</span> (m_Imported)</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  {</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  m_Imported = <span class="keyword">false</span>;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  m_UnmanagedMemory = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  }</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="comment">// m_UnmanagedMemory not yet allocated.</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">if</span> (!m_Imported && !m_UnmanagedMemory)</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  {</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  m_UnmanagedMemory = memory;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  m_Imported = <span class="keyword">true</span>;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> </div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="comment">// m_UnmanagedMemory initially allocated with Allocate().</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">if</span> (!m_Imported && m_UnmanagedMemory)</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> </div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="comment">// m_UnmanagedMemory previously imported.</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span> (m_Imported)</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  {</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  m_UnmanagedMemory = memory;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> }</div><div class="ttc" id="namespacearmnn_html_a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523"><div class="ttname"><a href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">armnn::MemorySource::Malloc</a></div></div> |
| 477 | </div><!-- fragment --> |
| 478 | </div> |
| 479 | </div> |
| 480 | <a id="aca21728cdaa75f9d656d25ae7200ade5"></a> |
| 481 | <h2 class="memtitle"><span class="permalink"><a href="#aca21728cdaa75f9d656d25ae7200ade5">◆ </a></span>Manage()</h2> |
| 482 | |
| 483 | <div class="memitem"> |
| 484 | <div class="memproto"> |
| 485 | <table class="mlabels"> |
| 486 | <tr> |
| 487 | <td class="mlabels-left"> |
| 488 | <table class="memname"> |
| 489 | <tr> |
| 490 | <td class="memname">void Manage </td> |
| 491 | <td>(</td> |
| 492 | <td class="paramname"></td><td>)</td> |
| 493 | <td></td> |
| 494 | </tr> |
| 495 | </table> |
| 496 | </td> |
| 497 | <td class="mlabels-right"> |
| 498 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 499 | </tr> |
| 500 | </table> |
| 501 | </div><div class="memdoc"> |
| 502 | <p>Indicate to the memory manager that this resource is active. This is used to compute overlapping lifetimes of resources. </p> |
| 503 | |
| 504 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a04149d0f9b9c54c05e95693111490daf">ITensorHandle</a>.</p> |
| 505 | |
| 506 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00045">45</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 507 | |
| 508 | <p class="reference">References <a class="el" href="_tensor_8cpp_source.html#l00213">TensorInfo::GetNumBytes()</a>.</p> |
| 509 | <div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  BOOST_ASSERT_MSG(!m_Pool, <span class="stringliteral">"RefTensorHandle::Manage() called twice"</span>);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  BOOST_ASSERT_MSG(!m_UnmanagedMemory, <span class="stringliteral">"RefTensorHandle::Manage() called after Allocate()"</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  m_Pool = m_MemoryManager->Manage(m_TensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#abcbdfb544ece4c31d0b37715ad0f3be0">GetNumBytes</a>());</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_abcbdfb544ece4c31d0b37715ad0f3be0"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#abcbdfb544ece4c31d0b37715ad0f3be0">armnn::TensorInfo::GetNumBytes</a></div><div class="ttdeci">unsigned int GetNumBytes() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.html#l00213">Tensor.cpp:213</a></div></div> |
| 510 | </div><!-- fragment --> |
| 511 | </div> |
| 512 | </div> |
| 513 | <a id="adc70d69d2748d1432e4999d4af361f3b"></a> |
| 514 | <h2 class="memtitle"><span class="permalink"><a href="#adc70d69d2748d1432e4999d4af361f3b">◆ </a></span>Map()</h2> |
| 515 | |
| 516 | <div class="memitem"> |
| 517 | <div class="memproto"> |
| 518 | <table class="mlabels"> |
| 519 | <tr> |
| 520 | <td class="mlabels-left"> |
| 521 | <table class="memname"> |
| 522 | <tr> |
| 523 | <td class="memname">const void * Map </td> |
| 524 | <td>(</td> |
| 525 | <td class="paramtype">bool </td> |
| 526 | <td class="paramname"><em>blocking</em></td><td>)</td> |
| 527 | <td> const</td> |
| 528 | </tr> |
| 529 | </table> |
| 530 | </td> |
| 531 | <td class="mlabels-right"> |
| 532 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 533 | </tr> |
| 534 | </table> |
| 535 | </div><div class="memdoc"> |
| 536 | <p>Map the tensor data for access. </p><dl class="params"><dt>Parameters</dt><dd> |
| 537 | <table class="params"> |
| 538 | <tr><td class="paramname">blocking</td><td>hint to block the calling thread until all other accesses are complete. (backend dependent) </td></tr> |
| 539 | </table> |
| 540 | </dd> |
| 541 | </dl> |
| 542 | <dl class="section return"><dt>Returns</dt><dd>pointer to the first element of the mapped data. </dd></dl> |
| 543 | |
| 544 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a9afbc055a017adf1bc38ee137bca6e90">ITensorHandle</a>.</p> |
| 545 | |
| 546 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8cpp_source.html#l00074">74</a> of file <a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a>.</p> |
| 547 | |
| 548 | <p class="reference">References <a class="el" href="_tensor_8cpp_source.html#l00213">TensorInfo::GetNumBytes()</a>.</p> |
| 549 | |
| 550 | <p class="reference">Referenced by <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00029">RefTensorHandle::GetParent()</a>.</p> |
| 551 | <div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordflow">return</span> GetPointer();</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> }</div></div><!-- fragment --> |
| 552 | </div> |
| 553 | </div> |
| 554 | <a id="a88ab6decf78c152e746b7d8dc2dd931f"></a> |
| 555 | <h2 class="memtitle"><span class="permalink"><a href="#a88ab6decf78c152e746b7d8dc2dd931f">◆ </a></span>Unmap()</h2> |
| 556 | |
| 557 | <div class="memitem"> |
| 558 | <div class="memproto"> |
| 559 | <table class="mlabels"> |
| 560 | <tr> |
| 561 | <td class="mlabels-left"> |
| 562 | <table class="memname"> |
| 563 | <tr> |
| 564 | <td class="memname">virtual void Unmap </td> |
| 565 | <td>(</td> |
| 566 | <td class="paramname"></td><td>)</td> |
| 567 | <td> const</td> |
| 568 | </tr> |
| 569 | </table> |
| 570 | </td> |
| 571 | <td class="mlabels-right"> |
| 572 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 573 | </tr> |
| 574 | </table> |
| 575 | </div><div class="memdoc"> |
| 576 | |
| 577 | <p>Unmap the tensor data. </p> |
| 578 | |
| 579 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a563609828050f1b3a7868c23f3365923">ITensorHandle</a>.</p> |
| 580 | |
| 581 | <p class="definition">Definition at line <a class="el" href="_ref_tensor_handle_8hpp_source.html#l00037">37</a> of file <a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a>.</p> |
| 582 | <div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  {}</div></div><!-- fragment --> |
| 583 | </div> |
| 584 | </div> |
| 585 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 586 | <li>src/backends/reference/<a class="el" href="_ref_tensor_handle_8hpp_source.html">RefTensorHandle.hpp</a></li> |
| 587 | <li>src/backends/reference/<a class="el" href="_ref_tensor_handle_8cpp_source.html">RefTensorHandle.cpp</a></li> |
| 588 | </ul> |
| 589 | </div><!-- contents --> |
| 590 | </div><!-- doc-content --> |
| 591 | <!-- start footer part --> |
| 592 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 593 | <ul> |
| 594 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_ref_tensor_handle.html">RefTensorHandle</a></li> |
| 595 | <li class="footer">Generated on Fri Mar 13 2020 16:07:05 for ArmNN by |
| 596 | <a href="http://www.doxygen.org/index.html"> |
| 597 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 598 | </ul> |
| 599 | </div> |
| 600 | </body> |
| 601 | </html> |