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: src/backends/backendsCommon/test/CommonTestUtils.cpp File 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('_common_test_utils_8cpp.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="#func-members">Functions</a> </div> |
| 99 | <div class="headertitle"> |
| 100 | <div class="title">CommonTestUtils.cpp File Reference</div> </div> |
| 101 | </div><!--header--> |
| 102 | <div class="contents"> |
| 103 | <div class="textblock"><code>#include "<a class="el" href="_common_test_utils_8hpp_source.xhtml">CommonTestUtils.hpp</a>"</code><br /> |
| 104 | <code>#include <<a class="el" href="include_2armnn_2backends_2_i_backend_internal_8hpp_source.xhtml">armnn/backends/IBackendInternal.hpp</a>></code><br /> |
| 105 | </div> |
| 106 | <p><a href="_common_test_utils_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 107 | <table class="memberdecls"> |
| 108 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 109 | Functions</h2></td></tr> |
| 110 | <tr class="memitem:a9892eac8f1b8ed9cea0baf643fb6d951"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a> (const std::vector< <a class="el" href="classarmnn_1_1_layer.xhtml">Layer</a> *> &layers)</td></tr> |
| 111 | <tr class="separator:a9892eac8f1b8ed9cea0baf643fb6d951"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:ae405c72b6d52a1bf4b3471032e76e3f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a> (const std::vector< <a class="el" href="classarmnn_1_1_layer.xhtml">Layer</a> *> &layers)</td></tr> |
| 113 | <tr class="separator:ae405c72b6d52a1bf4b3471032e76e3f0"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:a3ed487c53d08c08186837be90030a855"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphView::SubgraphViewPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a> (<a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a> &&inputs, <a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a> &&outputs, <a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a74798938fdaeae75c8adfa4a7439e7f9">SubgraphView::Layers</a> &&layers)</td></tr> |
| 115 | <tr class="separator:a3ed487c53d08c08186837be90030a855"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | <tr class="memitem:a7a4090354279f08b1e27244bab25aa86"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.xhtml#ade0af9dacaa52cafdd701bef2e901c77">armnn::IBackendInternalUniquePtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_common_test_utils_8cpp.xhtml#a7a4090354279f08b1e27244bab25aa86">CreateBackendObject</a> (const <a class="el" href="classarmnn_1_1_backend_id.xhtml">armnn::BackendId</a> &backendId)</td></tr> |
| 117 | <tr class="separator:a7a4090354279f08b1e27244bab25aa86"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a46d07efd379e728fc3df18a88ec878b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="_common_test_utils_8cpp.xhtml#a46d07efd379e728fc3df18a88ec878b0">MakeTensorShape</a> (unsigned int batches, unsigned int channels, unsigned int height, unsigned int width, <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">armnn::DataLayout</a> layout)</td></tr> |
| 119 | <tr class="separator:a46d07efd379e728fc3df18a88ec878b0"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | </table> |
| 121 | <h2 class="groupheader">Function Documentation</h2> |
| 122 | <a id="a7a4090354279f08b1e27244bab25aa86"></a> |
| 123 | <h2 class="memtitle"><span class="permalink"><a href="#a7a4090354279f08b1e27244bab25aa86">◆ </a></span>CreateBackendObject()</h2> |
| 124 | |
| 125 | <div class="memitem"> |
| 126 | <div class="memproto"> |
| 127 | <table class="memname"> |
| 128 | <tr> |
| 129 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#ade0af9dacaa52cafdd701bef2e901c77">armnn::IBackendInternalUniquePtr</a> CreateBackendObject </td> |
| 130 | <td>(</td> |
| 131 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_backend_id.xhtml">armnn::BackendId</a> & </td> |
| 132 | <td class="paramname"><em>backendId</em></td><td>)</td> |
| 133 | <td></td> |
| 134 | </tr> |
| 135 | </table> |
| 136 | </div><div class="memdoc"> |
| 137 | |
| 138 | <p class="definition">Definition at line <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00045">45</a> of file <a class="el" href="_common_test_utils_8cpp_source.xhtml">CommonTestUtils.cpp</a>.</p> |
| 139 | |
| 140 | <p class="reference">References <a class="el" href="_backend_registry_8cpp_source.xhtml#l00013">armnn::BackendRegistryInstance()</a>.</p> |
| 141 | |
| 142 | <p class="reference">Referenced by <a class="el" href="_common_test_utils_8hpp_source.xhtml#l00054">SetWeightAndBias()</a>.</p> |
| 143 | <div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">auto</span>& backendRegistry = <a class="code" href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">BackendRegistryInstance</a>();</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">auto</span> backendFactory = backendRegistry.GetFactory(backendId);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keyword">auto</span> backendObjPtr = backendFactory();</div><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="keywordflow">return</span> backendObjPtr;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> }</div><div class="ttc" id="namespacearmnn_xhtml_ac2807505b850738bc8a1991ce669dd47"><div class="ttname"><a href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a></div><div class="ttdeci">BackendRegistry & BackendRegistryInstance()</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8cpp_source.xhtml#l00013">BackendRegistry.cpp:13</a></div></div> |
| 144 | </div><!-- fragment --> |
| 145 | </div> |
| 146 | </div> |
| 147 | <a id="a9892eac8f1b8ed9cea0baf643fb6d951"></a> |
| 148 | <h2 class="memtitle"><span class="permalink"><a href="#a9892eac8f1b8ed9cea0baf643fb6d951">◆ </a></span>CreateInputsFrom()</h2> |
| 149 | |
| 150 | <div class="memitem"> |
| 151 | <div class="memproto"> |
| 152 | <table class="memname"> |
| 153 | <tr> |
| 154 | <td class="memname"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a> CreateInputsFrom </td> |
| 155 | <td>(</td> |
| 156 | <td class="paramtype">const std::vector< <a class="el" href="classarmnn_1_1_layer.xhtml">Layer</a> *> & </td> |
| 157 | <td class="paramname"><em>layers</em></td><td>)</td> |
| 158 | <td></td> |
| 159 | </tr> |
| 160 | </table> |
| 161 | </div><div class="memdoc"> |
| 162 | |
| 163 | <p class="definition">Definition at line <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">12</a> of file <a class="el" href="_common_test_utils_8cpp_source.xhtml">CommonTestUtils.cpp</a>.</p> |
| 164 | |
| 165 | <p class="reference">Referenced by <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00134">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_common_test_utils_8hpp_source.xhtml#l00054">SetWeightAndBias()</a>.</p> |
| 166 | <div class="fragment"><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> {</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  <a class="code" href="classarmnn_1_1_subgraph_view.xhtml#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a> result;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& layer : layers)</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  {</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& it = layer->BeginInputSlots(); it != layer->EndInputSlots(); ++it)</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  result.push_back(&(*it));</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="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> }</div><div class="ttc" id="classarmnn_1_1_subgraph_view_xhtml_a5cc65e15002dbc33a5c8a7d6680e9a9d"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.xhtml#a5cc65e15002dbc33a5c8a7d6680e9a9d">armnn::SubgraphView::InputSlots</a></div><div class="ttdeci">std::vector< InputSlot * > InputSlots</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.xhtml#l00038">SubgraphView.hpp:38</a></div></div> |
| 167 | </div><!-- fragment --> |
| 168 | </div> |
| 169 | </div> |
| 170 | <a id="ae405c72b6d52a1bf4b3471032e76e3f0"></a> |
| 171 | <h2 class="memtitle"><span class="permalink"><a href="#ae405c72b6d52a1bf4b3471032e76e3f0">◆ </a></span>CreateOutputsFrom()</h2> |
| 172 | |
| 173 | <div class="memitem"> |
| 174 | <div class="memproto"> |
| 175 | <table class="memname"> |
| 176 | <tr> |
| 177 | <td class="memname"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a> CreateOutputsFrom </td> |
| 178 | <td>(</td> |
| 179 | <td class="paramtype">const std::vector< <a class="el" href="classarmnn_1_1_layer.xhtml">Layer</a> *> & </td> |
| 180 | <td class="paramname"><em>layers</em></td><td>)</td> |
| 181 | <td></td> |
| 182 | </tr> |
| 183 | </table> |
| 184 | </div><div class="memdoc"> |
| 185 | |
| 186 | <p class="definition">Definition at line <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">25</a> of file <a class="el" href="_common_test_utils_8cpp_source.xhtml">CommonTestUtils.cpp</a>.</p> |
| 187 | |
| 188 | <p class="reference">Referenced by <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00134">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_common_test_utils_8hpp_source.xhtml#l00054">SetWeightAndBias()</a>.</p> |
| 189 | <div class="fragment"><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <a class="code" href="classarmnn_1_1_subgraph_view.xhtml#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a> result;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> && layer : layers)</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  {</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& it = layer->BeginOutputSlots(); it != layer->EndOutputSlots(); ++it)</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>  result.push_back(&(*it));</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 class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> }</div><div class="ttc" id="classarmnn_1_1_subgraph_view_xhtml_a78293334750ec5279eb9c96d56deaf08"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.xhtml#a78293334750ec5279eb9c96d56deaf08">armnn::SubgraphView::OutputSlots</a></div><div class="ttdeci">std::vector< OutputSlot * > OutputSlots</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.xhtml#l00039">SubgraphView.hpp:39</a></div></div> |
| 190 | </div><!-- fragment --> |
| 191 | </div> |
| 192 | </div> |
| 193 | <a id="a3ed487c53d08c08186837be90030a855"></a> |
| 194 | <h2 class="memtitle"><span class="permalink"><a href="#a3ed487c53d08c08186837be90030a855">◆ </a></span>CreateSubgraphViewFrom()</h2> |
| 195 | |
| 196 | <div class="memitem"> |
| 197 | <div class="memproto"> |
| 198 | <table class="memname"> |
| 199 | <tr> |
| 200 | <td class="memname"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphView::SubgraphViewPtr</a> CreateSubgraphViewFrom </td> |
| 201 | <td>(</td> |
| 202 | <td class="paramtype"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a5cc65e15002dbc33a5c8a7d6680e9a9d">SubgraphView::InputSlots</a> && </td> |
| 203 | <td class="paramname"><em>inputs</em>, </td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td class="paramkey"></td> |
| 207 | <td></td> |
| 208 | <td class="paramtype"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a78293334750ec5279eb9c96d56deaf08">SubgraphView::OutputSlots</a> && </td> |
| 209 | <td class="paramname"><em>outputs</em>, </td> |
| 210 | </tr> |
| 211 | <tr> |
| 212 | <td class="paramkey"></td> |
| 213 | <td></td> |
| 214 | <td class="paramtype"><a class="el" href="classarmnn_1_1_subgraph_view.xhtml#a74798938fdaeae75c8adfa4a7439e7f9">SubgraphView::Layers</a> && </td> |
| 215 | <td class="paramname"><em>layers</em> </td> |
| 216 | </tr> |
| 217 | <tr> |
| 218 | <td></td> |
| 219 | <td>)</td> |
| 220 | <td></td><td></td> |
| 221 | </tr> |
| 222 | </table> |
| 223 | </div><div class="memdoc"> |
| 224 | |
| 225 | <p class="definition">Definition at line <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">38</a> of file <a class="el" href="_common_test_utils_8cpp_source.xhtml">CommonTestUtils.cpp</a>.</p> |
| 226 | |
| 227 | <p class="reference">Referenced by <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00134">BOOST_AUTO_TEST_CASE()</a>, and <a class="el" href="_common_test_utils_8hpp_source.xhtml#l00054">SetWeightAndBias()</a>.</p> |
| 228 | <div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="keywordflow">return</span> std::make_unique<SubgraphView>(std::move(inputs), std::move(outputs), std::move(layers));</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> }</div></div><!-- fragment --> |
| 229 | </div> |
| 230 | </div> |
| 231 | <a id="a46d07efd379e728fc3df18a88ec878b0"></a> |
| 232 | <h2 class="memtitle"><span class="permalink"><a href="#a46d07efd379e728fc3df18a88ec878b0">◆ </a></span>MakeTensorShape()</h2> |
| 233 | |
| 234 | <div class="memitem"> |
| 235 | <div class="memproto"> |
| 236 | <table class="memname"> |
| 237 | <tr> |
| 238 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> MakeTensorShape </td> |
| 239 | <td>(</td> |
| 240 | <td class="paramtype">unsigned int </td> |
| 241 | <td class="paramname"><em>batches</em>, </td> |
| 242 | </tr> |
| 243 | <tr> |
| 244 | <td class="paramkey"></td> |
| 245 | <td></td> |
| 246 | <td class="paramtype">unsigned int </td> |
| 247 | <td class="paramname"><em>channels</em>, </td> |
| 248 | </tr> |
| 249 | <tr> |
| 250 | <td class="paramkey"></td> |
| 251 | <td></td> |
| 252 | <td class="paramtype">unsigned int </td> |
| 253 | <td class="paramname"><em>height</em>, </td> |
| 254 | </tr> |
| 255 | <tr> |
| 256 | <td class="paramkey"></td> |
| 257 | <td></td> |
| 258 | <td class="paramtype">unsigned int </td> |
| 259 | <td class="paramname"><em>width</em>, </td> |
| 260 | </tr> |
| 261 | <tr> |
| 262 | <td class="paramkey"></td> |
| 263 | <td></td> |
| 264 | <td class="paramtype"><a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">armnn::DataLayout</a> </td> |
| 265 | <td class="paramname"><em>layout</em> </td> |
| 266 | </tr> |
| 267 | <tr> |
| 268 | <td></td> |
| 269 | <td>)</td> |
| 270 | <td></td><td></td> |
| 271 | </tr> |
| 272 | </table> |
| 273 | </div><div class="memdoc"> |
| 274 | |
| 275 | <p class="definition">Definition at line <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00054">54</a> of file <a class="el" href="_common_test_utils_8cpp_source.xhtml">CommonTestUtils.cpp</a>.</p> |
| 276 | |
| 277 | <p class="reference">References <a class="el" href="_types_utils_8hpp_source.xhtml#l00190">armnn::GetDataLayoutName()</a>, <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::NCHW</a>, and <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::NHWC</a>.</p> |
| 278 | |
| 279 | <p class="reference">Referenced by <a class="el" href="_common_test_utils_8hpp_source.xhtml#l00054">SetWeightAndBias()</a>, and <a class="el" href="_transpose_convolution2d_end_to_end_test_impl_8hpp_source.xhtml#l00048">TransposeConvolution2dEndToEnd()</a>.</p> |
| 280 | <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="keyword">using namespace </span><a class="code" href="namespacearmnn.xhtml">armnn</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">switch</span> (layout)</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>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">DataLayout::NCHW</a>:</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>{ batches, channels, height, width };</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">DataLayout::NHWC</a>:</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>{ batches, height, width, channels };</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">InvalidArgumentException</a>(std::string(<span class="stringliteral">"Unsupported data layout: "</span>) + <a class="code" href="namespacearmnn.xhtml#aeef70b7611ae71e97ab55c75ef72b210">GetDataLayoutName</a>(layout));</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> }</div><div class="ttc" id="namespacearmnn_xhtml_aeef70b7611ae71e97ab55c75ef72b210"><div class="ttname"><a href="namespacearmnn.xhtml#aeef70b7611ae71e97ab55c75ef72b210">armnn::GetDataLayoutName</a></div><div class="ttdeci">constexpr const char * GetDataLayoutName(DataLayout dataLayout)</div><div class="ttdef"><b>Definition:</b> <a href="_types_utils_8hpp_source.xhtml#l00190">TypesUtils.hpp:190</a></div></div> |
| 281 | <div class="ttc" id="namespacearmnn_xhtml"><div class="ttname"><a href="namespacearmnn.xhtml">armnn</a></div><div class="ttdoc">Copyright (c) 2020 ARM Limited. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00025">00_introduction.dox:25</a></div></div> |
| 282 | <div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div> |
| 283 | <div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 284 | <div class="ttc" id="namespacearmnn_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f"><div class="ttname"><a href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::DataLayout::NCHW</a></div></div> |
| 285 | <div class="ttc" id="namespacearmnn_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51"><div class="ttname"><a href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::DataLayout::NHWC</a></div></div> |
| 286 | </div><!-- fragment --> |
| 287 | </div> |
| 288 | </div> |
| 289 | </div><!-- contents --> |
| 290 | </div><!-- doc-content --> |
| 291 | <!-- start footer part --> |
| 292 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 293 | <ul> |
| 294 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_0f3cdec46afbc61a1ded8e1687c9c9a0.xhtml">backends</a></li><li class="navelem"><a class="el" href="dir_797a213d7d01b98ef12d53b0820ea64e.xhtml">backendsCommon</a></li><li class="navelem"><a class="el" href="dir_28bfe507f7e135bdae07c2a6b7f66696.xhtml">test</a></li><li class="navelem"><a class="el" href="_common_test_utils_8cpp.xhtml">CommonTestUtils.cpp</a></li> |
| 295 | <li class="footer">Generated on Fri Mar 13 2020 16:09:14 for ArmNN by |
| 296 | <a href="http://www.doxygen.org/index.html"> |
| 297 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 298 | </ul> |
| 299 | </div> |
| 300 | </body> |
| 301 | </html> |