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