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/armnn/test/SubgraphViewTests.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('_subgraph_view_tests_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">SubgraphViewTests.cpp File Reference</div> </div> |
| 101 | </div><!--header--> |
| 102 | <div class="contents"> |
| 103 | <div class="textblock"><code>#include <boost/test/unit_test.hpp></code><br /> |
| 104 | <code>#include <<a class="el" href="_graph_8hpp_source.xhtml">Graph.hpp</a>></code><br /> |
| 105 | <code>#include <<a class="el" href="_subgraph_view_8hpp_source.xhtml">SubgraphView.hpp</a>></code><br /> |
| 106 | <code>#include <<a class="el" href="_subgraph_view_selector_8hpp_source.xhtml">SubgraphViewSelector.hpp</a>></code><br /> |
| 107 | <code>#include <<a class="el" href="_cpu_tensor_handle_8hpp_source.xhtml">backendsCommon/CpuTensorHandle.hpp</a>></code><br /> |
| 108 | <code>#include <fstream></code><br /> |
| 109 | <code>#include <map></code><br /> |
| 110 | <code>#include <queue></code><br /> |
| 111 | <code>#include <random></code><br /> |
| 112 | <code>#include <chrono></code><br /> |
| 113 | </div> |
| 114 | <p><a href="_subgraph_view_tests_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 115 | <table class="memberdecls"> |
| 116 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 117 | Functions</h2></td></tr> |
| 118 | <tr class="memitem:a6e26a34efaa2d30562089630ee8342f4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a6e26a34efaa2d30562089630ee8342f4">BOOST_AUTO_TEST_CASE</a> (SingleInputSingleOutput)</td></tr> |
| 119 | <tr class="separator:a6e26a34efaa2d30562089630ee8342f4"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:a6084a9df9382eb8d81789eea46d562c6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a6084a9df9382eb8d81789eea46d562c6">BOOST_AUTO_TEST_CASE</a> (SingleInputSingleOutputSubstituteGraph)</td></tr> |
| 121 | <tr class="separator:a6084a9df9382eb8d81789eea46d562c6"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="memitem:ae4ce1f124bc0dcc0b0a20b97425fa24d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#ae4ce1f124bc0dcc0b0a20b97425fa24d">BOOST_AUTO_TEST_CASE</a> (MultiInputSingleOutput)</td></tr> |
| 123 | <tr class="separator:ae4ce1f124bc0dcc0b0a20b97425fa24d"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:a98cde078473107b11a975ff3ce70c0c7"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a98cde078473107b11a975ff3ce70c0c7">BOOST_AUTO_TEST_CASE</a> (SingleInputMultiOutput)</td></tr> |
| 125 | <tr class="separator:a98cde078473107b11a975ff3ce70c0c7"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <tr class="memitem:a9a199e56ca934c543d8f7c8ff95cca10"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a9a199e56ca934c543d8f7c8ff95cca10">BOOST_AUTO_TEST_CASE</a> (MultiInputMultiOutput)</td></tr> |
| 127 | <tr class="separator:a9a199e56ca934c543d8f7c8ff95cca10"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:a14bcbedd268543ad25bf94f744861e5e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a14bcbedd268543ad25bf94f744861e5e">BOOST_AUTO_TEST_CASE</a> (EraseReplacedLayers)</td></tr> |
| 129 | <tr class="separator:a14bcbedd268543ad25bf94f744861e5e"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <tr class="memitem:acace89e7df91ea3b5ca4676ee6949606"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#acace89e7df91ea3b5ca4676ee6949606">BOOST_AUTO_TEST_CASE</a> (SubgraphForEmptyGraph)</td></tr> |
| 131 | <tr class="separator:acace89e7df91ea3b5ca4676ee6949606"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | <tr class="memitem:ab925b67a19cc95bb350c854b93ecfc0d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#ab925b67a19cc95bb350c854b93ecfc0d">BOOST_AUTO_TEST_CASE</a> (SubgraphForEntireGraph)</td></tr> |
| 133 | <tr class="separator:ab925b67a19cc95bb350c854b93ecfc0d"><td class="memSeparator" colspan="2"> </td></tr> |
| 134 | <tr class="memitem:a43913f88bb46d81e9a44d69f22d52f06"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a43913f88bb46d81e9a44d69f22d52f06">BOOST_AUTO_TEST_CASE</a> (NoSubgraphsForNoMatch)</td></tr> |
| 135 | <tr class="separator:a43913f88bb46d81e9a44d69f22d52f06"><td class="memSeparator" colspan="2"> </td></tr> |
| 136 | <tr class="memitem:a3b6b0cf1f850f804946ab5cade49af8c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a3b6b0cf1f850f804946ab5cade49af8c">BOOST_AUTO_TEST_CASE</a> (OneSubgraphsSelectedASingleMatch)</td></tr> |
| 137 | <tr class="separator:a3b6b0cf1f850f804946ab5cade49af8c"><td class="memSeparator" colspan="2"> </td></tr> |
| 138 | <tr class="memitem:aaa25f56b7dec5d9019931a0f9cf1e534"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#aaa25f56b7dec5d9019931a0f9cf1e534">BOOST_AUTO_TEST_CASE</a> (MultipleLayersSelectedInTheMiddle)</td></tr> |
| 139 | <tr class="separator:aaa25f56b7dec5d9019931a0f9cf1e534"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <tr class="memitem:a5b01e2db18e971df88af09bd414ed032"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a5b01e2db18e971df88af09bd414ed032">BOOST_AUTO_TEST_CASE</a> (DisjointGraphs)</td></tr> |
| 141 | <tr class="separator:a5b01e2db18e971df88af09bd414ed032"><td class="memSeparator" colspan="2"> </td></tr> |
| 142 | <tr class="memitem:af129c6f1e40cd9a7cfbbfaa64853e364"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#af129c6f1e40cd9a7cfbbfaa64853e364">BOOST_AUTO_TEST_CASE</a> (IslandInTheMiddle)</td></tr> |
| 143 | <tr class="separator:af129c6f1e40cd9a7cfbbfaa64853e364"><td class="memSeparator" colspan="2"> </td></tr> |
| 144 | <tr class="memitem:aa07ebba5698b37742326ae94cab2083d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#aa07ebba5698b37742326ae94cab2083d">BOOST_AUTO_TEST_CASE</a> (MultipleSimpleSubgraphs)</td></tr> |
| 145 | <tr class="separator:aa07ebba5698b37742326ae94cab2083d"><td class="memSeparator" colspan="2"> </td></tr> |
| 146 | <tr class="memitem:a7573ddbd1f802bfeb9e12e992022d4c0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a7573ddbd1f802bfeb9e12e992022d4c0">BOOST_AUTO_TEST_CASE</a> (SimpleLinearTest)</td></tr> |
| 147 | <tr class="separator:a7573ddbd1f802bfeb9e12e992022d4c0"><td class="memSeparator" colspan="2"> </td></tr> |
| 148 | <tr class="memitem:a6f198cfda61ae25af4d853e6d4ccd7d4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a6f198cfda61ae25af4d853e6d4ccd7d4">BOOST_AUTO_TEST_CASE</a> (ValidMerge)</td></tr> |
| 149 | <tr class="separator:a6f198cfda61ae25af4d853e6d4ccd7d4"><td class="memSeparator" colspan="2"> </td></tr> |
| 150 | <tr class="memitem:a25f2d4d1faf84d756ab1a27d3d14cc43"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a25f2d4d1faf84d756ab1a27d3d14cc43">BOOST_AUTO_TEST_CASE</a> (PropagatedDependencies)</td></tr> |
| 151 | <tr class="separator:a25f2d4d1faf84d756ab1a27d3d14cc43"><td class="memSeparator" colspan="2"> </td></tr> |
| 152 | <tr class="memitem:a1e046d7b4eb0f8382db7961e5cc7b3d4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a1e046d7b4eb0f8382db7961e5cc7b3d4">BOOST_AUTO_TEST_CASE</a> (Random)</td></tr> |
| 153 | <tr class="separator:a1e046d7b4eb0f8382db7961e5cc7b3d4"><td class="memSeparator" colspan="2"> </td></tr> |
| 154 | <tr class="memitem:ad4198d24a503ac7babf90a96bc13e74b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#ad4198d24a503ac7babf90a96bc13e74b">BOOST_AUTO_TEST_CASE</a> (SingleSubgraph)</td></tr> |
| 155 | <tr class="separator:ad4198d24a503ac7babf90a96bc13e74b"><td class="memSeparator" colspan="2"> </td></tr> |
| 156 | <tr class="memitem:a8449c7072fc187ac2d66f217b1d707b1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a8449c7072fc187ac2d66f217b1d707b1">BOOST_AUTO_TEST_CASE</a> (MultipleSubgraphs)</td></tr> |
| 157 | <tr class="separator:a8449c7072fc187ac2d66f217b1d707b1"><td class="memSeparator" colspan="2"> </td></tr> |
| 158 | <tr class="memitem:a4612ae0ff7acb1d5063a7f5d8cff3a4b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.xhtml#a4612ae0ff7acb1d5063a7f5d8cff3a4b">BOOST_AUTO_TEST_CASE</a> (SubgraphCycles)</td></tr> |
| 159 | <tr class="separator:a4612ae0ff7acb1d5063a7f5d8cff3a4b"><td class="memSeparator" colspan="2"> </td></tr> |
| 160 | </table> |
| 161 | <h2 class="groupheader">Function Documentation</h2> |
| 162 | <a id="a6e26a34efaa2d30562089630ee8342f4"></a> |
| 163 | <h2 class="memtitle"><span class="permalink"><a href="#a6e26a34efaa2d30562089630ee8342f4">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[1/21]</span></h2> |
| 164 | |
| 165 | <div class="memitem"> |
| 166 | <div class="memproto"> |
| 167 | <table class="memname"> |
| 168 | <tr> |
| 169 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 170 | <td>(</td> |
| 171 | <td class="paramtype">SingleInputSingleOutput </td> |
| 172 | <td class="paramname"></td><td>)</td> |
| 173 | <td></td> |
| 174 | </tr> |
| 175 | </table> |
| 176 | </div><div class="memdoc"> |
| 177 | |
| 178 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00134">134</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 179 | |
| 180 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 181 | <div class="fragment"><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="comment">// Construct graph</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</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>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</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>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2->GetInputSlot(0));</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  convLayer2->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1}),</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer2}),</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> </div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn = subgraph->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn = subgraph->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</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>  <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(1, 1);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 182 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 183 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 184 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 185 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 186 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 187 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 188 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 189 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 190 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 191 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 192 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 193 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 194 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 195 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 196 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 197 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 198 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 199 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 200 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 201 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 202 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 203 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 204 | </div><!-- fragment --> |
| 205 | </div> |
| 206 | </div> |
| 207 | <a id="a6084a9df9382eb8d81789eea46d562c6"></a> |
| 208 | <h2 class="memtitle"><span class="permalink"><a href="#a6084a9df9382eb8d81789eea46d562c6">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[2/21]</span></h2> |
| 209 | |
| 210 | <div class="memitem"> |
| 211 | <div class="memproto"> |
| 212 | <table class="memname"> |
| 213 | <tr> |
| 214 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 215 | <td>(</td> |
| 216 | <td class="paramtype">SingleInputSingleOutputSubstituteGraph </td> |
| 217 | <td class="paramname"></td><td>)</td> |
| 218 | <td></td> |
| 219 | </tr> |
| 220 | </table> |
| 221 | </div><div class="memdoc"> |
| 222 | |
| 223 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00172">172</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 224 | |
| 225 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 226 | <div class="fragment"><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="comment">// Construct graph</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2->GetInputSlot(0));</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  convLayer2->GetOutputSlot(0).Connect(outputLayer->GetInputSlot(0));</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1}),</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer2}),</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  {});</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn = subgraph->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn = subgraph->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="comment">// Construct second graph with a single pre-compiled layer</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> substituteGraph;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(1, 1);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = substituteGraph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> </div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> substituteSubgraph =</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({preCompiledLayer}),</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({preCompiledLayer}),</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  {preCompiledLayer});</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">// Substitute subgraph with pre-compiled layer</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, *substituteSubgraph);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span> </div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 227 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 228 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 229 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 230 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 231 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 232 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 233 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 234 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 235 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 236 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 237 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 238 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 239 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 240 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 241 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 242 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 243 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 244 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 245 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 246 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 247 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 248 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 249 | </div><!-- fragment --> |
| 250 | </div> |
| 251 | </div> |
| 252 | <a id="ae4ce1f124bc0dcc0b0a20b97425fa24d"></a> |
| 253 | <h2 class="memtitle"><span class="permalink"><a href="#ae4ce1f124bc0dcc0b0a20b97425fa24d">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[3/21]</span></h2> |
| 254 | |
| 255 | <div class="memitem"> |
| 256 | <div class="memproto"> |
| 257 | <table class="memname"> |
| 258 | <tr> |
| 259 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 260 | <td>(</td> |
| 261 | <td class="paramtype">MultiInputSingleOutput </td> |
| 262 | <td class="paramname"></td><td>)</td> |
| 263 | <td></td> |
| 264 | </tr> |
| 265 | </table> |
| 266 | </div><div class="memdoc"> |
| 267 | |
| 268 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00215">215</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 269 | |
| 270 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 271 | <div class="fragment"><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> {</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="comment">// Construct graph</span></div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> </div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_splitter_layer.xhtml">SplitterLayer</a>>(splitterDescriptor, <span class="stringliteral">"splitter"</span>);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"concat"</span>);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span> </div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> </div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2->GetInputSlot(0));</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  convLayer2->GetOutputSlot(0).Connect(concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer->GetInputSlot(0));</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({concatLayer}),</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  {});</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> </div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn1 = subgraph->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn2 = subgraph->GetInputSlot(1)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> </div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn = subgraph->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(2, 1);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span> </div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> </div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn2);</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn);</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span> }</div><div class="ttc" id="classarmnn_1_1_splitter_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.xhtml">armnn::SplitterLayer</a></div><div class="ttdoc">This layer represents a split operation. </div><div class="ttdef"><b>Definition:</b> <a href="_splitter_layer_8hpp_source.xhtml#l00013">SplitterLayer.hpp:13</a></div></div> |
| 272 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 273 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 274 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 275 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 276 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 277 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 278 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 279 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 280 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 281 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 282 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 283 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 284 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 285 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 286 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 287 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 288 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 289 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 290 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 291 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 292 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 293 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 294 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 295 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 296 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 297 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 298 | </div><!-- fragment --> |
| 299 | </div> |
| 300 | </div> |
| 301 | <a id="a98cde078473107b11a975ff3ce70c0c7"></a> |
| 302 | <h2 class="memtitle"><span class="permalink"><a href="#a98cde078473107b11a975ff3ce70c0c7">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[4/21]</span></h2> |
| 303 | |
| 304 | <div class="memitem"> |
| 305 | <div class="memproto"> |
| 306 | <table class="memname"> |
| 307 | <tr> |
| 308 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 309 | <td>(</td> |
| 310 | <td class="paramtype">SingleInputMultiOutput </td> |
| 311 | <td class="paramname"></td><td>)</td> |
| 312 | <td></td> |
| 313 | </tr> |
| 314 | </table> |
| 315 | </div><div class="memdoc"> |
| 316 | |
| 317 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00266">266</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 318 | |
| 319 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 320 | <div class="fragment"><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> {</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="comment">// Construct graph</span></div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> </div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> </div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"concat"</span>);</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> </div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_splitter_layer.xhtml">SplitterLayer</a>>(splitterDescriptor, <span class="stringliteral">"splitter"</span>);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span> </div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2->GetInputSlot(0));</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  convLayer2->GetOutputSlot(0).Connect(concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer->GetInputSlot(0));</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> </div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({splitterLayer}),</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  {});</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span> </div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn1 = subgraph->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn1 = subgraph->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn2 = subgraph->GetOutputSlot(1)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span> </div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(1, 2);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span> </div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span> </div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span> </div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn1);</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn2);</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span> }</div><div class="ttc" id="classarmnn_1_1_splitter_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.xhtml">armnn::SplitterLayer</a></div><div class="ttdoc">This layer represents a split operation. </div><div class="ttdef"><b>Definition:</b> <a href="_splitter_layer_8hpp_source.xhtml#l00013">SplitterLayer.hpp:13</a></div></div> |
| 321 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 322 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 323 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 324 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 325 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 326 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 327 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 328 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 329 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 330 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 331 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 332 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 333 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 334 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 335 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 336 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 337 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 338 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 339 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 340 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 341 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 342 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 343 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 344 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 345 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 346 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 347 | </div><!-- fragment --> |
| 348 | </div> |
| 349 | </div> |
| 350 | <a id="a9a199e56ca934c543d8f7c8ff95cca10"></a> |
| 351 | <h2 class="memtitle"><span class="permalink"><a href="#a9a199e56ca934c543d8f7c8ff95cca10">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[5/21]</span></h2> |
| 352 | |
| 353 | <div class="memitem"> |
| 354 | <div class="memproto"> |
| 355 | <table class="memname"> |
| 356 | <tr> |
| 357 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 358 | <td>(</td> |
| 359 | <td class="paramtype">MultiInputMultiOutput </td> |
| 360 | <td class="paramname"></td><td>)</td> |
| 361 | <td></td> |
| 362 | </tr> |
| 363 | </table> |
| 364 | </div><div class="memdoc"> |
| 365 | |
| 366 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00315">315</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 367 | |
| 368 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 369 | <div class="fragment"><div class="line"><a name="l00316"></a><span class="lineno"> 316</span> {</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="comment">// Construct graph</span></div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span> </div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_splitter_layer.xhtml">SplitterLayer</a>>(splitterDescriptor, <span class="stringliteral">"splitter"</span>);</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span> </div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> </div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"concat"</span>);</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span> </div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span> </div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2->GetInputSlot(0));</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  convLayer2->GetOutputSlot(0).Connect(concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  concatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer->GetInputSlot(0));</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> </div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  {});</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> </div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn1 = subgraph->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn2 = subgraph->GetInputSlot(1)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span> </div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn1 = subgraph->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn2 = subgraph->GetOutputSlot(1)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span> </div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(2, 2);</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span> </div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span> </div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn2);</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span> </div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn1);</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn2);</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span> }</div><div class="ttc" id="classarmnn_1_1_splitter_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.xhtml">armnn::SplitterLayer</a></div><div class="ttdoc">This layer represents a split operation. </div><div class="ttdef"><b>Definition:</b> <a href="_splitter_layer_8hpp_source.xhtml#l00013">SplitterLayer.hpp:13</a></div></div> |
| 370 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 371 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 372 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 373 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 374 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 375 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 376 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 377 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 378 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 379 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 380 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 381 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 382 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 383 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 384 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 385 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 386 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 387 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 388 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 389 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 390 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 391 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 392 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 393 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 394 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 395 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 396 | </div><!-- fragment --> |
| 397 | </div> |
| 398 | </div> |
| 399 | <a id="a14bcbedd268543ad25bf94f744861e5e"></a> |
| 400 | <h2 class="memtitle"><span class="permalink"><a href="#a14bcbedd268543ad25bf94f744861e5e">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[6/21]</span></h2> |
| 401 | |
| 402 | <div class="memitem"> |
| 403 | <div class="memproto"> |
| 404 | <table class="memname"> |
| 405 | <tr> |
| 406 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 407 | <td>(</td> |
| 408 | <td class="paramtype">EraseReplacedLayers </td> |
| 409 | <td class="paramname"></td><td>)</td> |
| 410 | <td></td> |
| 411 | </tr> |
| 412 | </table> |
| 413 | </div><div class="memdoc"> |
| 414 | |
| 415 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00368">368</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 416 | |
| 417 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_output_shape_of_squeeze_8cpp.xhtml#ae3a6cb217a792718f2bd0e8f45e3ca9e">BOOST_AUTO_TEST_SUITE()</a>, <a class="el" href="_profiler_tests_8cpp.xhtml#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 418 | <div class="fragment"><div class="line"><a name="l00369"></a><span class="lineno"> 369</span> {</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="comment">// Construct graph</span></div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span> </div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span> </div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_splitter_layer.xhtml">SplitterLayer</a>>(splitterDescriptor, <span class="stringliteral">"splitter"</span>);</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span> </div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span> </div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"concat"</span>);</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span> </div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span> </div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>({},</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  {},</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  {splitterLayer,</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  convLayer1,</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  convLayer2,</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  concatLayer});</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span> </div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(0, 0);</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span> </div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="comment">// Save sub-graph layers for later verification</span></div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_subgraph_view.xhtml#a74798938fdaeae75c8adfa4a7439e7f9">SubgraphView::Layers</a> subgraphLayers = subgraph->GetLayers();</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span> </div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span> </div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="comment">// Check that the layers belonging to the sub-graph have been erased from the graph after substitution</span></div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(!AreAnySubgraphLayersPresentInGraph(subgraphLayers, graph));</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> }</div><div class="ttc" id="classarmnn_1_1_splitter_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.xhtml">armnn::SplitterLayer</a></div><div class="ttdoc">This layer represents a split operation. </div><div class="ttdef"><b>Definition:</b> <a href="_splitter_layer_8hpp_source.xhtml#l00013">SplitterLayer.hpp:13</a></div></div> |
| 419 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 420 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 421 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 422 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div> |
| 423 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 424 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 425 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 426 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 427 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 428 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 429 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 430 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 431 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 432 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 433 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 434 | <div class="ttc" id="classarmnn_1_1_subgraph_view_xhtml_a74798938fdaeae75c8adfa4a7439e7f9"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.xhtml#a74798938fdaeae75c8adfa4a7439e7f9">armnn::SubgraphView::Layers</a></div><div class="ttdeci">std::list< Layer * > Layers</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.xhtml#l00040">SubgraphView.hpp:40</a></div></div> |
| 435 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 436 | </div><!-- fragment --> |
| 437 | </div> |
| 438 | </div> |
| 439 | <a id="acace89e7df91ea3b5ca4676ee6949606"></a> |
| 440 | <h2 class="memtitle"><span class="permalink"><a href="#acace89e7df91ea3b5ca4676ee6949606">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[7/21]</span></h2> |
| 441 | |
| 442 | <div class="memitem"> |
| 443 | <div class="memproto"> |
| 444 | <table class="memname"> |
| 445 | <tr> |
| 446 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 447 | <td>(</td> |
| 448 | <td class="paramtype">SubgraphForEmptyGraph </td> |
| 449 | <td class="paramname"></td><td>)</td> |
| 450 | <td></td> |
| 451 | </tr> |
| 452 | </table> |
| 453 | </div><div class="memdoc"> |
| 454 | |
| 455 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00413">413</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 456 | |
| 457 | <p class="reference">References <a class="el" href="_subgraph_view_8cpp_source.xhtml#l00119">SubgraphView::GetInputSlots()</a>, <a class="el" href="_subgraph_view_8cpp_source.xhtml#l00159">SubgraphView::GetLayers()</a>, and <a class="el" href="_subgraph_view_8cpp_source.xhtml#l00124">SubgraphView::GetOutputSlots()</a>.</p> |
| 458 | <div class="fragment"><div class="line"><a name="l00414"></a><span class="lineno"> 414</span> {</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <a class="code" href="classarmnn_1_1_subgraph_view.xhtml">SubgraphView</a> subgraph(graph);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> </div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  BOOST_TEST(subgraph.GetInputSlots().empty());</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  BOOST_TEST(subgraph.GetOutputSlots().empty());</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  BOOST_TEST(subgraph.GetLayers().empty());</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> }</div><div class="ttc" id="classarmnn_1_1_subgraph_view_xhtml"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.xhtml">armnn::SubgraphView</a></div><div class="ttdoc">The SubgraphView class represents a subgraph of a Graph. </div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.xhtml#l00023">SubgraphView.hpp:23</a></div></div> |
| 459 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 460 | </div><!-- fragment --> |
| 461 | </div> |
| 462 | </div> |
| 463 | <a id="ab925b67a19cc95bb350c854b93ecfc0d"></a> |
| 464 | <h2 class="memtitle"><span class="permalink"><a href="#ab925b67a19cc95bb350c854b93ecfc0d">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[8/21]</span></h2> |
| 465 | |
| 466 | <div class="memitem"> |
| 467 | <div class="memproto"> |
| 468 | <table class="memname"> |
| 469 | <tr> |
| 470 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 471 | <td>(</td> |
| 472 | <td class="paramtype">SubgraphForEntireGraph </td> |
| 473 | <td class="paramname"></td><td>)</td> |
| 474 | <td></td> |
| 475 | </tr> |
| 476 | </table> |
| 477 | </div><div class="memdoc"> |
| 478 | |
| 479 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00423">423</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 480 | |
| 481 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00187">Graph::GetNumLayers()</a>, and <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>.</p> |
| 482 | <div class="fragment"><div class="line"><a name="l00424"></a><span class="lineno"> 424</span> {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <span class="keyword">auto</span> mid0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(output->GetInputSlot(0),</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <span class="stringliteral">"mid0"</span>);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keyword">auto</span> mid1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(mid0-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="stringliteral">"mid1"</span>);</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(mid1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span> </div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <a class="code" href="classarmnn_1_1_subgraph_view.xhtml">SubgraphView</a> subgraph(graph);</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  BOOST_TEST(subgraph.GetInputSlots().empty());</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  BOOST_TEST(subgraph.GetOutputSlots().empty());</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  BOOST_TEST(subgraph.GetLayers().size() == graph.<a class="code" href="classarmnn_1_1_graph.xhtml#afdf8eb85585a798ad0e936bde884d87b">GetNumLayers</a>());</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 483 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 484 | <div class="ttc" id="classarmnn_1_1_subgraph_view_xhtml"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.xhtml">armnn::SubgraphView</a></div><div class="ttdoc">The SubgraphView class represents a subgraph of a Graph. </div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.xhtml#l00023">SubgraphView.hpp:23</a></div></div> |
| 485 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 486 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 487 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 488 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 489 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 490 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_afdf8eb85585a798ad0e936bde884d87b"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#afdf8eb85585a798ad0e936bde884d87b">armnn::Graph::GetNumLayers</a></div><div class="ttdeci">size_t GetNumLayers() const</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00187">Graph.hpp:187</a></div></div> |
| 491 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 492 | </div><!-- fragment --> |
| 493 | </div> |
| 494 | </div> |
| 495 | <a id="a43913f88bb46d81e9a44d69f22d52f06"></a> |
| 496 | <h2 class="memtitle"><span class="permalink"><a href="#a43913f88bb46d81e9a44d69f22d52f06">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[9/21]</span></h2> |
| 497 | |
| 498 | <div class="memitem"> |
| 499 | <div class="memproto"> |
| 500 | <table class="memname"> |
| 501 | <tr> |
| 502 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 503 | <td>(</td> |
| 504 | <td class="paramtype">NoSubgraphsForNoMatch </td> |
| 505 | <td class="paramname"></td><td>)</td> |
| 506 | <td></td> |
| 507 | </tr> |
| 508 | </table> |
| 509 | </div><div class="memdoc"> |
| 510 | |
| 511 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00443">443</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 512 | |
| 513 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 514 | <div class="fragment"><div class="line"><a name="l00444"></a><span class="lineno"> 444</span> {</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span> </div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(output->GetInputSlot(0), 0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span> </div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  SubgraphViewSelector::SelectSubgraphs(graph, [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> &) { <span class="keywordflow">return</span> <span class="keyword">false</span>; });</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span> </div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  BOOST_TEST(subgraphs.empty());</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 515 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 516 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 517 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 518 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 519 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 520 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 521 | </div><!-- fragment --> |
| 522 | </div> |
| 523 | </div> |
| 524 | <a id="a3b6b0cf1f850f804946ab5cade49af8c"></a> |
| 525 | <h2 class="memtitle"><span class="permalink"><a href="#a3b6b0cf1f850f804946ab5cade49af8c">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[10/21]</span></h2> |
| 526 | |
| 527 | <div class="memitem"> |
| 528 | <div class="memproto"> |
| 529 | <table class="memname"> |
| 530 | <tr> |
| 531 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 532 | <td>(</td> |
| 533 | <td class="paramtype">OneSubgraphsSelectedASingleMatch </td> |
| 534 | <td class="paramname"></td><td>)</td> |
| 535 | <td></td> |
| 536 | </tr> |
| 537 | </table> |
| 538 | </div><div class="memdoc"> |
| 539 | |
| 540 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00456">456</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 541 | |
| 542 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00216">Layer::GetNameStr()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 543 | <div class="fragment"><div class="line"><a name="l00457"></a><span class="lineno"> 457</span> {</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span> </div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(output->GetInputSlot(0), 0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span> </div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  graph,</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <span class="comment">// select the output layer only</span></div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l)</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  {</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="keywordtype">bool</span> isOutput = l.<a class="code" href="classarmnn_1_1_layer.xhtml#a9a97cb6d32661a57fc33bd29b8e41ff4">GetNameStr</a>().compare(<span class="stringliteral">"output"</span>) == 0;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">return</span> isOutput;</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  });</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span> </div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  BOOST_TEST(subgraphs.size() == 1);</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">if</span> (subgraphs.size() == 1)</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  {</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="keyword">auto</span> expected = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({output}),</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="comment">// outputs of 'output' will be empty</span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({output}),</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  {output});</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> </div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  CompareSubgraphViews(subgraphs[0], expected);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  }</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 544 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 545 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 546 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a9a97cb6d32661a57fc33bd29b8e41ff4"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a9a97cb6d32661a57fc33bd29b8e41ff4">armnn::Layer::GetNameStr</a></div><div class="ttdeci">const std::string & GetNameStr() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00216">Layer.hpp:216</a></div></div> |
| 547 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 548 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 549 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 550 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 551 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 552 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 553 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 554 | </div><!-- fragment --> |
| 555 | </div> |
| 556 | </div> |
| 557 | <a id="aaa25f56b7dec5d9019931a0f9cf1e534"></a> |
| 558 | <h2 class="memtitle"><span class="permalink"><a href="#aaa25f56b7dec5d9019931a0f9cf1e534">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[11/21]</span></h2> |
| 559 | |
| 560 | <div class="memitem"> |
| 561 | <div class="memproto"> |
| 562 | <table class="memname"> |
| 563 | <tr> |
| 564 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 565 | <td>(</td> |
| 566 | <td class="paramtype">MultipleLayersSelectedInTheMiddle </td> |
| 567 | <td class="paramname"></td><td>)</td> |
| 568 | <td></td> |
| 569 | </tr> |
| 570 | </table> |
| 571 | </div><div class="memdoc"> |
| 572 | |
| 573 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00485">485</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 574 | |
| 575 | <p class="reference">References <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4aa9a62e70841c4d06dd16306a85700d36">armnn::Activation</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00259">Layer::GetType()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 576 | <div class="fragment"><div class="line"><a name="l00486"></a><span class="lineno"> 486</span> {</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span> </div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  <span class="keyword">auto</span> mid0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(output->GetInputSlot(0),</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <span class="stringliteral">"mid0"</span>);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  <span class="keyword">auto</span> mid1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(mid0-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  <span class="stringliteral">"mid1"</span>);</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(mid1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span> </div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  graph,</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l)</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  {</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>  <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.xhtml#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">LayerType::Activation</a>);</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  });</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span> </div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  BOOST_TEST(subgraphs.size() == 1);</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  <span class="keywordflow">if</span> (subgraphs.size() == 1)</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  {</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  <span class="keyword">auto</span> expected = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({mid1}),</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({mid0}),</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  {mid1, mid0});</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span> </div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  CompareSubgraphViews(subgraphs[0], expected);</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  }</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 577 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 578 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 579 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 580 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 581 | <div class="ttc" id="namespacearmnn_xhtml_a7636fbbc4f8ea2d0cf9f3ac2d12a4c62"><div class="ttname"><a href="namespacearmnn.xhtml#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">armnn::Activation</a></div><div class="ttdeci">float Activation(float in, ActivationFunction function, float a, float b)</div><div class="ttdef"><b>Definition:</b> <a href="_activation_8cpp_source.xhtml#l00013">Activation.cpp:13</a></div></div> |
| 582 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 583 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 584 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 585 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 586 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 587 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 588 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00259">Layer.hpp:259</a></div></div> |
| 589 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 590 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 591 | </div><!-- fragment --> |
| 592 | </div> |
| 593 | </div> |
| 594 | <a id="a5b01e2db18e971df88af09bd414ed032"></a> |
| 595 | <h2 class="memtitle"><span class="permalink"><a href="#a5b01e2db18e971df88af09bd414ed032">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[12/21]</span></h2> |
| 596 | |
| 597 | <div class="memitem"> |
| 598 | <div class="memproto"> |
| 599 | <table class="memname"> |
| 600 | <tr> |
| 601 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 602 | <td>(</td> |
| 603 | <td class="paramtype">DisjointGraphs </td> |
| 604 | <td class="paramname"></td><td>)</td> |
| 605 | <td></td> |
| 606 | </tr> |
| 607 | </table> |
| 608 | </div><div class="memdoc"> |
| 609 | |
| 610 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00519">519</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 611 | |
| 612 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 613 | <div class="fragment"><div class="line"><a name="l00520"></a><span class="lineno"> 520</span> {</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>  <span class="comment">// The input graph has two disjoint sections and all layers are selected.</span></div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="comment">// This should result in two subgraphs being produced.</span></div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span> </div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  <span class="comment">// the graph is constructed in reverse order</span></div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="keyword">auto</span> o0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output0"</span>);</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="keyword">auto</span> n0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(o0->GetInputSlot(0), <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"intermediate0"</span>);</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  <span class="keyword">auto</span> i0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(n0-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">"input0"</span>);</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span> </div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  <span class="keyword">auto</span> o1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(1, <span class="stringliteral">"output1"</span>);</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <span class="keyword">auto</span> n1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(o1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"intermediate1"</span>);</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keyword">auto</span> i1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(n1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 1, <span class="stringliteral">"input1"</span>);</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span> </div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  SubgraphViewSelector::SelectSubgraphs(graph,</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>&) {</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  });</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span> </div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>  <span class="keyword">auto</span> expected1 = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>({}, {}, { o0, n0, i0 });</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  <span class="keyword">auto</span> expected2 = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>({}, {}, { o1, n1, i1 });</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  {</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  {</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  <span class="keywordflow">if</span> (std::find(subgraphs[0]->GetLayers().begin(), subgraphs[0]->GetLayers().end(), i0) !=</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  subgraphs[0]->GetLayers().end())</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  {</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  CompareSubgraphViews(subgraphs[0], expected1);</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  CompareSubgraphViews(subgraphs[1], expected2);</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>  }</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  {</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  CompareSubgraphViews(subgraphs[0], expected2);</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  CompareSubgraphViews(subgraphs[1], expected1);</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  }</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  }</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  }</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 614 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 615 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 616 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 617 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 618 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 619 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 620 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 621 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 622 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 623 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 624 | </div><!-- fragment --> |
| 625 | </div> |
| 626 | </div> |
| 627 | <a id="af129c6f1e40cd9a7cfbbfaa64853e364"></a> |
| 628 | <h2 class="memtitle"><span class="permalink"><a href="#af129c6f1e40cd9a7cfbbfaa64853e364">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[13/21]</span></h2> |
| 629 | |
| 630 | <div class="memitem"> |
| 631 | <div class="memproto"> |
| 632 | <table class="memname"> |
| 633 | <tr> |
| 634 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 635 | <td>(</td> |
| 636 | <td class="paramtype">IslandInTheMiddle </td> |
| 637 | <td class="paramname"></td><td>)</td> |
| 638 | <td></td> |
| 639 | </tr> |
| 640 | </table> |
| 641 | </div><div class="memdoc"> |
| 642 | |
| 643 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00566">566</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 644 | |
| 645 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 646 | <div class="fragment"><div class="line"><a name="l00567"></a><span class="lineno"> 567</span> {</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  <span class="comment">// This case represent the scenario when a non-selected X1 node placed in the middle</span></div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  <span class="comment">// of the selected M* nodes.</span></div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  <span class="comment">// This checks that we don't merge M6 and M3 and create a dependency loop.</span></div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  <span class="comment">/*</span></div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span> <span class="comment"> M0</span></div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span> <span class="comment"> / \</span></div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span> <span class="comment"> M1 M4</span></div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span> <span class="comment"> | |</span></div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span> <span class="comment"> M2 X1 < the island in the middle !</span></div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span> <span class="comment"> | |</span></div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span> <span class="comment"> M3 M5</span></div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span> <span class="comment"> \ /</span></div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span> <span class="comment"> M6</span></div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span> <span class="comment"> */</span></div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span> </div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  <span class="keyword">auto</span> m6 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"m6"</span>);</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>  <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m6->GetInputSlot(0),</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <span class="stringliteral">"m3"</span>);</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>  <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  <span class="stringliteral">"m2"</span>);</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  <span class="stringliteral">"m1"</span>);</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(m1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">"m0"</span>);</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span> </div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  <span class="keyword">auto</span> m5 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m6->GetInputSlot(1),</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  <span class="stringliteral">"m5"</span>);</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m5-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>  <span class="stringliteral">"x1"</span>);</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  <span class="keyword">auto</span> m4 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(x1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  <span class="stringliteral">"m4"</span>);</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span> </div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  <span class="comment">// Connect the other branch to the input layer</span></div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  m0-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m4-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span> </div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>  <span class="comment">// All selected 'M*' layers will be of Activation type</span></div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>  graph,</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>  <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>& l)</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  {</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  <span class="keywordtype">bool</span> toSelect = std::string(l.<a class="code" href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>())[0] == <span class="charliteral">'m'</span>;</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  });</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span> </div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>  <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <span class="keyword">auto</span> largerSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m0 }),</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ m3, m4 }),</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  { m0, m1, m2, m3, m4 });</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span> </div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  <span class="keyword">auto</span> smallerSubgraph =</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(std::vector<InputSlot*>{ &m5-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), & m6->GetInputSlot(0) },</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  std::vector<OutputSlot*>{},</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  { m5, m6 });</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span> </div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>  <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  {</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  <span class="comment">// we need to have valid subgraph pointers here</span></div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span> </div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  {</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  <span class="comment">// sort the subgraphs by layer size, so it is simpler to test</span></div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>  std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>  [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>& lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>& rhs)</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  {</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>  <span class="keywordflow">return</span> (lhs->GetLayers().size() < rhs->GetLayers().size());</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  }</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  );</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span> </div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span>  BOOST_TEST(subgraphs[0]->GetLayers().size() == 2);</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  BOOST_TEST(subgraphs[1]->GetLayers().size() == 5);</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span> </div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>  CompareSubgraphViews(subgraphs[0], smallerSubgraph);</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>  CompareSubgraphViews(subgraphs[1], largerSubgraph);</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>  }</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>  }</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 647 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 648 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 649 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 650 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 651 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 652 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 653 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 654 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 655 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 656 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 657 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 658 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 659 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 660 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 661 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdoc">Returns the name of the layer. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00305">Layer.hpp:305</a></div></div> |
| 662 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 663 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 664 | </div><!-- fragment --> |
| 665 | </div> |
| 666 | </div> |
| 667 | <a id="aa07ebba5698b37742326ae94cab2083d"></a> |
| 668 | <h2 class="memtitle"><span class="permalink"><a href="#aa07ebba5698b37742326ae94cab2083d">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[14/21]</span></h2> |
| 669 | |
| 670 | <div class="memitem"> |
| 671 | <div class="memproto"> |
| 672 | <table class="memname"> |
| 673 | <tr> |
| 674 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 675 | <td>(</td> |
| 676 | <td class="paramtype">MultipleSimpleSubgraphs </td> |
| 677 | <td class="paramname"></td><td>)</td> |
| 678 | <td></td> |
| 679 | </tr> |
| 680 | </table> |
| 681 | </div><div class="memdoc"> |
| 682 | |
| 683 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00657">657</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 684 | |
| 685 | <p class="reference">References <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4aa9a62e70841c4d06dd16306a85700d36">armnn::Activation</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00259">Layer::GetType()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 686 | <div class="fragment"><div class="line"><a name="l00658"></a><span class="lineno"> 658</span> {</div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  <span class="comment">// This test case represents the scenario when we have two distinct subgraphs</span></div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  <span class="comment">// in a simple linear network. The selected nodes are the M* and the</span></div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span>  <span class="comment">// non-selected ones are the X*</span></div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>  <span class="comment">//</span></div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>  <span class="comment">// X1 -> M1 -> M2 -> X2 -> M3 -> X3</span></div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>  <span class="comment">//</span></div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  <span class="comment">// The expected results is two subgraphs, one with {M1, M2} and another one</span></div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>  <span class="comment">// with {M3}</span></div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  <span class="comment">//</span></div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span> </div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  <span class="comment">// the graph is constructed in reverse order</span></div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  <span class="keyword">auto</span> x3 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>  <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(x3->GetInputSlot(0),</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  <span class="stringliteral">"m3"</span>);</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>  <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a>{},</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>  <span class="stringliteral">"x2"</span>);</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span>  <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(x2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>  <span class="stringliteral">"m2"</span>);</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span>  <span class="stringliteral">"m1"</span>);</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(m1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">"x1"</span>);</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span> </div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  <span class="comment">// All selected 'M*' layers will be of Activation type</span></div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  graph,</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l)</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  {</div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.xhtml#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">LayerType::Activation</a>);</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  });</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span> </div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  <span class="keyword">auto</span> largerSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m1}),</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m2}),</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>  {m1, m2});</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span> </div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span>  <span class="keyword">auto</span> smallerSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m3}),</div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m3}),</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>  {m3});</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span> </div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>  BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>  <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span>  {</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span>  <span class="comment">// we need to have valid subgraph pointers here</span></div><div class="line"><a name="l00710"></a><span class="lineno"> 710</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span> </div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  {</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  <span class="comment">// sort the subgraphs by layer size, so it is simpler to test</span></div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span>  std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> & lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> & rhs)</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  {</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  <span class="keywordflow">return</span> (lhs->GetLayers().size() < rhs->GetLayers().size());</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  }</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>  );</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span> </div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>  BOOST_TEST(subgraphs[0]->GetLayers().size() == 1);</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  BOOST_TEST(subgraphs[1]->GetLayers().size() == 2);</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span> </div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  CompareSubgraphViews(subgraphs[0], smallerSubgraph);</div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  CompareSubgraphViews(subgraphs[1], largerSubgraph);</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>  }</div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  }</div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 687 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 688 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 689 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 690 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 691 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 692 | <div class="ttc" id="namespacearmnn_xhtml_a7636fbbc4f8ea2d0cf9f3ac2d12a4c62"><div class="ttname"><a href="namespacearmnn.xhtml#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">armnn::Activation</a></div><div class="ttdeci">float Activation(float in, ActivationFunction function, float a, float b)</div><div class="ttdef"><b>Definition:</b> <a href="_activation_8cpp_source.xhtml#l00013">Activation.cpp:13</a></div></div> |
| 693 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 694 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 695 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 696 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 697 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 698 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 699 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 700 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00259">Layer.hpp:259</a></div></div> |
| 701 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 702 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 703 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 704 | </div><!-- fragment --> |
| 705 | </div> |
| 706 | </div> |
| 707 | <a id="a7573ddbd1f802bfeb9e12e992022d4c0"></a> |
| 708 | <h2 class="memtitle"><span class="permalink"><a href="#a7573ddbd1f802bfeb9e12e992022d4c0">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[15/21]</span></h2> |
| 709 | |
| 710 | <div class="memitem"> |
| 711 | <div class="memproto"> |
| 712 | <table class="memname"> |
| 713 | <tr> |
| 714 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 715 | <td>(</td> |
| 716 | <td class="paramtype">SimpleLinearTest </td> |
| 717 | <td class="paramname"></td><td>)</td> |
| 718 | <td></td> |
| 719 | </tr> |
| 720 | </table> |
| 721 | </div><div class="memdoc"> |
| 722 | |
| 723 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00732">732</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 724 | |
| 725 | <p class="reference">References <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4aa9a62e70841c4d06dd16306a85700d36">armnn::Activation</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::Addition</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_const_tensor_layer_visitor_8cpp_source.xhtml#l00170">armnn::BOOST_AUTO_TEST_CASE()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4ae20f0f2826a6549809f050b86274567f">armnn::Concat</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00259">Layer::GetType()</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>, and <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a41cb9b797ebc6f6f6314e3ded935f4cf">armnn::Splitter</a>.</p> |
| 726 | <div class="fragment"><div class="line"><a name="l00733"></a><span class="lineno"> 733</span> {</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  <span class="comment">//X1 -> M1 -> M2 -> X2</span></div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  <span class="comment">//Where the input slots of M1 and the output slots of M2 are to be the sub graph boundaries.</span></div><div class="line"><a name="l00736"></a><span class="lineno"> 736</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span> </div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a> activationDefaults;</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span> </div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  <span class="keyword">auto</span> layerX1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"layerX1"</span>);</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  <span class="keyword">auto</span> layerX2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"layerX2"</span>);</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>  <span class="keyword">auto</span> layerM1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(activationDefaults, <span class="stringliteral">"layerM1"</span>);</div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  <span class="keyword">auto</span> layerM2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(activationDefaults, <span class="stringliteral">"layerM2"</span>);</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span> </div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span>  <span class="comment">// X1</span></div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span>  <span class="comment">// |</span></div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span>  <span class="comment">// M1</span></div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  <span class="comment">// |</span></div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span>  <span class="comment">// M2</span></div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>  <span class="comment">// |</span></div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span>  <span class="comment">// X2</span></div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span> </div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  layerX1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(layerM1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  layerM1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(layerM2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  layerM2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(layerX2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span> </div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  graph,</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  <span class="comment">// select the activation layers M1 and M2</span></div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l)</div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  {</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span>  <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.xhtml#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">LayerType::Activation</a>);</div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span>  });</div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span> </div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(subgraphs.size() == 1);</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  <span class="keywordflow">if</span>(subgraphs.size() == 1)</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  {</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  <span class="keyword">auto</span> expected = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({layerM1}),</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({layerM2}),</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  {layerM1, layerM2});</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span> </div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  CompareSubgraphViews(subgraphs[0], expected);</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  }</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 727 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 728 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 729 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div> |
| 730 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 731 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 732 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 733 | <div class="ttc" id="namespacearmnn_xhtml_a7636fbbc4f8ea2d0cf9f3ac2d12a4c62"><div class="ttname"><a href="namespacearmnn.xhtml#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">armnn::Activation</a></div><div class="ttdeci">float Activation(float in, ActivationFunction function, float a, float b)</div><div class="ttdef"><b>Definition:</b> <a href="_activation_8cpp_source.xhtml#l00013">Activation.cpp:13</a></div></div> |
| 734 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 735 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 736 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 737 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 738 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 739 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 740 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00259">Layer.hpp:259</a></div></div> |
| 741 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 742 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 743 | </div><!-- fragment --> |
| 744 | </div> |
| 745 | </div> |
| 746 | <a id="a6f198cfda61ae25af4d853e6d4ccd7d4"></a> |
| 747 | <h2 class="memtitle"><span class="permalink"><a href="#a6f198cfda61ae25af4d853e6d4ccd7d4">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[16/21]</span></h2> |
| 748 | |
| 749 | <div class="memitem"> |
| 750 | <div class="memproto"> |
| 751 | <table class="memname"> |
| 752 | <tr> |
| 753 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 754 | <td>(</td> |
| 755 | <td class="paramtype">ValidMerge </td> |
| 756 | <td class="paramname"></td><td>)</td> |
| 757 | <td></td> |
| 758 | </tr> |
| 759 | </table> |
| 760 | </div><div class="memdoc"> |
| 761 | |
| 762 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l00953">953</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 763 | |
| 764 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 765 | <div class="fragment"><div class="line"><a name="l00954"></a><span class="lineno"> 954</span> {</div><div class="line"><a name="l00955"></a><span class="lineno"> 955</span>  <span class="comment">// Checks that a node that has multiple choices for merge candidates (M3 in this case) correctly merges with the</span></div><div class="line"><a name="l00956"></a><span class="lineno"> 956</span>  <span class="comment">// one that it can (M0), and doesn't merge with the ones it can't (X2 and M2).</span></div><div class="line"><a name="l00957"></a><span class="lineno"> 957</span>  <span class="comment">//</span></div><div class="line"><a name="l00958"></a><span class="lineno"> 958</span>  <span class="comment">// X1</span></div><div class="line"><a name="l00959"></a><span class="lineno"> 959</span>  <span class="comment">// |</span></div><div class="line"><a name="l00960"></a><span class="lineno"> 960</span>  <span class="comment">// M1</span></div><div class="line"><a name="l00961"></a><span class="lineno"> 961</span>  <span class="comment">// / \'</span></div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>  <span class="comment">// X2 M2 M0</span></div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span>  <span class="comment">// \ | /</span></div><div class="line"><a name="l00964"></a><span class="lineno"> 964</span>  <span class="comment">// M3</span></div><div class="line"><a name="l00965"></a><span class="lineno"> 965</span>  <span class="comment">//</span></div><div class="line"><a name="l00966"></a><span class="lineno"> 966</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l00967"></a><span class="lineno"> 967</span> </div><div class="line"><a name="l00968"></a><span class="lineno"> 968</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a> activationDefaults;</div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(3);</div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span> </div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>  <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"x1"</span>);</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>  <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(activationDefaults, <span class="stringliteral">"x2"</span>);</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span>  <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(1, <span class="stringliteral">"m0"</span>);</div><div class="line"><a name="l00974"></a><span class="lineno"> 974</span>  <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(activationDefaults, <span class="stringliteral">"m1"</span>);</div><div class="line"><a name="l00975"></a><span class="lineno"> 975</span>  <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(activationDefaults, <span class="stringliteral">"m2"</span>);</div><div class="line"><a name="l00976"></a><span class="lineno"> 976</span>  <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"m3"</span>);</div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span> </div><div class="line"><a name="l00978"></a><span class="lineno"> 978</span>  x1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span>  m1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(x2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span>  m1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span>  x2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>  m2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>  m0-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(2));</div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span> </div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs = SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span>  graph,</div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>& l) {</div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>  <span class="keywordflow">return</span> std::string(l.<a class="code" href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>())[0] == <span class="charliteral">'m'</span>;</div><div class="line"><a name="l00989"></a><span class="lineno"> 989</span>  });</div><div class="line"><a name="l00990"></a><span class="lineno"> 990</span> </div><div class="line"><a name="l00991"></a><span class="lineno"> 991</span>  <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00992"></a><span class="lineno"> 992</span>  <span class="keyword">auto</span> expectedSubgraph0 =</div><div class="line"><a name="l00993"></a><span class="lineno"> 993</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(</div><div class="line"><a name="l00994"></a><span class="lineno"> 994</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m1 }),</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span>  std::vector<OutputSlot*>{ &m1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0), &m2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0) },</div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span>  { m1, m2 });</div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span> </div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span>  <span class="keyword">auto</span> expectedSubgraph1 = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(</div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span>  std::vector<InputSlot*>{ &m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), & m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1) },</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ }),</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>  { m0, m3 });</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span> </div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>  BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>  <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>  {</div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>  <span class="comment">// we need to have valid subgraph pointers here</span></div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span> </div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>  {</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>  <span class="keywordflow">if</span> (subgraphs[0]->GetInputSlots().size() == 1)</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>  {</div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>  CompareSubgraphViews(subgraphs[0], expectedSubgraph0);</div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>  CompareSubgraphViews(subgraphs[1], expectedSubgraph1);</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>  }</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>  {</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>  CompareSubgraphViews(subgraphs[0], expectedSubgraph1);</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>  CompareSubgraphViews(subgraphs[1], expectedSubgraph0);</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>  }</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>  }</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>  }</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 766 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 767 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 768 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 769 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 770 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 771 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 772 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 773 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 774 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 775 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 776 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 777 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 778 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 779 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdoc">Returns the name of the layer. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00305">Layer.hpp:305</a></div></div> |
| 780 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 781 | </div><!-- fragment --> |
| 782 | </div> |
| 783 | </div> |
| 784 | <a id="a25f2d4d1faf84d756ab1a27d3d14cc43"></a> |
| 785 | <h2 class="memtitle"><span class="permalink"><a href="#a25f2d4d1faf84d756ab1a27d3d14cc43">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[17/21]</span></h2> |
| 786 | |
| 787 | <div class="memitem"> |
| 788 | <div class="memproto"> |
| 789 | <table class="memname"> |
| 790 | <tr> |
| 791 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 792 | <td>(</td> |
| 793 | <td class="paramtype">PropagatedDependencies </td> |
| 794 | <td class="paramname"></td><td>)</td> |
| 795 | <td></td> |
| 796 | </tr> |
| 797 | </table> |
| 798 | </div><div class="memdoc"> |
| 799 | |
| 800 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l01026">1026</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 801 | |
| 802 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_graph_8hpp_source.xhtml#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 803 | <div class="fragment"><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span> {</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>  <span class="comment">// Version of IslandInTheMiddle with longer chain</span></div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>  <span class="comment">// to make sure antecedents are propagated.</span></div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>  <span class="comment">/*</span></div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span> <span class="comment"> M0</span></div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span> <span class="comment"> / \</span></div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span> <span class="comment"> M1 M4</span></div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span> <span class="comment"> | |</span></div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span> <span class="comment"> M2 X1 < the island in the middle !</span></div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span> <span class="comment"> | |</span></div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span> <span class="comment"> | M10</span></div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span> <span class="comment"> | |</span></div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span> <span class="comment"> | X2 < another island in the middle !</span></div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span> <span class="comment"> | |</span></div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span> <span class="comment"> M3 M5</span></div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span> <span class="comment"> \ /</span></div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span> <span class="comment"> M6</span></div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span> <span class="comment"> */</span></div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span> </div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>  <span class="keyword">auto</span> m6 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"m6"</span>);</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>  <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m6->GetInputSlot(0),</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>  <span class="stringliteral">"m3"</span>);</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>  <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m3-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>  <span class="stringliteral">"m2"</span>);</div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>  <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>  <span class="stringliteral">"m1"</span>);</div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>  <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(m1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">"m0"</span>);</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span> </div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>  <span class="keyword">auto</span> m5 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m6->GetInputSlot(1),</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>  <span class="stringliteral">"m5"</span>);</div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>  <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m5-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"x2"</span>);</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>  <span class="keyword">auto</span> m10 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(x2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"m10"</span>);</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>  <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(m10-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>  <span class="stringliteral">"x1"</span>);</div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>  <span class="keyword">auto</span> m4 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(x1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{},</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>  <span class="stringliteral">"m4"</span>);</div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span> </div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>  <span class="comment">// Connect the other branch to the input layer</span></div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span>  m0-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m4-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span> </div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>  <span class="comment">// All selected 'M*' layers will be of Activation type</span></div><div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>  graph,</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>  <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>& l)</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>  {</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>  <span class="keywordtype">bool</span> toSelect = std::string(l.<a class="code" href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>())[0] == <span class="charliteral">'m'</span>;</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>  });</div><div class="line"><a name="l01085"></a><span class="lineno"> 1085</span> </div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>  <span class="comment">// expected results to test against</span></div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>  <span class="keyword">auto</span> largerSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m0 }),</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ m3, m4 }),</div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>  { m0, m1, m2, m3, m4 });</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span> </div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>  <span class="keyword">auto</span> mediumSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(std::vector<InputSlot*>{ &m5-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), &m6->GetInputSlot(0) },</div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>  std::vector<OutputSlot*>{}, { m5, m6 });</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span> </div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>  <span class="keyword">auto</span> smallerSubgraph =</div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m10 }), <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ m10 }), { m10 });</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span> </div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>  BOOST_TEST(subgraphs.size() == 3);</div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>  <span class="keywordflow">if</span> (subgraphs.size() == 3)</div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>  {</div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>  <span class="comment">// we need to have valid subgraph pointers here</span></div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>  BOOST_TEST((subgraphs[2] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span> </div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[2].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>  {</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>  <span class="comment">// sort the subgraphs by layer size, so it is simpler to test</span></div><div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>  std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>  [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>& lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>& rhs)</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>  {</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>  <span class="keywordflow">return</span> (lhs->GetLayers().size() < rhs->GetLayers().size());</div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>  }</div><div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>  );</div><div class="line"><a name="l01114"></a><span class="lineno"> 1114</span> </div><div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>  CompareSubgraphViews(subgraphs[0], smallerSubgraph);</div><div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>  CompareSubgraphViews(subgraphs[1], mediumSubgraph);</div><div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>  CompareSubgraphViews(subgraphs[2], largerSubgraph);</div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>  }</div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>  }</div><div class="line"><a name="l01120"></a><span class="lineno"> 1120</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 804 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 805 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 806 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 807 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 808 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 809 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 810 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 811 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 812 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 813 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 814 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 815 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 816 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 817 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 818 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdoc">Returns the name of the layer. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00305">Layer.hpp:305</a></div></div> |
| 819 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &insertBefore, Args &&... args)</div><div class="ttdoc">Inserts a new layer between the output slot currently connected to insertBefore and insertBefore itse...</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00409">Graph.hpp:409</a></div></div> |
| 820 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 821 | </div><!-- fragment --> |
| 822 | </div> |
| 823 | </div> |
| 824 | <a id="a1e046d7b4eb0f8382db7961e5cc7b3d4"></a> |
| 825 | <h2 class="memtitle"><span class="permalink"><a href="#a1e046d7b4eb0f8382db7961e5cc7b3d4">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[18/21]</span></h2> |
| 826 | |
| 827 | <div class="memitem"> |
| 828 | <div class="memproto"> |
| 829 | <table class="memname"> |
| 830 | <tr> |
| 831 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 832 | <td>(</td> |
| 833 | <td class="paramtype">Random </td> |
| 834 | <td class="paramname"></td><td>)</td> |
| 835 | <td></td> |
| 836 | </tr> |
| 837 | </table> |
| 838 | </div><div class="memdoc"> |
| 839 | |
| 840 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l01122">1122</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 841 | |
| 842 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_output_shape_of_squeeze_8cpp.xhtml#ae3a6cb217a792718f2bd0e8f45e3ca9e">BOOST_AUTO_TEST_SUITE()</a>, <a class="el" href="_profiler_tests_8cpp.xhtml#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4acb17869fe51048b5a5c4c6106551a255">armnn::Constant</a>, <a class="el" href="namespacearmnn.xhtml#a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d">armnn::debug</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00055">InputSlot::GetConnectedOutputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00231">Layer::GetInputSlots()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00308">Layer::GetNumOutputSlots()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::Input</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00081">Graph::SerializeToDot()</a>.</p> |
| 843 | <div class="fragment"><div class="line"><a name="l01123"></a><span class="lineno"> 1123</span> {</div><div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>  <span class="comment">// Creates random networks, splits them into subgraphs and checks the resulting subgraphs obey the required</span></div><div class="line"><a name="l01125"></a><span class="lineno"> 1125</span>  <span class="comment">// dependency rules. We can easily generate very large networks which helps cover corner cases the other</span></div><div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>  <span class="comment">// small, manually crafted tests have missed. We can also use this to measure performance on large networks.</span></div><div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>  constexpr <span class="keywordtype">bool</span> <a class="code" href="namespacearmnn.xhtml#a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d">debug</a> = <span class="keyword">false</span>; <span class="comment">// Enable this to dump dot files and performance timings.</span></div><div class="line"><a name="l01128"></a><span class="lineno"> 1128</span> </div><div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>  std::mt19937 randomGenerator;</div><div class="line"><a name="l01130"></a><span class="lineno"> 1130</span> </div><div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>  <span class="comment">// Helper function to get a random number in [0, maxExclusive)</span></div><div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>  <span class="keyword">auto</span> GetRandom = [&randomGenerator](<span class="keyword">auto</span> maxExclusive) {</div><div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>  <span class="comment">// Note we could use uniform_int_distribution here, but that gives inconsistent results across platforms</span></div><div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>  <span class="comment">// which makes it harder to reproduce results.</span></div><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>  <span class="comment">// It appears that uniform_real_distribution is consistent across MSVC and gcc so we use that and round it.</span></div><div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>  std::uniform_real_distribution<float> uniform(0.0f, 1.0f);</div><div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>  <span class="keywordflow">return</span> <span class="keyword">static_cast<</span>decltype(maxExclusive)<span class="keyword">></span>(uniform(randomGenerator) * <span class="keyword">static_cast<</span><span class="keywordtype">float</span><span class="keyword">></span>(maxExclusive));</div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>  };</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>  <span class="comment">// Helper function to get a bool that has probability 'trueProb' of being true.</span></div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>  <span class="keyword">auto</span> GetRandomFlag = [&randomGenerator](<span class="keywordtype">float</span> trueProb) {</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>  std::uniform_real_distribution<float> uniform(0.0f, 1.0f);</div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>  <span class="keywordflow">return</span> uniform(randomGenerator) < trueProb;</div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>  };</div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span> </div><div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>  constexpr uint32_t numTests = 100;</div><div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>  <span class="keywordflow">for</span> (uint32_t testIdx = 0; testIdx < numTests; ++testIdx)</div><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>  {</div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>  randomGenerator.seed(testIdx); <span class="comment">// Set a deterministic seed for reproducibility.</span></div><div class="line"><a name="l01149"></a><span class="lineno"> 1149</span> </div><div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>  <span class="comment">// Create random graph</span></div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>  {</div><div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>  <span class="comment">// First add the layers, without any connections. The following random constants determine the number of</span></div><div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>  <span class="comment">// each layer to add, along with the chance that each layer will be 'supported' (i.e. selected for</span></div><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>  <span class="comment">// inclusion in the resulting subgraphs).</span></div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>  uint32_t numInputs = 1 + GetRandom(4u);</div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>  uint32_t numConstants = 1 + GetRandom(4u);</div><div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>  uint32_t numOutputs = 1 + GetRandom(4u);</div><div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>  uint32_t numConcats = 0 + GetRandom(500u);</div><div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>  uint32_t numSplits = 0 + GetRandom(500u);</div><div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>  <span class="keywordtype">float</span> supportedProb = 0.7f;</div><div class="line"><a name="l01162"></a><span class="lineno"> 1162</span> </div><div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>  <span class="keywordflow">for</span> (uint32_t i = 0; i < numInputs; ++i)</div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>  {</div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>  std::string name = <span class="stringliteral">"input"</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">"S"</span> : <span class="stringliteral">"N"</span>);</div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(<span class="keyword">static_cast<</span><a class="code" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">LayerBindingId</a><span class="keyword">></span>(i), name.c_str());</div><div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>  }</div><div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>  <span class="keywordflow">for</span> (uint32_t i = 0; i < numConstants; ++i)</div><div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>  {</div><div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>  std::string name = <span class="stringliteral">"constant"</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">"S"</span> : <span class="stringliteral">"N"</span>);</div><div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_constant_layer.xhtml">ConstantLayer</a>>(name.c_str());</div><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>  }</div><div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>  <span class="keywordflow">for</span> (uint32_t i = 0; i < numOutputs; ++i)</div><div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>  {</div><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>  std::string name = <span class="stringliteral">"output"</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">"S"</span> : <span class="stringliteral">"N"</span>);</div><div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(<span class="keyword">static_cast<</span><a class="code" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">LayerBindingId</a><span class="keyword">></span>(i), name.c_str());</div><div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>  }</div><div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>  <span class="keywordflow">for</span> (uint32_t i = 0; i < numConcats; ++i)</div><div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>  {</div><div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>  std::string name = <span class="stringliteral">"concat"</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">"S"</span> : <span class="stringliteral">"N"</span>);</div><div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>  uint32_t numInputs = 1 + GetRandom(3u);</div><div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDesc(numInputs);</div><div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDesc, name.c_str());</div><div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>  }</div><div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>  <span class="keywordflow">for</span> (uint32_t i = 0; i < numSplits; ++i)</div><div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>  {</div><div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>  std::string name = <span class="stringliteral">"split"</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">"S"</span> : <span class="stringliteral">"N"</span>);</div><div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>  uint32_t numOutputs = 1 + GetRandom(3u);</div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitDesc(numOutputs);</div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_splitter_layer.xhtml">SplitterLayer</a>>(splitDesc, name.c_str());</div><div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>  }</div><div class="line"><a name="l01192"></a><span class="lineno"> 1192</span> </div><div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>  <span class="comment">// Associate each layer with a "depth" parameter. This is used when creating connections to ensure</span></div><div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>  <span class="comment">// that we don't have any loops, by only connecting to layers with a lower "depth".</span></div><div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>  <span class="comment">// This can be thought of as distance from the "top" of the graph (assuming the graph flows top-to-bottom).</span></div><div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>  <span class="comment">// Unfortunately this approach ends up producing very "wide" graphs,</span></div><div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>  <span class="comment">// which probably isn't very representative of 'real' networks.</span></div><div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>  uint32_t maxLayerDepth = 5 + GetRandom(2000u);</div><div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>  std::map<Layer*, uint32_t> layerDepths;</div><div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>  std::map<uint32_t, std::vector<Layer*>> layersAtDepth;</div><div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>  <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* layer : graph)</div><div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>  {</div><div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>  uint32_t depth;</div><div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>  <span class="keywordflow">if</span> (layer->GetType() == LayerType::Input || layer->GetType() == LayerType::Constant)</div><div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>  {</div><div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>  <span class="comment">// There needs to be at least one input-like layer above everything else, otherwise would be</span></div><div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>  <span class="comment">// nothing for them to connect to!</span></div><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>  depth = 0;</div><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>  }</div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>  {</div><div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>  <span class="comment">// Other layers are randomly assigned to later depths.</span></div><div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>  depth = 1 + GetRandom(maxLayerDepth);</div><div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>  }</div><div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>  layerDepths[layer] = depth;</div><div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>  layersAtDepth[depth].push_back(layer);</div><div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>  }</div><div class="line"><a name="l01218"></a><span class="lineno"> 1218</span> </div><div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>  <span class="comment">// Connect layers to each other. Every input slot of every layer must be connected, but it doesn't</span></div><div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>  <span class="comment">// matter if an output slot goes unused.</span></div><div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>  <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* layer : graph)</div><div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>  {</div><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>  <span class="keywordflow">for</span> (uint32_t inputSlotIdx = 0; inputSlotIdx < layer->GetNumInputSlots(); ++inputSlotIdx)</div><div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>  {</div><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>  <a class="code" href="classarmnn_1_1_input_slot.xhtml">InputSlot</a>& inputSlot = layer->GetInputSlot(inputSlotIdx);</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>  uint32_t maxLayerDepthToConnectTo = layerDepths[layer]; <span class="comment">// This prevents a connection causing a loop</span></div><div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>  <span class="comment">// Finding a layer to connect to may take multiple attempts, so keep trying until it works.</span></div><div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>  <span class="keywordflow">while</span> (inputSlot.<a class="code" href="classarmnn_1_1_input_slot.xhtml#a9effd325a6d512a3f8ff4bd207d53255">GetConnectedOutputSlot</a>() == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>  {</div><div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>  uint32_t layerDepth = GetRandom(maxLayerDepthToConnectTo);</div><div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>  <span class="keyword">const</span> std::vector<Layer*>& layersToChooseFrom = layersAtDepth[layerDepth];</div><div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>  <span class="keywordflow">if</span> (layersToChooseFrom.size() == 0)</div><div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>  {</div><div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>  }</div><div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* layerToConnectWith = layersToChooseFrom[GetRandom(layersToChooseFrom.size())];</div><div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>  <span class="keywordflow">if</span> (layerToConnectWith-><a class="code" href="classarmnn_1_1_layer.xhtml#a1594bddc87d6477df300317658f566bb">GetNumOutputSlots</a>() == 0)</div><div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>  {</div><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>  }</div><div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>  uint32_t outputSlotIdx = GetRandom(layerToConnectWith-><a class="code" href="classarmnn_1_1_layer.xhtml#a1594bddc87d6477df300317658f566bb">GetNumOutputSlots</a>());</div><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>  layerToConnectWith-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(outputSlotIdx).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(inputSlot);</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>  }</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>  }</div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>  }</div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>  }</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span> </div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>  <span class="keywordflow">if</span> (debug)</div><div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>  {</div><div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>  std::ofstream f(<span class="stringliteral">"INPUT_"</span> + std::to_string(testIdx) + <span class="stringliteral">".dot"</span>);</div><div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>  graph.SerializeToDot(f);</div><div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>  }</div><div class="line"><a name="l01253"></a><span class="lineno"> 1253</span> </div><div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>  <span class="comment">// Run the splitting algorithm, selecting all nodes ending in an 'S' (as randomly assigned above).</span></div><div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>  <span class="keyword">auto</span> startTime = std::chrono::high_resolution_clock::now();</div><div class="line"><a name="l01256"></a><span class="lineno"> 1256</span> </div><div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>  SubgraphViewSelector::SelectSubgraphs(graph,</div><div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>& l) { <span class="keywordflow">return</span> std::string(l.<a class="code" href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>()).back() == <span class="charliteral">'S'</span>; });</div><div class="line"><a name="l01260"></a><span class="lineno"> 1260</span> </div><div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>  <span class="keyword">auto</span> endTime = std::chrono::high_resolution_clock::now();</div><div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>  <span class="keyword">auto</span> duration = std::chrono::duration_cast<std::chrono::microseconds>(endTime - startTime);</div><div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>  <span class="keywordflow">if</span> (debug)</div><div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>  {</div><div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>  std::cout << <span class="stringliteral">"Test "</span> << testIdx << <span class="stringliteral">": "</span> << duration.count() << <span class="stringliteral">" microseconds"</span> << std::endl;</div><div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>  }</div><div class="line"><a name="l01267"></a><span class="lineno"> 1267</span> </div><div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>  <span class="comment">// Build a map of which subgraph is assigned to each layer.</span></div><div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>  <span class="comment">// This helps some of the following code.</span></div><div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>  std::map<Layer*, SubgraphView*> layerToSubgraph;</div><div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>  <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* layer : graph)</div><div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>  {</div><div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>  <span class="keywordtype">size_t</span> i = 0;</div><div class="line"><a name="l01274"></a><span class="lineno"> 1274</span>  <span class="keywordflow">for</span> (std::unique_ptr<SubgraphView>& subgraph : subgraphs)</div><div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>  {</div><div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>  std::string name = std::to_string(i++);</div><div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>  <span class="keywordflow">if</span> (std::find(subgraph->begin(), subgraph->end(), layer) != subgraph->end())</div><div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>  {</div><div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>  layerToSubgraph[layer] = subgraph.get();</div><div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>  }</div><div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>  }</div><div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>  }</div><div class="line"><a name="l01284"></a><span class="lineno"> 1284</span> </div><div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>  <span class="keywordflow">if</span> (debug)</div><div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>  {</div><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>  <span class="comment">// Before dumping the dot file, set each Layer's BackendId property so that the dot file</span></div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>  <span class="comment">// shows the resulting subgraph assignments.</span></div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>  <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* layer : graph)</div><div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>  {</div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>  std::string name = <span class="stringliteral">"NotAssigned"</span>;</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>  <span class="keyword">auto</span> subgraphIt = layerToSubgraph.find(layer);</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>  <span class="keywordflow">if</span> (subgraphIt != layerToSubgraph.end())</div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>  {</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>  <span class="keyword">auto</span> subgraphIdx = std::distance(subgraphs.begin(),</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>  std::find_if(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>  [&](<span class="keyword">auto</span>& s) { <span class="keywordflow">return</span> s.get() == subgraphIt->second; }));</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>  name = std::to_string(subgraphIdx);</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>  }</div><div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>  layer->SetBackendId(<a class="code" href="classarmnn_1_1_backend_id.xhtml">armnn::BackendId</a>(name));</div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>  }</div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span> </div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>  std::ofstream f(<span class="stringliteral">"GRAPH_"</span> + std::to_string(testIdx) + <span class="stringliteral">".dot"</span>);</div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>  graph.SerializeToDot(f);</div><div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>  }</div><div class="line"><a name="l01306"></a><span class="lineno"> 1306</span> </div><div class="line"><a name="l01307"></a><span class="lineno"> 1307</span>  <span class="comment">// Check the dependencies between subgraphs to make sure that the algorithm has produced a valid result.</span></div><div class="line"><a name="l01308"></a><span class="lineno"> 1308</span>  <span class="comment">// Starting from each of the input slots of each subgraph, recurse up the graph and ensure that we never</span></div><div class="line"><a name="l01309"></a><span class="lineno"> 1309</span>  <span class="comment">// encounter a layer that belongs to the subgraph that we started from.</span></div><div class="line"><a name="l01310"></a><span class="lineno"> 1310</span>  <span class="keywordflow">for</span> (std::unique_ptr<SubgraphView>& subgraph : subgraphs)</div><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>  {</div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>  <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_input_slot.xhtml">InputSlot</a>* inputSlot : subgraph->GetInputSlots())</div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>  {</div><div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>  std::queue<Layer*> toProcess;</div><div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>  toProcess.push(&inputSlot-><a class="code" href="classarmnn_1_1_input_slot.xhtml#a9effd325a6d512a3f8ff4bd207d53255">GetConnectedOutputSlot</a>()-><a class="code" href="classarmnn_1_1_output_slot.xhtml#a7ddaf04177053a536f0e7be83a642bc6">GetOwningLayer</a>());</div><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>  <span class="keywordflow">while</span> (toProcess.size() > 0)</div><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>  {</div><div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* l = toProcess.front();</div><div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>  toProcess.pop();</div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span> </div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(layerToSubgraph[l] != subgraph.get());</div><div class="line"><a name="l01322"></a><span class="lineno"> 1322</span> </div><div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_input_slot.xhtml">InputSlot</a>& is : l-><a class="code" href="classarmnn_1_1_layer.xhtml#af5f530544d09a44d726f24702b67b35b">GetInputSlots</a>())</div><div class="line"><a name="l01324"></a><span class="lineno"> 1324</span>  {</div><div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>  toProcess.push(&is.GetConnectedOutputSlot()->GetOwningLayer());</div><div class="line"><a name="l01326"></a><span class="lineno"> 1326</span>  }</div><div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>  }</div><div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>  }</div><div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>  }</div><div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>  }</div><div class="line"><a name="l01331"></a><span class="lineno"> 1331</span> }</div><div class="ttc" id="namespacearmnn_xhtml_a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d"><div class="ttname"><a href="namespacearmnn.xhtml#a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d">armnn::BoostLogSeverityMapping::debug</a></div></div> |
| 844 | <div class="ttc" id="classarmnn_1_1_constant_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_constant_layer.xhtml">armnn::ConstantLayer</a></div><div class="ttdoc">A layer that the constant data can be bound to. </div><div class="ttdef"><b>Definition:</b> <a href="_constant_layer_8hpp_source.xhtml#l00015">ConstantLayer.hpp:15</a></div></div> |
| 845 | <div class="ttc" id="classarmnn_1_1_splitter_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.xhtml">armnn::SplitterLayer</a></div><div class="ttdoc">This layer represents a split operation. </div><div class="ttdef"><b>Definition:</b> <a href="_splitter_layer_8hpp_source.xhtml#l00013">SplitterLayer.hpp:13</a></div></div> |
| 846 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 847 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 848 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a7ddaf04177053a536f0e7be83a642bc6"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a7ddaf04177053a536f0e7be83a642bc6">armnn::OutputSlot::GetOwningLayer</a></div><div class="ttdeci">Layer & GetOwningLayer() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00115">Layer.hpp:115</a></div></div> |
| 849 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 850 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml">armnn::InputSlot</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00041">Layer.hpp:41</a></div></div> |
| 851 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_af5f530544d09a44d726f24702b67b35b"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#af5f530544d09a44d726f24702b67b35b">armnn::Layer::GetInputSlots</a></div><div class="ttdeci">const std::vector< InputSlot > & GetInputSlots() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00231">Layer.hpp:231</a></div></div> |
| 852 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a1594bddc87d6477df300317658f566bb"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a1594bddc87d6477df300317658f566bb">armnn::Layer::GetNumOutputSlots</a></div><div class="ttdeci">unsigned int GetNumOutputSlots() const override</div><div class="ttdoc">Returns the number of connectable output slots. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00308">Layer.hpp:308</a></div></div> |
| 853 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div> |
| 854 | <div class="ttc" id="namespacearmnn_xhtml_ab8cf8f9fb6792e654c2d8d8382f6f01b"><div class="ttname"><a href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a></div><div class="ttdeci">int LayerBindingId</div><div class="ttdoc">Type of identifiers for bindable layers (inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00171">Types.hpp:171</a></div></div> |
| 855 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 856 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 857 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 858 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 859 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a9effd325a6d512a3f8ff4bd207d53255"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a9effd325a6d512a3f8ff4bd207d53255">armnn::InputSlot::GetConnectedOutputSlot</a></div><div class="ttdeci">const OutputSlot * GetConnectedOutputSlot() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00055">Layer.hpp:55</a></div></div> |
| 860 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 861 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 862 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 863 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdoc">Returns the name of the layer. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00305">Layer.hpp:305</a></div></div> |
| 864 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 865 | <div class="ttc" id="classarmnn_1_1_backend_id_xhtml"><div class="ttname"><a href="classarmnn_1_1_backend_id.xhtml">armnn::BackendId</a></div><div class="ttdef"><b>Definition:</b> <a href="_backend_id_8hpp_source.xhtml#l00075">BackendId.hpp:75</a></div></div> |
| 866 | </div><!-- fragment --> |
| 867 | </div> |
| 868 | </div> |
| 869 | <a id="ad4198d24a503ac7babf90a96bc13e74b"></a> |
| 870 | <h2 class="memtitle"><span class="permalink"><a href="#ad4198d24a503ac7babf90a96bc13e74b">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[19/21]</span></h2> |
| 871 | |
| 872 | <div class="memitem"> |
| 873 | <div class="memproto"> |
| 874 | <table class="memname"> |
| 875 | <tr> |
| 876 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 877 | <td>(</td> |
| 878 | <td class="paramtype">SingleSubgraph </td> |
| 879 | <td class="paramname"></td><td>)</td> |
| 880 | <td></td> |
| 881 | </tr> |
| 882 | </table> |
| 883 | </div><div class="memdoc"> |
| 884 | |
| 885 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l01337">1337</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 886 | |
| 887 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00263">Layer::GetBackendId()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aeafaa4524e3df19ada32643ce9a222362b">armnn::GpuAcc</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00264">Layer::SetBackendId()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 888 | <div class="fragment"><div class="line"><a name="l01338"></a><span class="lineno"> 1338</span> {</div><div class="line"><a name="l01339"></a><span class="lineno"> 1339</span>  <span class="comment">// This test case represents the scenario when we have one subgraph</span></div><div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>  <span class="comment">// in which two layers have GpuAcc backend assigned</span></div><div class="line"><a name="l01341"></a><span class="lineno"> 1341</span> </div><div class="line"><a name="l01342"></a><span class="lineno"> 1342</span>  <span class="comment">//Construct graph</span></div><div class="line"><a name="l01343"></a><span class="lineno"> 1343</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l01344"></a><span class="lineno"> 1344</span> </div><div class="line"><a name="l01345"></a><span class="lineno"> 1345</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l01346"></a><span class="lineno"> 1346</span> </div><div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::GpuAcc);</div><div class="line"><a name="l01350"></a><span class="lineno"> 1350</span> </div><div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>  convLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::GpuAcc);</div><div class="line"><a name="l01353"></a><span class="lineno"> 1353</span> </div><div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l01355"></a><span class="lineno"> 1355</span> </div><div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>  convLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01359"></a><span class="lineno"> 1359</span> </div><div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>  <span class="comment">// GpuAcc sub graph selector</span></div><div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>  graph,</div><div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>  <span class="comment">// select the GpuAcc layers only</span></div><div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l){</div><div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>  <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.xhtml#afdb1d37740e7a083b625d669588b6a0e">GetBackendId</a>() == Compute::GpuAcc);</div><div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>  });</div><div class="line"><a name="l01369"></a><span class="lineno"> 1369</span> </div><div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>  BOOST_TEST(subgraphs.size() == 1);</div><div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>  <span class="keywordflow">if</span>(subgraphs.size() == 1)</div><div class="line"><a name="l01372"></a><span class="lineno"> 1372</span>  {</div><div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span> </div><div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>  {</div><div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputSlots = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(subgraphs[0]->GetInputSlots().size());</div><div class="line"><a name="l01378"></a><span class="lineno"> 1378</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOutputSlots = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(subgraphs[0]->GetOutputSlots().size());</div><div class="line"><a name="l01379"></a><span class="lineno"> 1379</span> </div><div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>  BOOST_TEST((numInputSlots == 1));</div><div class="line"><a name="l01381"></a><span class="lineno"> 1381</span>  BOOST_TEST((numOutputSlots == 1));</div><div class="line"><a name="l01382"></a><span class="lineno"> 1382</span> </div><div class="line"><a name="l01383"></a><span class="lineno"> 1383</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l01384"></a><span class="lineno"> 1384</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraphInputConn1 = subgraphs[0]->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01385"></a><span class="lineno"> 1385</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraphOutputConn1 = subgraphs[0]->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01386"></a><span class="lineno"> 1386</span> </div><div class="line"><a name="l01387"></a><span class="lineno"> 1387</span>  <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l01388"></a><span class="lineno"> 1388</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor(numInputSlots, numOutputSlots);</div><div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor, <span class="stringliteral">"pre-compiled"</span>);</div><div class="line"><a name="l01390"></a><span class="lineno"> 1390</span> </div><div class="line"><a name="l01391"></a><span class="lineno"> 1391</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l01392"></a><span class="lineno"> 1392</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraphs[0], preCompiledLayer);</div><div class="line"><a name="l01393"></a><span class="lineno"> 1393</span> </div><div class="line"><a name="l01394"></a><span class="lineno"> 1394</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l01395"></a><span class="lineno"> 1395</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l01396"></a><span class="lineno"> 1396</span> </div><div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>  BOOST_CHECK_EQUAL(preCompiledLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn1);</div><div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>  }</div><div class="line"><a name="l01399"></a><span class="lineno"> 1399</span>  }</div><div class="line"><a name="l01400"></a><span class="lineno"> 1400</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 889 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 890 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 891 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a3f6ad59212fa8a47c9265162fff8a274"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">armnn::Layer::SetBackendId</a></div><div class="ttdeci">void SetBackendId(const BackendId &id)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00264">Layer.hpp:264</a></div></div> |
| 892 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 893 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 894 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 895 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 896 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 897 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 898 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 899 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_afdb1d37740e7a083b625d669588b6a0e"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#afdb1d37740e7a083b625d669588b6a0e">armnn::Layer::GetBackendId</a></div><div class="ttdeci">const BackendId & GetBackendId() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00263">Layer.hpp:263</a></div></div> |
| 900 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 901 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 902 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 903 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 904 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 905 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 906 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 907 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 908 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 909 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 910 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 911 | </div><!-- fragment --> |
| 912 | </div> |
| 913 | </div> |
| 914 | <a id="a8449c7072fc187ac2d66f217b1d707b1"></a> |
| 915 | <h2 class="memtitle"><span class="permalink"><a href="#a8449c7072fc187ac2d66f217b1d707b1">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[20/21]</span></h2> |
| 916 | |
| 917 | <div class="memitem"> |
| 918 | <div class="memproto"> |
| 919 | <table class="memname"> |
| 920 | <tr> |
| 921 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 922 | <td>(</td> |
| 923 | <td class="paramtype">MultipleSubgraphs </td> |
| 924 | <td class="paramname"></td><td>)</td> |
| 925 | <td></td> |
| 926 | </tr> |
| 927 | </table> |
| 928 | </div><div class="memdoc"> |
| 929 | |
| 930 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l01402">1402</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 931 | |
| 932 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea39f8662ca778258e9c6a14f26fec5ec1">armnn::CpuAcc</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00263">Layer::GetBackendId()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00264">Layer::SetBackendId()</a>, and <a class="el" href="_graph_8cpp_source.xhtml#l00396">Graph::SubstituteSubgraph()</a>.</p> |
| 933 | <div class="fragment"><div class="line"><a name="l01403"></a><span class="lineno"> 1403</span> {</div><div class="line"><a name="l01404"></a><span class="lineno"> 1404</span>  <span class="comment">// This test case represents the scenario when we have two subgraphs</span></div><div class="line"><a name="l01405"></a><span class="lineno"> 1405</span>  <span class="comment">// in which two layers have CpuAcc backend assigned</span></div><div class="line"><a name="l01406"></a><span class="lineno"> 1406</span> </div><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>  <span class="comment">//Construct graph</span></div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l01409"></a><span class="lineno"> 1409</span> </div><div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"input"</span>);</div><div class="line"><a name="l01411"></a><span class="lineno"> 1411</span> </div><div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_splitter_layer.xhtml">SplitterLayer</a>>(splitterDescriptor, <span class="stringliteral">"splitter"</span>);</div><div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::CpuAcc);</div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span> </div><div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv1"</span>);</div><div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_convolution2d_layer.xhtml">Convolution2dLayer</a>>(convDescriptor, <span class="stringliteral">"conv2"</span>);</div><div class="line"><a name="l01419"></a><span class="lineno"> 1419</span> </div><div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> pConcatLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_concat_layer.xhtml">ConcatLayer</a>>(concatDescriptor, <span class="stringliteral">"concat"</span>);</div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>  pConcatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::CpuAcc);</div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span> </div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_output_layer.xhtml">OutputLayer</a>>(0, <span class="stringliteral">"output"</span>);</div><div class="line"><a name="l01425"></a><span class="lineno"> 1425</span> </div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>  inputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>  splitterLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2->GetInputSlot(0));</div><div class="line"><a name="l01429"></a><span class="lineno"> 1429</span>  convLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(pConcatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>  convLayer2->GetOutputSlot(0).Connect(pConcatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l01431"></a><span class="lineno"> 1431</span>  pConcatLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01432"></a><span class="lineno"> 1432</span> </div><div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>  <span class="comment">// CpuAcc sub graph selector</span></div><div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>  graph,</div><div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>  <span class="comment">// select the CpuAcc layers only</span></div><div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l){</div><div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>  <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.xhtml#afdb1d37740e7a083b625d669588b6a0e">GetBackendId</a>() == Compute::CpuAcc);</div><div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>  });</div><div class="line"><a name="l01442"></a><span class="lineno"> 1442</span> </div><div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>  BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>  <span class="keywordflow">if</span>(subgraphs.size() == 2)</div><div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>  {</div><div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01448"></a><span class="lineno"> 1448</span> </div><div class="line"><a name="l01449"></a><span class="lineno"> 1449</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01450"></a><span class="lineno"> 1450</span>  {</div><div class="line"><a name="l01451"></a><span class="lineno"> 1451</span>  <span class="comment">//Sort subgraphs by their inputSlot size.</span></div><div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>  std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>  [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> & lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> & rhs)</div><div class="line"><a name="l01454"></a><span class="lineno"> 1454</span>  {</div><div class="line"><a name="l01455"></a><span class="lineno"> 1455</span>  <span class="keywordflow">return</span> (lhs->GetInputSlots().size() < rhs->GetInputSlots().size());</div><div class="line"><a name="l01456"></a><span class="lineno"> 1456</span>  }</div><div class="line"><a name="l01457"></a><span class="lineno"> 1457</span>  );</div><div class="line"><a name="l01458"></a><span class="lineno"> 1458</span> </div><div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputSlots1 = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(subgraphs[0]->GetInputSlots().size());</div><div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOutputSlots1 = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(subgraphs[0]->GetOutputSlots().size());</div><div class="line"><a name="l01461"></a><span class="lineno"> 1461</span> </div><div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputSlots2 = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(subgraphs[1]->GetInputSlots().size());</div><div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOutputSlots2 = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(subgraphs[1]->GetOutputSlots().size());</div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span> </div><div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraph1InputConn = subgraphs[0]->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraph1OutputConn1 = subgraphs[0]->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraph1OutputConn2 = subgraphs[0]->GetOutputSlot(1)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span> </div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>  <span class="comment">// Save sub-graph connections for comparison after substitution</span></div><div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraph2InputConn1 = subgraphs[1]->GetInputSlot(0)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">IOutputSlot</a>* subgraph2InputConn2 = subgraphs[1]->GetInputSlot(1)-><a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>  <a class="code" href="classarmnn_1_1_i_input_slot.xhtml">IInputSlot</a>* subgraph2OutputConn = subgraphs[1]->GetOutputSlot(0)-><a class="code" href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span> </div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor1(numInputSlots1, numOutputSlots1);</div><div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor1, <span class="stringliteral">"pre-compiled1"</span>);</div><div class="line"><a name="l01477"></a><span class="lineno"> 1477</span> </div><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>  <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.xhtml">PreCompiledDescriptor</a> preCompiledDescriptor2(numInputSlots2, numOutputSlots2);</div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>  <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a>* <span class="keyword">const</span> preCompiledLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_pre_compiled_layer.xhtml">PreCompiledLayer</a>>(preCompiledDescriptor2, <span class="stringliteral">"pre-compiled2"</span>);</div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span> </div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>  <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraphs[0], preCompiledLayer1);</div><div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>  graph.<a class="code" href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraphs[1], preCompiledLayer2);</div><div class="line"><a name="l01484"></a><span class="lineno"> 1484</span> </div><div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>  <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>  BOOST_CHECK_EQUAL(preCompiledLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraph1InputConn);</div><div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>  BOOST_CHECK_EQUAL(preCompiledLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraph1OutputConn1);</div><div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>  BOOST_CHECK_EQUAL(preCompiledLayer1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraph1OutputConn2);</div><div class="line"><a name="l01489"></a><span class="lineno"> 1489</span> </div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>  BOOST_CHECK_EQUAL(preCompiledLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraph2InputConn1);</div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>  BOOST_CHECK_EQUAL(preCompiledLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1).<a class="code" href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraph2InputConn2);</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>  BOOST_CHECK_EQUAL(preCompiledLayer2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraph2OutputConn);</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>  }</div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>  }</div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span> }</div><div class="ttc" id="classarmnn_1_1_splitter_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.xhtml">armnn::SplitterLayer</a></div><div class="ttdoc">This layer represents a split operation. </div><div class="ttdef"><b>Definition:</b> <a href="_splitter_layer_8hpp_source.xhtml#l00013">SplitterLayer.hpp:13</a></div></div> |
| 934 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 935 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 936 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 937 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 938 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a3f6ad59212fa8a47c9265162fff8a274"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a3f6ad59212fa8a47c9265162fff8a274">armnn::Layer::SetBackendId</a></div><div class="ttdeci">void SetBackendId(const BackendId &id)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00264">Layer.hpp:264</a></div></div> |
| 939 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div> |
| 940 | <div class="ttc" id="classarmnn_1_1_input_slot_xhtml_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.xhtml#a3153abb7c0c0a84629079b2fac7db54f">armnn::InputSlot::GetConnection</a></div><div class="ttdeci">const IOutputSlot * GetConnection() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00199">Layer.hpp:199</a></div></div> |
| 941 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 942 | <div class="ttc" id="classarmnn_1_1_output_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_output_layer.xhtml">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.xhtml#l00013">OutputLayer.hpp:13</a></div></div> |
| 943 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 944 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 945 | <div class="ttc" id="classarmnn_1_1_concat_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_concat_layer.xhtml">armnn::ConcatLayer</a></div><div class="ttdoc">This layer represents a merge operation. </div><div class="ttdef"><b>Definition:</b> <a href="_concat_layer_8hpp_source.xhtml#l00013">ConcatLayer.hpp:13</a></div></div> |
| 946 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 947 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 948 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_afdb1d37740e7a083b625d669588b6a0e"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#afdb1d37740e7a083b625d669588b6a0e">armnn::Layer::GetBackendId</a></div><div class="ttdeci">const BackendId & GetBackendId() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00263">Layer.hpp:263</a></div></div> |
| 949 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 950 | <div class="ttc" id="classarmnn_1_1_graph_xhtml_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdoc">Substitutes the given sub-graph with either a new layer or a new sub-graph. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.xhtml#l00396">Graph.cpp:396</a></div></div> |
| 951 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 952 | <div class="ttc" id="classarmnn_1_1_pre_compiled_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.xhtml">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.xhtml#l00022">PreCompiledLayer.hpp:22</a></div></div> |
| 953 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 954 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div> |
| 955 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 956 | <div class="ttc" id="classarmnn_1_1_convolution2d_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.xhtml">armnn::Convolution2dLayer</a></div><div class="ttdoc">This layer represents a convolution 2d operation. </div><div class="ttdef"><b>Definition:</b> <a href="_convolution2d_layer_8hpp_source.xhtml#l00015">Convolution2dLayer.hpp:15</a></div></div> |
| 957 | <div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.xhtml">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l01066">Descriptors.hpp:1066</a></div></div> |
| 958 | <div class="ttc" id="classarmnn_1_1_i_input_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.xhtml">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00024">INetwork.hpp:24</a></div></div> |
| 959 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 960 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#a048e8c1536cf6b8871b093a73a4a3a85">armnn::OutputSlot::GetConnection</a></div><div class="ttdeci">const InputSlot * GetConnection(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00046">Layer.cpp:46</a></div></div> |
| 961 | </div><!-- fragment --> |
| 962 | </div> |
| 963 | </div> |
| 964 | <a id="a4612ae0ff7acb1d5063a7f5d8cff3a4b"></a> |
| 965 | <h2 class="memtitle"><span class="permalink"><a href="#a4612ae0ff7acb1d5063a7f5d8cff3a4b">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[21/21]</span></h2> |
| 966 | |
| 967 | <div class="memitem"> |
| 968 | <div class="memproto"> |
| 969 | <table class="memname"> |
| 970 | <tr> |
| 971 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 972 | <td>(</td> |
| 973 | <td class="paramtype">SubgraphCycles </td> |
| 974 | <td class="paramname"></td><td>)</td> |
| 975 | <td></td> |
| 976 | </tr> |
| 977 | </table> |
| 978 | </div><div class="memdoc"> |
| 979 | |
| 980 | <p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml#l01497">1497</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.xhtml">SubgraphViewTests.cpp</a>.</p> |
| 981 | |
| 982 | <p class="reference">References <a class="el" href="_graph_8hpp_source.xhtml#l00397">Graph::AddLayer()</a>, <a class="el" href="_profiler_tests_8cpp.xhtml#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.xhtml#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00216">Layer::GetNameStr()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00254">SubgraphViewSelector::SelectSubgraphs()</a>.</p> |
| 983 | <div class="fragment"><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span> {</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>  <span class="comment">// This case represent the scenario when a naive split could lead to a cyclic dependency between two subgraphs</span></div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>  <span class="comment">//</span></div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>  <span class="comment">// X0 -> M0 -> X1 -> M2 -> X2</span></div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>  <span class="comment">// X0 -> M0 -> M1 -> M2 -> X2</span></div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>  <span class="comment">//</span></div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>  <span class="comment">/*</span></div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span> <span class="comment"> X0</span></div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span> <span class="comment"> |</span></div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span> <span class="comment"> |</span></div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span> <span class="comment"> M0</span></div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span> <span class="comment"> / |</span></div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span> <span class="comment"> / |</span></div><div class="line"><a name="l01511"></a><span class="lineno"> 1511</span> <span class="comment"> X1 M1</span></div><div class="line"><a name="l01512"></a><span class="lineno"> 1512</span> <span class="comment"> \ /</span></div><div class="line"><a name="l01513"></a><span class="lineno"> 1513</span> <span class="comment"> M2</span></div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span> <span class="comment"> |</span></div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span> <span class="comment"> X2</span></div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span> <span class="comment"> */</span></div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>  <span class="comment">// The expected result for this is that M0,M1 will be part of one subgraph and M2 in another and the</span></div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>  <span class="comment">// input and output slots in the subgraphs will be set accordingly.</span></div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>  <span class="comment">//</span></div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>  <a class="code" href="classarmnn_1_1_graph.xhtml">Graph</a> graph;</div><div class="line"><a name="l01521"></a><span class="lineno"> 1521</span> </div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> originsDescriptor(2);</div><div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>  <span class="keyword">auto</span> x0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_input_layer.xhtml">InputLayer</a>>(0, <span class="stringliteral">"x0"</span>);</div><div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>  <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"m0"</span>);</div><div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>  <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"x1"</span>);</div><div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>  <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"m1"</span>);</div><div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>  <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_addition_layer.xhtml">AdditionLayer</a>>(<span class="stringliteral">"m2"</span>);</div><div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>  <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a><<a class="code" href="classarmnn_1_1_activation_layer.xhtml">ActivationLayer</a>>(<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a>{}, <span class="stringliteral">"x2"</span>);</div><div class="line"><a name="l01529"></a><span class="lineno"> 1529</span> </div><div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>  x0-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m0-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>  m0-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(x1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>  m0-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m1-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>  x1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>  m1-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(m2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>  m2-><a class="code" href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">Connect</a>(x2-><a class="code" href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01536"></a><span class="lineno"> 1536</span> </div><div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>  <span class="comment">// All selected 'M*' layers will be have 'm' in the name</span></div><div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>  <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>  SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>  graph,</div><div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>  <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>  [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.xhtml">Layer</a> & l)</div><div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>  {</div><div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>  <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.xhtml#a9a97cb6d32661a57fc33bd29b8e41ff4">GetNameStr</a>().find(<span class="charliteral">'m'</span>) != std::string::npos);</div><div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>  <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>  });</div><div class="line"><a name="l01547"></a><span class="lineno"> 1547</span> </div><div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>  <span class="comment">// expected results to test against</span></div><div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>  <span class="keyword">auto</span> inputSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m0}),</div><div class="line"><a name="l01550"></a><span class="lineno"> 1550</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m0, m1}),</div><div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>  {m0, m1});</div><div class="line"><a name="l01552"></a><span class="lineno"> 1552</span> </div><div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>  <span class="keyword">auto</span> outputSubgraph = <a class="code" href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m2}),</div><div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>  <a class="code" href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m2}),</div><div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>  {m2});</div><div class="line"><a name="l01556"></a><span class="lineno"> 1556</span> </div><div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>  BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>  <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>  {</div><div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>  <span class="comment">// we need to have valid subgraph pointers here</span></div><div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>  BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>  BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01563"></a><span class="lineno"> 1563</span> </div><div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>  <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> && subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>  {</div><div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>  <span class="comment">// sort the subgraphs by layer size, so it is simpler to test</span></div><div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>  std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>  [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> & lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> & rhs)</div><div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>  {</div><div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>  <span class="keywordflow">return</span> (lhs->GetLayers().size() < rhs->GetLayers().size());</div><div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>  }</div><div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>  );</div><div class="line"><a name="l01573"></a><span class="lineno"> 1573</span> </div><div class="line"><a name="l01574"></a><span class="lineno"> 1574</span>  <span class="comment">// one subgraph needs to be size=1 and the other one is 4</span></div><div class="line"><a name="l01575"></a><span class="lineno"> 1575</span>  BOOST_TEST(subgraphs[0]->GetLayers().size() == 1);</div><div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>  BOOST_TEST(subgraphs[1]->GetLayers().size() == 2);</div><div class="line"><a name="l01577"></a><span class="lineno"> 1577</span> </div><div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>  CompareSubgraphViews(subgraphs[0], outputSubgraph);</div><div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>  CompareSubgraphViews(subgraphs[1], inputSubgraph);</div><div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>  }</div><div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>  }</div><div class="line"><a name="l01582"></a><span class="lineno"> 1582</span> }</div><div class="ttc" id="classarmnn_1_1_graph_xhtml_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &&... args)</div><div class="ttdoc">Adds a new layer, of type LayerType, to the graph constructed with the arguments passed. </div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00397">Graph.hpp:397</a></div></div> |
| 984 | <div class="ttc" id="classarmnn_1_1_output_slot_xhtml_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.xhtml#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.xhtml#l00079">Layer.cpp:79</a></div></div> |
| 985 | <div class="ttc" id="classarmnn_1_1_activation_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_activation_layer.xhtml">armnn::ActivationLayer</a></div><div class="ttdoc">This layer represents an activation operation with the specified activation function. </div><div class="ttdef"><b>Definition:</b> <a href="_activation_layer_8hpp_source.xhtml#l00012">ActivationLayer.hpp:12</a></div></div> |
| 986 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00310">Layer.hpp:310</a></div></div> |
| 987 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00012">CommonTestUtils.cpp:12</a></div></div> |
| 988 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 989 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a9a97cb6d32661a57fc33bd29b8e41ff4"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a9a97cb6d32661a57fc33bd29b8e41ff4">armnn::Layer::GetNameStr</a></div><div class="ttdeci">const std::string & GetNameStr() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00216">Layer.hpp:216</a></div></div> |
| 990 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector< SubgraphViewPtr > Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00025">SubgraphViewSelector.hpp:25</a></div></div> |
| 991 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 992 | <div class="ttc" id="classarmnn_1_1_graph_xhtml"><div class="ttname"><a href="classarmnn_1_1_graph.xhtml">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.xhtml#l00029">Graph.hpp:29</a></div></div> |
| 993 | <div class="ttc" id="classarmnn_1_1_addition_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_addition_layer.xhtml">armnn::AdditionLayer</a></div><div class="ttdoc">This layer represents an addition operation. </div><div class="ttdef"><b>Definition:</b> <a href="_addition_layer_8hpp_source.xhtml#l00013">AdditionLayer.hpp:13</a></div></div> |
| 994 | <div class="ttc" id="classarmnn_1_1_subgraph_view_selector_xhtml_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.xhtml#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr< SubgraphView > SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.xhtml#l00024">SubgraphViewSelector.hpp:24</a></div></div> |
| 995 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &&inputs, SubgraphView::OutputSlots &&outputs, SubgraphView::Layers &&layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00038">CommonTestUtils.cpp:38</a></div></div> |
| 996 | <div class="ttc" id="_common_test_utils_8cpp_xhtml_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.xhtml#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector< Layer *> &layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.xhtml#l00025">CommonTestUtils.cpp:25</a></div></div> |
| 997 | <div class="ttc" id="classarmnn_1_1_input_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_input_layer.xhtml">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.xhtml#l00013">InputLayer.hpp:13</a></div></div> |
| 998 | <div class="ttc" id="classarmnn_1_1_layer_xhtml_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index. </div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00312">Layer.hpp:312</a></div></div> |
| 999 | <div class="ttc" id="classarmnn_1_1_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_layer.xhtml">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.xhtml#l00209">Layer.hpp:209</a></div></div> |
| 1000 | </div><!-- fragment --> |
| 1001 | </div> |
| 1002 | </div> |
| 1003 | </div><!-- contents --> |
| 1004 | </div><!-- doc-content --> |
| 1005 | <!-- start footer part --> |
| 1006 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 1007 | <ul> |
| 1008 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_e0a84d05c80a2ef4231141dcbbeac5c8.xhtml">armnn</a></li><li class="navelem"><a class="el" href="dir_9d86fd1fbecbedf5bdb69c7e7235fe5f.xhtml">test</a></li><li class="navelem"><a class="el" href="_subgraph_view_tests_8cpp.xhtml">SubgraphViewTests.cpp</a></li> |
| 1009 | <li class="footer">Generated on Fri Mar 13 2020 16:09:14 for ArmNN by |
| 1010 | <a href="http://www.doxygen.org/index.html"> |
| 1011 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 1012 | </ul> |
| 1013 | </div> |
| 1014 | </body> |
| 1015 | </html> |