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: NeonTensorHandle 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_neon_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_neon_tensor_handle-members.html">List of all members</a> </div> |
| 86 | <div class="headertitle"> |
| 87 | <div class="title">NeonTensorHandle Class Reference</div> </div> |
| 88 | </div><!--header--> |
| 89 | <div class="contents"> |
| 90 | |
| 91 | <p><code>#include <<a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>></code></p> |
| 92 | <div class="dynheader"> |
| 93 | Inheritance diagram for NeonTensorHandle:</div> |
| 94 | <div class="dyncontent"> |
| 95 | <div class="center"> |
| 96 | <img src="classarmnn_1_1_neon_tensor_handle.png" usemap="#NeonTensorHandle_map" alt=""/> |
| 97 | <map id="NeonTensorHandle_map" name="NeonTensorHandle_map"> |
| 98 | <area href="classarmnn_1_1_i_acl_tensor_handle.html" alt="IAclTensorHandle" shape="rect" coords="0,56,121,80"/> |
| 99 | <area href="classarmnn_1_1_i_tensor_handle.html" alt="ITensorHandle" shape="rect" coords="0,0,121,24"/> |
| 100 | </map> |
| 101 | </div></div> |
| 102 | <table class="memberdecls"> |
| 103 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 104 | Public Member Functions</h2></td></tr> |
| 105 | <tr class="memitem:aec1964e898a1dfc9c6be2f5589c0ee33"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#aec1964e898a1dfc9c6be2f5589c0ee33">NeonTensorHandle</a> (const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> &tensorInfo)</td></tr> |
| 106 | <tr class="separator:aec1964e898a1dfc9c6be2f5589c0ee33"><td class="memSeparator" colspan="2"> </td></tr> |
| 107 | <tr class="memitem:a8be757c370ed96fdb90168e2ff0216d6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#a8be757c370ed96fdb90168e2ff0216d6">NeonTensorHandle</a> (const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> &tensorInfo, <a class="el" href="namespacearmnn.html#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> dataLayout, <a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> importFlags=static_cast< <a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> >(<a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">MemorySource::Malloc</a>))</td></tr> |
| 108 | <tr class="separator:a8be757c370ed96fdb90168e2ff0216d6"><td class="memSeparator" colspan="2"> </td></tr> |
| 109 | <tr class="memitem:ab18b27bb871248e2ba3120eb557dcfe4"><td class="memItemLeft" align="right" valign="top">arm_compute::ITensor & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#ab18b27bb871248e2ba3120eb557dcfe4">GetTensor</a> () override</td></tr> |
| 110 | <tr class="separator:ab18b27bb871248e2ba3120eb557dcfe4"><td class="memSeparator" colspan="2"> </td></tr> |
| 111 | <tr class="memitem:a6fde23d85d96f26ac7c33b69a945a922"><td class="memItemLeft" align="right" valign="top">arm_compute::ITensor const & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#a6fde23d85d96f26ac7c33b69a945a922">GetTensor</a> () const override</td></tr> |
| 112 | <tr class="separator:a6fde23d85d96f26ac7c33b69a945a922"><td class="memSeparator" colspan="2"> </td></tr> |
| 113 | <tr class="memitem:ac4c894e28b763523748ba2bb718d569d"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#ac4c894e28b763523748ba2bb718d569d">Allocate</a> () override</td></tr> |
| 114 | <tr class="separator:ac4c894e28b763523748ba2bb718d569d"><td class="memSeparator" colspan="2"> </td></tr> |
| 115 | <tr class="memitem:a19aa18d78d5ac31e3a3c8f782f0e8606"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#a19aa18d78d5ac31e3a3c8f782f0e8606">Manage</a> () override</td></tr> |
| 116 | <tr class="separator:a19aa18d78d5ac31e3a3c8f782f0e8606"><td class="memSeparator" colspan="2"> </td></tr> |
| 117 | <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_neon_tensor_handle.html#ab6c52b35388890f2c563afbebfb456a6">GetParent</a> () const override</td></tr> |
| 118 | <tr class="separator:ab6c52b35388890f2c563afbebfb456a6"><td class="memSeparator" colspan="2"> </td></tr> |
| 119 | <tr class="memitem:ad3e63bb560123889f1ec98e40c5f8279"><td class="memItemLeft" align="right" valign="top">virtual arm_compute::DataType </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#ad3e63bb560123889f1ec98e40c5f8279">GetDataType</a> () const override</td></tr> |
| 120 | <tr class="separator:ad3e63bb560123889f1ec98e40c5f8279"><td class="memSeparator" colspan="2"> </td></tr> |
| 121 | <tr class="memitem:af9c82a4633347a36ad10c8bfab384396"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#af9c82a4633347a36ad10c8bfab384396">SetMemoryGroup</a> (const std::shared_ptr< arm_compute::IMemoryGroup > &memoryGroup) override</td></tr> |
| 122 | <tr class="separator:af9c82a4633347a36ad10c8bfab384396"><td class="memSeparator" colspan="2"> </td></tr> |
| 123 | <tr class="memitem:acc3fcce7a100cc3b64247519f22e37fc"><td class="memItemLeft" align="right" valign="top">virtual const void * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#acc3fcce7a100cc3b64247519f22e37fc">Map</a> (bool) const override</td></tr> |
| 124 | <tr class="separator:acc3fcce7a100cc3b64247519f22e37fc"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | <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_neon_tensor_handle.html#a88ab6decf78c152e746b7d8dc2dd931f">Unmap</a> () const override</td></tr> |
| 126 | <tr class="memdesc:a88ab6decf78c152e746b7d8dc2dd931f"><td class="mdescLeft"> </td><td class="mdescRight">Unmap the tensor data. <a href="#a88ab6decf78c152e746b7d8dc2dd931f">More...</a><br /></td></tr> |
| 127 | <tr class="separator:a88ab6decf78c152e746b7d8dc2dd931f"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <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_neon_tensor_handle.html#a967f220393d291f71dabce0c06bf9b6c">GetStrides</a> () const override</td></tr> |
| 129 | <tr class="separator:a967f220393d291f71dabce0c06bf9b6c"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <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_neon_tensor_handle.html#a8e8d2fbabcac19f9e12779080ddff54e">GetShape</a> () const override</td></tr> |
| 131 | <tr class="separator:a8e8d2fbabcac19f9e12779080ddff54e"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | <tr class="memitem:acd3ddbebcda4124217925ae36d551441"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#acd3ddbebcda4124217925ae36d551441">SetImportFlags</a> (<a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> importFlags)</td></tr> |
| 133 | <tr class="separator:acd3ddbebcda4124217925ae36d551441"><td class="memSeparator" colspan="2"> </td></tr> |
| 134 | <tr class="memitem:aa1d3334a17a9f136fe65ed833fbf68b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#aa1d3334a17a9f136fe65ed833fbf68b4">GetImportFlags</a> () const override</td></tr> |
| 135 | <tr class="memdesc:aa1d3334a17a9f136fe65ed833fbf68b4"><td class="mdescLeft"> </td><td class="mdescRight">Get flags describing supported import sources. <a href="#aa1d3334a17a9f136fe65ed833fbf68b4">More...</a><br /></td></tr> |
| 136 | <tr class="separator:aa1d3334a17a9f136fe65ed833fbf68b4"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:a9b8adcb578eb6f9ad63c21b1fa43bb14"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#a9b8adcb578eb6f9ad63c21b1fa43bb14">SetImportEnabledFlag</a> (bool importEnabledFlag)</td></tr> |
| 138 | <tr class="separator:a9b8adcb578eb6f9ad63c21b1fa43bb14"><td class="memSeparator" colspan="2"> </td></tr> |
| 139 | <tr class="memitem:a468bf13728df2ac9ec772733047ff136"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html#a468bf13728df2ac9ec772733047ff136">Import</a> (void *memory, <a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488">MemorySource</a> source) override</td></tr> |
| 140 | <tr class="separator:a468bf13728df2ac9ec772733047ff136"><td class="memSeparator" colspan="2"> </td></tr> |
| 141 | <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> |
| 142 | <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> |
| 143 | <tr class="separator:aff95f063e2b8041b3d0e4b4dc0e3821d inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memSeparator" colspan="2"> </td></tr> |
| 144 | <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> |
| 145 | <tr class="separator:a270c8f844df649b9b0599c1e4db44cd3 inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memSeparator" colspan="2"> </td></tr> |
| 146 | <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> |
| 147 | <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> |
| 148 | <tr class="separator:ab2be1412c91842a072ad94759f52033e inherit pub_methods_classarmnn_1_1_i_tensor_handle"><td class="memSeparator" colspan="2"> </td></tr> |
| 149 | </table> |
| 150 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 151 | <div class="textblock"> |
| 152 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00024">24</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 153 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 154 | <a id="aec1964e898a1dfc9c6be2f5589c0ee33"></a> |
| 155 | <h2 class="memtitle"><span class="permalink"><a href="#aec1964e898a1dfc9c6be2f5589c0ee33">◆ </a></span>NeonTensorHandle() <span class="overload">[1/2]</span></h2> |
| 156 | |
| 157 | <div class="memitem"> |
| 158 | <div class="memproto"> |
| 159 | <table class="mlabels"> |
| 160 | <tr> |
| 161 | <td class="mlabels-left"> |
| 162 | <table class="memname"> |
| 163 | <tr> |
| 164 | <td class="memname"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html">NeonTensorHandle</a> </td> |
| 165 | <td>(</td> |
| 166 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td> |
| 167 | <td class="paramname"><em>tensorInfo</em></td><td>)</td> |
| 168 | <td></td> |
| 169 | </tr> |
| 170 | </table> |
| 171 | </td> |
| 172 | <td class="mlabels-right"> |
| 173 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 174 | </tr> |
| 175 | </table> |
| 176 | </div><div class="memdoc"> |
| 177 | |
| 178 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00027">27</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 179 | <div class="fragment"><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  : m_ImportFlags(static_cast<MemorySourceFlags>(<a class="code" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">MemorySource::Malloc</a>)),</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  m_Imported(<span class="keyword">false</span>),</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  m_IsImportEnabled(<span class="keyword">false</span>)</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  {</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  armnn::armcomputetensorutils::BuildArmComputeTensor(m_Tensor, tensorInfo);</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  }</div><div class="ttc" id="namespacearmnn_html_a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523"><div class="ttname"><a href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">armnn::MemorySource::Malloc</a></div></div> |
| 180 | </div><!-- fragment --> |
| 181 | </div> |
| 182 | </div> |
| 183 | <a id="a8be757c370ed96fdb90168e2ff0216d6"></a> |
| 184 | <h2 class="memtitle"><span class="permalink"><a href="#a8be757c370ed96fdb90168e2ff0216d6">◆ </a></span>NeonTensorHandle() <span class="overload">[2/2]</span></h2> |
| 185 | |
| 186 | <div class="memitem"> |
| 187 | <div class="memproto"> |
| 188 | <table class="mlabels"> |
| 189 | <tr> |
| 190 | <td class="mlabels-left"> |
| 191 | <table class="memname"> |
| 192 | <tr> |
| 193 | <td class="memname"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html">NeonTensorHandle</a> </td> |
| 194 | <td>(</td> |
| 195 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td> |
| 196 | <td class="paramname"><em>tensorInfo</em>, </td> |
| 197 | </tr> |
| 198 | <tr> |
| 199 | <td class="paramkey"></td> |
| 200 | <td></td> |
| 201 | <td class="paramtype"><a class="el" href="namespacearmnn.html#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> </td> |
| 202 | <td class="paramname"><em>dataLayout</em>, </td> |
| 203 | </tr> |
| 204 | <tr> |
| 205 | <td class="paramkey"></td> |
| 206 | <td></td> |
| 207 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> </td> |
| 208 | <td class="paramname"><em>importFlags</em> = <code>static_cast<<a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a>>(<a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">MemorySource::Malloc</a>)</code> </td> |
| 209 | </tr> |
| 210 | <tr> |
| 211 | <td></td> |
| 212 | <td>)</td> |
| 213 | <td></td><td></td> |
| 214 | </tr> |
| 215 | </table> |
| 216 | </td> |
| 217 | <td class="mlabels-right"> |
| 218 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 219 | </tr> |
| 220 | </table> |
| 221 | </div><div class="memdoc"> |
| 222 | |
| 223 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00035">35</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 224 | <div class="fragment"><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  : m_ImportFlags(importFlags),</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  m_Imported(<span class="keyword">false</span>),</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  m_IsImportEnabled(<span class="keyword">false</span>)</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>  armnn::armcomputetensorutils::BuildArmComputeTensor(m_Tensor, tensorInfo, dataLayout);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  }</div></div><!-- fragment --> |
| 225 | </div> |
| 226 | </div> |
| 227 | <h2 class="groupheader">Member Function Documentation</h2> |
| 228 | <a id="ac4c894e28b763523748ba2bb718d569d"></a> |
| 229 | <h2 class="memtitle"><span class="permalink"><a href="#ac4c894e28b763523748ba2bb718d569d">◆ </a></span>Allocate()</h2> |
| 230 | |
| 231 | <div class="memitem"> |
| 232 | <div class="memproto"> |
| 233 | <table class="mlabels"> |
| 234 | <tr> |
| 235 | <td class="mlabels-left"> |
| 236 | <table class="memname"> |
| 237 | <tr> |
| 238 | <td class="memname">virtual void Allocate </td> |
| 239 | <td>(</td> |
| 240 | <td class="paramname"></td><td>)</td> |
| 241 | <td></td> |
| 242 | </tr> |
| 243 | </table> |
| 244 | </td> |
| 245 | <td class="mlabels-right"> |
| 246 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 247 | </tr> |
| 248 | </table> |
| 249 | </div><div class="memdoc"> |
| 250 | <p>Indicate to the memory manager that this resource is no longer active. This is used to compute overlapping lifetimes of resources. </p> |
| 251 | |
| 252 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a5cceed8b707a09bf27eb61f17acf8a88">ITensorHandle</a>.</p> |
| 253 | |
| 254 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00049">49</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 255 | <div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="comment">// If we have enabled Importing, don't Allocate the tensor</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">if</span> (!m_IsImportEnabled)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  armnn::armcomputetensorutils::InitialiseArmComputeTensorEmpty(m_Tensor);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  }</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  };</div></div><!-- fragment --> |
| 256 | </div> |
| 257 | </div> |
| 258 | <a id="ad3e63bb560123889f1ec98e40c5f8279"></a> |
| 259 | <h2 class="memtitle"><span class="permalink"><a href="#ad3e63bb560123889f1ec98e40c5f8279">◆ </a></span>GetDataType()</h2> |
| 260 | |
| 261 | <div class="memitem"> |
| 262 | <div class="memproto"> |
| 263 | <table class="mlabels"> |
| 264 | <tr> |
| 265 | <td class="mlabels-left"> |
| 266 | <table class="memname"> |
| 267 | <tr> |
| 268 | <td class="memname">virtual arm_compute::DataType GetDataType </td> |
| 269 | <td>(</td> |
| 270 | <td class="paramname"></td><td>)</td> |
| 271 | <td> const</td> |
| 272 | </tr> |
| 273 | </table> |
| 274 | </td> |
| 275 | <td class="mlabels-right"> |
| 276 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 277 | </tr> |
| 278 | </table> |
| 279 | </div><div class="memdoc"> |
| 280 | |
| 281 | <p>Implements <a class="el" href="classarmnn_1_1_i_acl_tensor_handle.html#a3767f569fc55323ddf7b2ee57987d9c5">IAclTensorHandle</a>.</p> |
| 282 | |
| 283 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00070">70</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 284 | |
| 285 | <p class="reference">Referenced by <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00112">NeonTensorHandle::Import()</a>.</p> |
| 286 | <div class="fragment"><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>  <span class="keywordflow">return</span> m_Tensor.info()->data_type();</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  }</div></div><!-- fragment --> |
| 287 | </div> |
| 288 | </div> |
| 289 | <a id="aa1d3334a17a9f136fe65ed833fbf68b4"></a> |
| 290 | <h2 class="memtitle"><span class="permalink"><a href="#aa1d3334a17a9f136fe65ed833fbf68b4">◆ </a></span>GetImportFlags()</h2> |
| 291 | |
| 292 | <div class="memitem"> |
| 293 | <div class="memproto"> |
| 294 | <table class="mlabels"> |
| 295 | <tr> |
| 296 | <td class="mlabels-left"> |
| 297 | <table class="memname"> |
| 298 | <tr> |
| 299 | <td class="memname"><a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> GetImportFlags </td> |
| 300 | <td>(</td> |
| 301 | <td class="paramname"></td><td>)</td> |
| 302 | <td> const</td> |
| 303 | </tr> |
| 304 | </table> |
| 305 | </td> |
| 306 | <td class="mlabels-right"> |
| 307 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 308 | </tr> |
| 309 | </table> |
| 310 | </div><div class="memdoc"> |
| 311 | |
| 312 | <p>Get flags describing supported import sources. </p> |
| 313 | |
| 314 | <p>Reimplemented from <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a55cddc2dbb32d680cd85b635ba370e48">ITensorHandle</a>.</p> |
| 315 | |
| 316 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00102">102</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 317 | <div class="fragment"><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">return</span> m_ImportFlags;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  }</div></div><!-- fragment --> |
| 318 | </div> |
| 319 | </div> |
| 320 | <a id="ab6c52b35388890f2c563afbebfb456a6"></a> |
| 321 | <h2 class="memtitle"><span class="permalink"><a href="#ab6c52b35388890f2c563afbebfb456a6">◆ </a></span>GetParent()</h2> |
| 322 | |
| 323 | <div class="memitem"> |
| 324 | <div class="memproto"> |
| 325 | <table class="mlabels"> |
| 326 | <tr> |
| 327 | <td class="mlabels-left"> |
| 328 | <table class="memname"> |
| 329 | <tr> |
| 330 | <td class="memname">virtual <a class="el" href="classarmnn_1_1_i_tensor_handle.html">ITensorHandle</a>* GetParent </td> |
| 331 | <td>(</td> |
| 332 | <td class="paramname"></td><td>)</td> |
| 333 | <td> const</td> |
| 334 | </tr> |
| 335 | </table> |
| 336 | </td> |
| 337 | <td class="mlabels-right"> |
| 338 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 339 | </tr> |
| 340 | </table> |
| 341 | </div><div class="memdoc"> |
| 342 | <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> |
| 343 | |
| 344 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a437893b8dcf58a0b68b70e1ad7933be6">ITensorHandle</a>.</p> |
| 345 | |
| 346 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00068">68</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 347 | <div class="fragment"><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> { <span class="keywordflow">return</span> <span class="keyword">nullptr</span>; }</div></div><!-- fragment --> |
| 348 | </div> |
| 349 | </div> |
| 350 | <a id="a8e8d2fbabcac19f9e12779080ddff54e"></a> |
| 351 | <h2 class="memtitle"><span class="permalink"><a href="#a8e8d2fbabcac19f9e12779080ddff54e">◆ </a></span>GetShape()</h2> |
| 352 | |
| 353 | <div class="memitem"> |
| 354 | <div class="memproto"> |
| 355 | <table class="mlabels"> |
| 356 | <tr> |
| 357 | <td class="mlabels-left"> |
| 358 | <table class="memname"> |
| 359 | <tr> |
| 360 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> GetShape </td> |
| 361 | <td>(</td> |
| 362 | <td class="paramname"></td><td>)</td> |
| 363 | <td> const</td> |
| 364 | </tr> |
| 365 | </table> |
| 366 | </td> |
| 367 | <td class="mlabels-right"> |
| 368 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 369 | </tr> |
| 370 | </table> |
| 371 | </div><div class="memdoc"> |
| 372 | <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> |
| 373 | |
| 374 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#affd5aae75cad90f472f96cfd25a13f29">ITensorHandle</a>.</p> |
| 375 | |
| 376 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00092">92</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 377 | <div class="fragment"><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="keywordflow">return</span> armcomputetensorutils::GetShape(m_Tensor.info()->tensor_shape());</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  }</div></div><!-- fragment --> |
| 378 | </div> |
| 379 | </div> |
| 380 | <a id="a967f220393d291f71dabce0c06bf9b6c"></a> |
| 381 | <h2 class="memtitle"><span class="permalink"><a href="#a967f220393d291f71dabce0c06bf9b6c">◆ </a></span>GetStrides()</h2> |
| 382 | |
| 383 | <div class="memitem"> |
| 384 | <div class="memproto"> |
| 385 | <table class="mlabels"> |
| 386 | <tr> |
| 387 | <td class="mlabels-left"> |
| 388 | <table class="memname"> |
| 389 | <tr> |
| 390 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> GetStrides </td> |
| 391 | <td>(</td> |
| 392 | <td class="paramname"></td><td>)</td> |
| 393 | <td> const</td> |
| 394 | </tr> |
| 395 | </table> |
| 396 | </td> |
| 397 | <td class="mlabels-right"> |
| 398 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 399 | </tr> |
| 400 | </table> |
| 401 | </div><div class="memdoc"> |
| 402 | <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> |
| 403 | |
| 404 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a30c3e09ce55369b66469443a4ca5ef03">ITensorHandle</a>.</p> |
| 405 | |
| 406 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00087">87</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 407 | <div class="fragment"><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">return</span> armcomputetensorutils::GetStrides(m_Tensor.info()->strides_in_bytes());</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  }</div></div><!-- fragment --> |
| 408 | </div> |
| 409 | </div> |
| 410 | <a id="ab18b27bb871248e2ba3120eb557dcfe4"></a> |
| 411 | <h2 class="memtitle"><span class="permalink"><a href="#ab18b27bb871248e2ba3120eb557dcfe4">◆ </a></span>GetTensor() <span class="overload">[1/2]</span></h2> |
| 412 | |
| 413 | <div class="memitem"> |
| 414 | <div class="memproto"> |
| 415 | <table class="mlabels"> |
| 416 | <tr> |
| 417 | <td class="mlabels-left"> |
| 418 | <table class="memname"> |
| 419 | <tr> |
| 420 | <td class="memname">arm_compute::ITensor& GetTensor </td> |
| 421 | <td>(</td> |
| 422 | <td class="paramname"></td><td>)</td> |
| 423 | <td></td> |
| 424 | </tr> |
| 425 | </table> |
| 426 | </td> |
| 427 | <td class="mlabels-right"> |
| 428 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 429 | </tr> |
| 430 | </table> |
| 431 | </div><div class="memdoc"> |
| 432 | |
| 433 | <p>Implements <a class="el" href="classarmnn_1_1_i_acl_tensor_handle.html#a326e78519af5570a5921c6aa39968a20">IAclTensorHandle</a>.</p> |
| 434 | |
| 435 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00046">46</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 436 | <div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> { <span class="keywordflow">return</span> m_Tensor; }</div></div><!-- fragment --> |
| 437 | </div> |
| 438 | </div> |
| 439 | <a id="a6fde23d85d96f26ac7c33b69a945a922"></a> |
| 440 | <h2 class="memtitle"><span class="permalink"><a href="#a6fde23d85d96f26ac7c33b69a945a922">◆ </a></span>GetTensor() <span class="overload">[2/2]</span></h2> |
| 441 | |
| 442 | <div class="memitem"> |
| 443 | <div class="memproto"> |
| 444 | <table class="mlabels"> |
| 445 | <tr> |
| 446 | <td class="mlabels-left"> |
| 447 | <table class="memname"> |
| 448 | <tr> |
| 449 | <td class="memname">arm_compute::ITensor const& GetTensor </td> |
| 450 | <td>(</td> |
| 451 | <td class="paramname"></td><td>)</td> |
| 452 | <td> const</td> |
| 453 | </tr> |
| 454 | </table> |
| 455 | </td> |
| 456 | <td class="mlabels-right"> |
| 457 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 458 | </tr> |
| 459 | </table> |
| 460 | </div><div class="memdoc"> |
| 461 | |
| 462 | <p>Implements <a class="el" href="classarmnn_1_1_i_acl_tensor_handle.html#adb0fcd17dec048e91459a89fe4433ae9">IAclTensorHandle</a>.</p> |
| 463 | |
| 464 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00047">47</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 465 | <div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> { <span class="keywordflow">return</span> m_Tensor; }</div></div><!-- fragment --> |
| 466 | </div> |
| 467 | </div> |
| 468 | <a id="a468bf13728df2ac9ec772733047ff136"></a> |
| 469 | <h2 class="memtitle"><span class="permalink"><a href="#a468bf13728df2ac9ec772733047ff136">◆ </a></span>Import()</h2> |
| 470 | |
| 471 | <div class="memitem"> |
| 472 | <div class="memproto"> |
| 473 | <table class="mlabels"> |
| 474 | <tr> |
| 475 | <td class="mlabels-left"> |
| 476 | <table class="memname"> |
| 477 | <tr> |
| 478 | <td class="memname">virtual bool Import </td> |
| 479 | <td>(</td> |
| 480 | <td class="paramtype">void * </td> |
| 481 | <td class="paramname"><em>memory</em>, </td> |
| 482 | </tr> |
| 483 | <tr> |
| 484 | <td class="paramkey"></td> |
| 485 | <td></td> |
| 486 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488">MemorySource</a> </td> |
| 487 | <td class="paramname"><em>source</em> </td> |
| 488 | </tr> |
| 489 | <tr> |
| 490 | <td></td> |
| 491 | <td>)</td> |
| 492 | <td></td><td></td> |
| 493 | </tr> |
| 494 | </table> |
| 495 | </td> |
| 496 | <td class="mlabels-right"> |
| 497 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 498 | </tr> |
| 499 | </table> |
| 500 | </div><div class="memdoc"> |
| 501 | <p>Import externally allocated memory </p><dl class="params"><dt>Parameters</dt><dd> |
| 502 | <table class="params"> |
| 503 | <tr><td class="paramname">memory</td><td>base address of the memory being imported. </td></tr> |
| 504 | <tr><td class="paramname">source</td><td>source of the allocation for the memory being imported. </td></tr> |
| 505 | </table> |
| 506 | </dd> |
| 507 | </dl> |
| 508 | <dl class="section return"><dt>Returns</dt><dd>true on success or false on failure </dd></dl> |
| 509 | |
| 510 | <p>Reimplemented from <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a4f81a9eff30c9b9fe76f5b83af470ba7">ITensorHandle</a>.</p> |
| 511 | |
| 512 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00112">112</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 513 | |
| 514 | <p class="reference">References <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00070">NeonTensorHandle::GetDataType()</a>, and <a class="el" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">armnn::Malloc</a>.</p> |
| 515 | <div class="fragment"><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  {</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">if</span> (m_ImportFlags & static_cast<MemorySourceFlags>(source))</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span> (source == <a class="code" href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">MemorySource::Malloc</a> && m_IsImportEnabled)</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="comment">// Checks the 16 byte memory alignment</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  constexpr uintptr_t alignment = <span class="keyword">sizeof</span>(size_t);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">if</span> (reinterpret_cast<uintptr_t>(memory) % alignment)</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>  <span class="keywordflow">throw</span> MemoryImportException(<span class="stringliteral">"NeonTensorHandle::Import Attempting to import unaligned memory"</span>);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</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>  <span class="comment">// m_Tensor not yet Allocated</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">if</span> (!m_Imported && !m_Tensor.buffer())</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="namespacearmnn.html#a67a0db04d321a74b7e7fcfd3f1a3f70b">arm_compute::Status</a> status = m_Tensor.allocator()->import_memory(memory);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="comment">// Use the overloaded bool operator of Status to check if it worked, if not throw an exception</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="comment">// with the Status error message</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  m_Imported = bool(status);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keywordflow">if</span> (!m_Imported)</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="keywordflow">throw</span> MemoryImportException(status.error_description());</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  }</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordflow">return</span> m_Imported;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</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>  <span class="comment">// m_Tensor.buffer() initially allocated with Allocate().</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">if</span> (!m_Imported && m_Tensor.buffer())</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  {</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">throw</span> MemoryImportException(</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="stringliteral">"NeonTensorHandle::Import Attempting to import on an already allocated tensor"</span>);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</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>  <span class="comment">// m_Tensor.buffer() previously imported.</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordflow">if</span> (m_Imported)</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>  <a class="code" href="namespacearmnn.html#a67a0db04d321a74b7e7fcfd3f1a3f70b">arm_compute::Status</a> status = m_Tensor.allocator()->import_memory(memory);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="comment">// Use the overloaded bool operator of Status to check if it worked, if not throw an exception</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// with the Status error message</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  m_Imported = bool(status);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordflow">if</span> (!m_Imported)</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  {</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keywordflow">throw</span> MemoryImportException(status.error_description());</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  }</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">return</span> m_Imported;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  }</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  }</div><div class="ttc" id="namespacearmnn_html_a67a0db04d321a74b7e7fcfd3f1a3f70b"><div class="ttname"><a href="namespacearmnn.html#a67a0db04d321a74b7e7fcfd3f1a3f70b">armnn::Status</a></div><div class="ttdeci">Status</div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.html#l00026">Types.hpp:26</a></div></div> |
| 516 | <div class="ttc" id="namespacearmnn_html_a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523"><div class="ttname"><a href="namespacearmnn.html#a0fc99721e27eb20ecd0ea85a3cc8b488a1131a914388fac73e5f07b0ba0aad523">armnn::MemorySource::Malloc</a></div></div> |
| 517 | </div><!-- fragment --> |
| 518 | </div> |
| 519 | </div> |
| 520 | <a id="a19aa18d78d5ac31e3a3c8f782f0e8606"></a> |
| 521 | <h2 class="memtitle"><span class="permalink"><a href="#a19aa18d78d5ac31e3a3c8f782f0e8606">◆ </a></span>Manage()</h2> |
| 522 | |
| 523 | <div class="memitem"> |
| 524 | <div class="memproto"> |
| 525 | <table class="mlabels"> |
| 526 | <tr> |
| 527 | <td class="mlabels-left"> |
| 528 | <table class="memname"> |
| 529 | <tr> |
| 530 | <td class="memname">virtual void Manage </td> |
| 531 | <td>(</td> |
| 532 | <td class="paramname"></td><td>)</td> |
| 533 | <td></td> |
| 534 | </tr> |
| 535 | </table> |
| 536 | </td> |
| 537 | <td class="mlabels-right"> |
| 538 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 539 | </tr> |
| 540 | </table> |
| 541 | </div><div class="memdoc"> |
| 542 | <p>Indicate to the memory manager that this resource is active. This is used to compute overlapping lifetimes of resources. </p> |
| 543 | |
| 544 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a04149d0f9b9c54c05e95693111490daf">ITensorHandle</a>.</p> |
| 545 | |
| 546 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00058">58</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 547 | <div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">// If we have enabled Importing, don't manage the tensor</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">if</span> (!m_IsImportEnabled)</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  BOOST_ASSERT(m_MemoryGroup != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  m_MemoryGroup->manage(&m_Tensor);</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><!-- fragment --> |
| 548 | </div> |
| 549 | </div> |
| 550 | <a id="acc3fcce7a100cc3b64247519f22e37fc"></a> |
| 551 | <h2 class="memtitle"><span class="permalink"><a href="#acc3fcce7a100cc3b64247519f22e37fc">◆ </a></span>Map()</h2> |
| 552 | |
| 553 | <div class="memitem"> |
| 554 | <div class="memproto"> |
| 555 | <table class="mlabels"> |
| 556 | <tr> |
| 557 | <td class="mlabels-left"> |
| 558 | <table class="memname"> |
| 559 | <tr> |
| 560 | <td class="memname">virtual const void* Map </td> |
| 561 | <td>(</td> |
| 562 | <td class="paramtype">bool </td> |
| 563 | <td class="paramname"><em>blocking</em></td><td>)</td> |
| 564 | <td> const</td> |
| 565 | </tr> |
| 566 | </table> |
| 567 | </td> |
| 568 | <td class="mlabels-right"> |
| 569 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 570 | </tr> |
| 571 | </table> |
| 572 | </div><div class="memdoc"> |
| 573 | <p>Map the tensor data for access. </p><dl class="params"><dt>Parameters</dt><dd> |
| 574 | <table class="params"> |
| 575 | <tr><td class="paramname">blocking</td><td>hint to block the calling thread until all other accesses are complete. (backend dependent) </td></tr> |
| 576 | </table> |
| 577 | </dd> |
| 578 | </dl> |
| 579 | <dl class="section return"><dt>Returns</dt><dd>pointer to the first element of the mapped data. </dd></dl> |
| 580 | |
| 581 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a9afbc055a017adf1bc38ee137bca6e90">ITensorHandle</a>.</p> |
| 582 | |
| 583 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00080">80</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 584 | <div class="fragment"><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span><span class="keyword">const </span><span class="keywordtype">void</span>*<span class="keyword">></span>(m_Tensor.buffer() + m_Tensor.info()->offset_first_element_in_bytes());</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  }</div></div><!-- fragment --> |
| 585 | </div> |
| 586 | </div> |
| 587 | <a id="a9b8adcb578eb6f9ad63c21b1fa43bb14"></a> |
| 588 | <h2 class="memtitle"><span class="permalink"><a href="#a9b8adcb578eb6f9ad63c21b1fa43bb14">◆ </a></span>SetImportEnabledFlag()</h2> |
| 589 | |
| 590 | <div class="memitem"> |
| 591 | <div class="memproto"> |
| 592 | <table class="mlabels"> |
| 593 | <tr> |
| 594 | <td class="mlabels-left"> |
| 595 | <table class="memname"> |
| 596 | <tr> |
| 597 | <td class="memname">void SetImportEnabledFlag </td> |
| 598 | <td>(</td> |
| 599 | <td class="paramtype">bool </td> |
| 600 | <td class="paramname"><em>importEnabledFlag</em></td><td>)</td> |
| 601 | <td></td> |
| 602 | </tr> |
| 603 | </table> |
| 604 | </td> |
| 605 | <td class="mlabels-right"> |
| 606 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 607 | </tr> |
| 608 | </table> |
| 609 | </div><div class="memdoc"> |
| 610 | |
| 611 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00107">107</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 612 | <div class="fragment"><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>  m_IsImportEnabled = importEnabledFlag;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div></div><!-- fragment --> |
| 613 | </div> |
| 614 | </div> |
| 615 | <a id="acd3ddbebcda4124217925ae36d551441"></a> |
| 616 | <h2 class="memtitle"><span class="permalink"><a href="#acd3ddbebcda4124217925ae36d551441">◆ </a></span>SetImportFlags()</h2> |
| 617 | |
| 618 | <div class="memitem"> |
| 619 | <div class="memproto"> |
| 620 | <table class="mlabels"> |
| 621 | <tr> |
| 622 | <td class="mlabels-left"> |
| 623 | <table class="memname"> |
| 624 | <tr> |
| 625 | <td class="memname">void SetImportFlags </td> |
| 626 | <td>(</td> |
| 627 | <td class="paramtype"><a class="el" href="namespacearmnn.html#a5b05f3b7208ec7cea3338e30057c0bac">MemorySourceFlags</a> </td> |
| 628 | <td class="paramname"><em>importFlags</em></td><td>)</td> |
| 629 | <td></td> |
| 630 | </tr> |
| 631 | </table> |
| 632 | </td> |
| 633 | <td class="mlabels-right"> |
| 634 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 635 | </tr> |
| 636 | </table> |
| 637 | </div><div class="memdoc"> |
| 638 | |
| 639 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00097">97</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 640 | <div class="fragment"><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  {</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  m_ImportFlags = importFlags;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  }</div></div><!-- fragment --> |
| 641 | </div> |
| 642 | </div> |
| 643 | <a id="af9c82a4633347a36ad10c8bfab384396"></a> |
| 644 | <h2 class="memtitle"><span class="permalink"><a href="#af9c82a4633347a36ad10c8bfab384396">◆ </a></span>SetMemoryGroup()</h2> |
| 645 | |
| 646 | <div class="memitem"> |
| 647 | <div class="memproto"> |
| 648 | <table class="mlabels"> |
| 649 | <tr> |
| 650 | <td class="mlabels-left"> |
| 651 | <table class="memname"> |
| 652 | <tr> |
| 653 | <td class="memname">virtual void SetMemoryGroup </td> |
| 654 | <td>(</td> |
| 655 | <td class="paramtype">const std::shared_ptr< arm_compute::IMemoryGroup > & </td> |
| 656 | <td class="paramname"><em>memoryGroup</em></td><td>)</td> |
| 657 | <td></td> |
| 658 | </tr> |
| 659 | </table> |
| 660 | </td> |
| 661 | <td class="mlabels-right"> |
| 662 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 663 | </tr> |
| 664 | </table> |
| 665 | </div><div class="memdoc"> |
| 666 | |
| 667 | <p>Implements <a class="el" href="classarmnn_1_1_i_acl_tensor_handle.html#a658c8c0848fa9d1fb2fc6c1422bfe3e8">IAclTensorHandle</a>.</p> |
| 668 | |
| 669 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00075">75</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 670 | <div class="fragment"><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  m_MemoryGroup = boost::polymorphic_pointer_downcast<arm_compute::MemoryGroup>(memoryGroup);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  }</div></div><!-- fragment --> |
| 671 | </div> |
| 672 | </div> |
| 673 | <a id="a88ab6decf78c152e746b7d8dc2dd931f"></a> |
| 674 | <h2 class="memtitle"><span class="permalink"><a href="#a88ab6decf78c152e746b7d8dc2dd931f">◆ </a></span>Unmap()</h2> |
| 675 | |
| 676 | <div class="memitem"> |
| 677 | <div class="memproto"> |
| 678 | <table class="mlabels"> |
| 679 | <tr> |
| 680 | <td class="mlabels-left"> |
| 681 | <table class="memname"> |
| 682 | <tr> |
| 683 | <td class="memname">virtual void Unmap </td> |
| 684 | <td>(</td> |
| 685 | <td class="paramname"></td><td>)</td> |
| 686 | <td> const</td> |
| 687 | </tr> |
| 688 | </table> |
| 689 | </td> |
| 690 | <td class="mlabels-right"> |
| 691 | <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 692 | </tr> |
| 693 | </table> |
| 694 | </div><div class="memdoc"> |
| 695 | |
| 696 | <p>Unmap the tensor data. </p> |
| 697 | |
| 698 | <p>Implements <a class="el" href="classarmnn_1_1_i_tensor_handle.html#a563609828050f1b3a7868c23f3365923">ITensorHandle</a>.</p> |
| 699 | |
| 700 | <p class="definition">Definition at line <a class="el" href="_neon_tensor_handle_8hpp_source.html#l00085">85</a> of file <a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a>.</p> |
| 701 | <div class="fragment"><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> {}</div></div><!-- fragment --> |
| 702 | </div> |
| 703 | </div> |
| 704 | <hr/>The documentation for this class was generated from the following file:<ul> |
| 705 | <li>src/backends/neon/<a class="el" href="_neon_tensor_handle_8hpp_source.html">NeonTensorHandle.hpp</a></li> |
| 706 | </ul> |
| 707 | </div><!-- contents --> |
| 708 | </div><!-- doc-content --> |
| 709 | <!-- start footer part --> |
| 710 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 711 | <ul> |
| 712 | <li class="navelem"><a class="el" href="namespacearmnn.html">armnn</a></li><li class="navelem"><a class="el" href="classarmnn_1_1_neon_tensor_handle.html">NeonTensorHandle</a></li> |
| 713 | <li class="footer">Generated on Fri Mar 13 2020 16:07:04 for ArmNN by |
| 714 | <a href="http://www.doxygen.org/index.html"> |
| 715 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 716 | </ul> |
| 717 | </div> |
| 718 | </body> |
| 719 | </html> |