blob: 1b4542edf1373fd8be39194e1d2f9f7ed7a7bcc3 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ArmNN: src/armnn/test/SubgraphViewTests.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ArmNN
&#160;<span id="projectnumber">NotReleased</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_subgraph_view_tests_8cpp.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">SubgraphViewTests.cpp File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;boost/test/unit_test.hpp&gt;</code><br />
<code>#include &lt;<a class="el" href="_graph_8hpp_source.html">Graph.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="_subgraph_view_8hpp_source.html">SubgraphView.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="_subgraph_view_selector_8hpp_source.html">SubgraphViewSelector.hpp</a>&gt;</code><br />
<code>#include &lt;<a class="el" href="_cpu_tensor_handle_8hpp_source.html">backendsCommon/CpuTensorHandle.hpp</a>&gt;</code><br />
<code>#include &lt;fstream&gt;</code><br />
<code>#include &lt;map&gt;</code><br />
<code>#include &lt;queue&gt;</code><br />
<code>#include &lt;random&gt;</code><br />
<code>#include &lt;chrono&gt;</code><br />
</div>
<p><a href="_subgraph_view_tests_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6e26a34efaa2d30562089630ee8342f4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a6e26a34efaa2d30562089630ee8342f4">BOOST_AUTO_TEST_CASE</a> (SingleInputSingleOutput)</td></tr>
<tr class="separator:a6e26a34efaa2d30562089630ee8342f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6084a9df9382eb8d81789eea46d562c6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a6084a9df9382eb8d81789eea46d562c6">BOOST_AUTO_TEST_CASE</a> (SingleInputSingleOutputSubstituteGraph)</td></tr>
<tr class="separator:a6084a9df9382eb8d81789eea46d562c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4ce1f124bc0dcc0b0a20b97425fa24d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#ae4ce1f124bc0dcc0b0a20b97425fa24d">BOOST_AUTO_TEST_CASE</a> (MultiInputSingleOutput)</td></tr>
<tr class="separator:ae4ce1f124bc0dcc0b0a20b97425fa24d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a98cde078473107b11a975ff3ce70c0c7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a98cde078473107b11a975ff3ce70c0c7">BOOST_AUTO_TEST_CASE</a> (SingleInputMultiOutput)</td></tr>
<tr class="separator:a98cde078473107b11a975ff3ce70c0c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a199e56ca934c543d8f7c8ff95cca10"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a9a199e56ca934c543d8f7c8ff95cca10">BOOST_AUTO_TEST_CASE</a> (MultiInputMultiOutput)</td></tr>
<tr class="separator:a9a199e56ca934c543d8f7c8ff95cca10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14bcbedd268543ad25bf94f744861e5e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a14bcbedd268543ad25bf94f744861e5e">BOOST_AUTO_TEST_CASE</a> (EraseReplacedLayers)</td></tr>
<tr class="separator:a14bcbedd268543ad25bf94f744861e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acace89e7df91ea3b5ca4676ee6949606"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#acace89e7df91ea3b5ca4676ee6949606">BOOST_AUTO_TEST_CASE</a> (SubgraphForEmptyGraph)</td></tr>
<tr class="separator:acace89e7df91ea3b5ca4676ee6949606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab925b67a19cc95bb350c854b93ecfc0d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#ab925b67a19cc95bb350c854b93ecfc0d">BOOST_AUTO_TEST_CASE</a> (SubgraphForEntireGraph)</td></tr>
<tr class="separator:ab925b67a19cc95bb350c854b93ecfc0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43913f88bb46d81e9a44d69f22d52f06"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a43913f88bb46d81e9a44d69f22d52f06">BOOST_AUTO_TEST_CASE</a> (NoSubgraphsForNoMatch)</td></tr>
<tr class="separator:a43913f88bb46d81e9a44d69f22d52f06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b6b0cf1f850f804946ab5cade49af8c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a3b6b0cf1f850f804946ab5cade49af8c">BOOST_AUTO_TEST_CASE</a> (OneSubgraphsSelectedASingleMatch)</td></tr>
<tr class="separator:a3b6b0cf1f850f804946ab5cade49af8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa25f56b7dec5d9019931a0f9cf1e534"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#aaa25f56b7dec5d9019931a0f9cf1e534">BOOST_AUTO_TEST_CASE</a> (MultipleLayersSelectedInTheMiddle)</td></tr>
<tr class="separator:aaa25f56b7dec5d9019931a0f9cf1e534"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b01e2db18e971df88af09bd414ed032"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a5b01e2db18e971df88af09bd414ed032">BOOST_AUTO_TEST_CASE</a> (DisjointGraphs)</td></tr>
<tr class="separator:a5b01e2db18e971df88af09bd414ed032"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af129c6f1e40cd9a7cfbbfaa64853e364"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#af129c6f1e40cd9a7cfbbfaa64853e364">BOOST_AUTO_TEST_CASE</a> (IslandInTheMiddle)</td></tr>
<tr class="separator:af129c6f1e40cd9a7cfbbfaa64853e364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa07ebba5698b37742326ae94cab2083d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#aa07ebba5698b37742326ae94cab2083d">BOOST_AUTO_TEST_CASE</a> (MultipleSimpleSubgraphs)</td></tr>
<tr class="separator:aa07ebba5698b37742326ae94cab2083d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7573ddbd1f802bfeb9e12e992022d4c0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a7573ddbd1f802bfeb9e12e992022d4c0">BOOST_AUTO_TEST_CASE</a> (SimpleLinearTest)</td></tr>
<tr class="separator:a7573ddbd1f802bfeb9e12e992022d4c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f198cfda61ae25af4d853e6d4ccd7d4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a6f198cfda61ae25af4d853e6d4ccd7d4">BOOST_AUTO_TEST_CASE</a> (ValidMerge)</td></tr>
<tr class="separator:a6f198cfda61ae25af4d853e6d4ccd7d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25f2d4d1faf84d756ab1a27d3d14cc43"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a25f2d4d1faf84d756ab1a27d3d14cc43">BOOST_AUTO_TEST_CASE</a> (PropagatedDependencies)</td></tr>
<tr class="separator:a25f2d4d1faf84d756ab1a27d3d14cc43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e046d7b4eb0f8382db7961e5cc7b3d4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a1e046d7b4eb0f8382db7961e5cc7b3d4">BOOST_AUTO_TEST_CASE</a> (Random)</td></tr>
<tr class="separator:a1e046d7b4eb0f8382db7961e5cc7b3d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4198d24a503ac7babf90a96bc13e74b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#ad4198d24a503ac7babf90a96bc13e74b">BOOST_AUTO_TEST_CASE</a> (SingleSubgraph)</td></tr>
<tr class="separator:ad4198d24a503ac7babf90a96bc13e74b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8449c7072fc187ac2d66f217b1d707b1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a8449c7072fc187ac2d66f217b1d707b1">BOOST_AUTO_TEST_CASE</a> (MultipleSubgraphs)</td></tr>
<tr class="separator:a8449c7072fc187ac2d66f217b1d707b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4612ae0ff7acb1d5063a7f5d8cff3a4b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_subgraph_view_tests_8cpp.html#a4612ae0ff7acb1d5063a7f5d8cff3a4b">BOOST_AUTO_TEST_CASE</a> (SubgraphCycles)</td></tr>
<tr class="separator:a4612ae0ff7acb1d5063a7f5d8cff3a4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a6e26a34efaa2d30562089630ee8342f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e26a34efaa2d30562089630ee8342f4">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[1/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SingleInputSingleOutput&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00134">134</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;{</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="comment">// Construct graph</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;GetInputSlot(0));</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; convLayer2-&gt;GetOutputSlot(0).Connect(outputLayer-&gt;GetInputSlot(0));</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1}),</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer2}),</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; {});</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn = subgraph-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn = subgraph-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(1, 1);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a6084a9df9382eb8d81789eea46d562c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6084a9df9382eb8d81789eea46d562c6">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[2/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SingleInputSingleOutputSubstituteGraph&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00172">172</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160;{</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// Construct graph</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;GetInputSlot(0));</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; convLayer2-&gt;GetOutputSlot(0).Connect(outputLayer-&gt;GetInputSlot(0));</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1}),</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer2}),</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; {});</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn = subgraph-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn = subgraph-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> substituteGraph;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(1, 1);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = substituteGraph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> substituteSubgraph =</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({preCompiledLayer}),</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({preCompiledLayer}),</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; {preCompiledLayer});</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="comment">// Substitute subgraph with pre-compiled layer</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, *substituteSubgraph);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ae4ce1f124bc0dcc0b0a20b97425fa24d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4ce1f124bc0dcc0b0a20b97425fa24d">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[3/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">MultiInputSingleOutput&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00215">215</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;{</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <span class="comment">// Construct graph</span></div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; <a class="code" href="structarmnn_1_1_views_descriptor.html">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_splitter_layer.html">SplitterLayer</a>&gt;(splitterDescriptor, <span class="stringliteral">&quot;splitter&quot;</span>);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;concat&quot;</span>);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;GetInputSlot(0));</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; convLayer2-&gt;GetOutputSlot(0).Connect(concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-&gt;GetInputSlot(0));</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({concatLayer}),</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; {});</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn1 = subgraph-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn2 = subgraph-&gt;GetInputSlot(1)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn = subgraph-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(2, 1);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn2);</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn);</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_views_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.html">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00190">Descriptors.hpp:190</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_splitter_layer_html"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.html">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.html#l00013">SplitterLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a98cde078473107b11a975ff3ce70c0c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a98cde078473107b11a975ff3ce70c0c7">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[4/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SingleInputMultiOutput&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00266">266</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;{</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="comment">// Construct graph</span></div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;concat&quot;</span>);</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <a class="code" href="structarmnn_1_1_views_descriptor.html">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_splitter_layer.html">SplitterLayer</a>&gt;(splitterDescriptor, <span class="stringliteral">&quot;splitter&quot;</span>);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;GetInputSlot(0));</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; convLayer2-&gt;GetOutputSlot(0).Connect(concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-&gt;GetInputSlot(0));</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({splitterLayer}),</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; {});</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn1 = subgraph-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn1 = subgraph-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn2 = subgraph-&gt;GetOutputSlot(1)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(1, 2);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn1);</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn2);</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_views_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.html">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00190">Descriptors.hpp:190</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_splitter_layer_html"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.html">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.html#l00013">SplitterLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a9a199e56ca934c543d8f7c8ff95cca10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a199e56ca934c543d8f7c8ff95cca10">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[5/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">MultiInputMultiOutput&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00315">315</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;{</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; <span class="comment">// Construct graph</span></div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <a class="code" href="structarmnn_1_1_views_descriptor.html">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_splitter_layer.html">SplitterLayer</a>&gt;(splitterDescriptor, <span class="stringliteral">&quot;splitter&quot;</span>);</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160;</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;concat&quot;</span>);</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160;</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;GetInputSlot(0));</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; convLayer2-&gt;GetOutputSlot(0).Connect(concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; concatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-&gt;GetInputSlot(0));</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160;</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({convLayer1, convLayer2}),</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; {});</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn1 = subgraph-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn2 = subgraph-&gt;GetInputSlot(1)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn1 = subgraph-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn2 = subgraph-&gt;GetOutputSlot(1)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160;</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(2, 2);</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160;</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn2);</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn1);</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn2);</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_views_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.html">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00190">Descriptors.hpp:190</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_splitter_layer_html"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.html">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.html#l00013">SplitterLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a14bcbedd268543ad25bf94f744861e5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14bcbedd268543ad25bf94f744861e5e">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[6/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">EraseReplacedLayers&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00368">368</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_output_shape_of_squeeze_8cpp.html#ae3a6cb217a792718f2bd0e8f45e3ca9e">BOOST_AUTO_TEST_SUITE()</a>, <a class="el" href="_profiler_tests_8cpp.html#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160;{</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; <span class="comment">// Construct graph</span></div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; <a class="code" href="structarmnn_1_1_views_descriptor.html">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_splitter_layer.html">SplitterLayer</a>&gt;(splitterDescriptor, <span class="stringliteral">&quot;splitter&quot;</span>);</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> concatLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;concat&quot;</span>);</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160;</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>&#160;</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>&#160; <span class="comment">// Construct sub-graph</span></div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> subgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>({},</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160; {},</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160; {splitterLayer,</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160; convLayer1,</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160; convLayer2,</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160; concatLayer});</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160;</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(0, 0);</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160;</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; <span class="comment">// Save sub-graph layers for later verification</span></div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160; <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_subgraph_view.html#a74798938fdaeae75c8adfa4a7439e7f9">SubgraphView::Layers</a> subgraphLayers = subgraph-&gt;GetLayers();</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160;</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraph, preCompiledLayer);</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>&#160;</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>&#160; <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>&#160; <a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(!AreAnySubgraphLayersPresentInGraph(subgraphLayers, graph));</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_html_a74798938fdaeae75c8adfa4a7439e7f9"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html#a74798938fdaeae75c8adfa4a7439e7f9">armnn::SubgraphView::Layers</a></div><div class="ttdeci">std::list&lt; Layer * &gt; Layers</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00040">SubgraphView.hpp:40</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_views_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.html">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00190">Descriptors.hpp:190</a></div></div>
<div class="ttc" id="classarmnn_1_1_splitter_layer_html"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.html">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.html#l00013">SplitterLayer.hpp:13</a></div></div>
<div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_html_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="acace89e7df91ea3b5ca4676ee6949606"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acace89e7df91ea3b5ca4676ee6949606">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[7/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SubgraphForEmptyGraph&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00413">413</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_subgraph_view_8cpp_source.html#l00118">SubgraphView::GetInputSlots()</a>, <a class="el" href="_subgraph_view_8cpp_source.html#l00158">SubgraphView::GetLayers()</a>, and <a class="el" href="_subgraph_view_8cpp_source.html#l00123">SubgraphView::GetOutputSlots()</a>.</p>
<div class="fragment"><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160;{</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view.html">SubgraphView</a> subgraph(graph);</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160;</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160; BOOST_TEST(subgraph.GetInputSlots().empty());</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>&#160; BOOST_TEST(subgraph.GetOutputSlots().empty());</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160; BOOST_TEST(subgraph.GetLayers().empty());</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_subgraph_view_html"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html">armnn::SubgraphView</a></div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00023">SubgraphView.hpp:23</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ab925b67a19cc95bb350c854b93ecfc0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab925b67a19cc95bb350c854b93ecfc0d">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[8/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SubgraphForEntireGraph&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00423">423</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_graph_8hpp_source.html#l00187">Graph::GetNumLayers()</a>, and <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>.</p>
<div class="fragment"><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160;{</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160;</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160; <span class="keyword">auto</span> mid0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(output-&gt;GetInputSlot(0),</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160; <span class="stringliteral">&quot;mid0&quot;</span>);</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160; <span class="keyword">auto</span> mid1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(mid0-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; <span class="stringliteral">&quot;mid1&quot;</span>);</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(mid1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160;</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view.html">SubgraphView</a> subgraph(graph);</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160; BOOST_TEST(subgraph.GetInputSlots().empty());</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160; BOOST_TEST(subgraph.GetOutputSlots().empty());</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160; BOOST_TEST(subgraph.GetLayers().size() == graph.<a class="code" href="classarmnn_1_1_graph.html#afdf8eb85585a798ad0e936bde884d87b">GetNumLayers</a>());</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_graph_html_afdf8eb85585a798ad0e936bde884d87b"><div class="ttname"><a href="classarmnn_1_1_graph.html#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.html#l00187">Graph.hpp:187</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_html"><div class="ttname"><a href="classarmnn_1_1_subgraph_view.html">armnn::SubgraphView</a></div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_8hpp_source.html#l00023">SubgraphView.hpp:23</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a43913f88bb46d81e9a44d69f22d52f06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43913f88bb46d81e9a44d69f22d52f06">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[9/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">NoSubgraphsForNoMatch&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00443">443</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160;{</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160;</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160; <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(output-&gt;GetInputSlot(0), 0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160;</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160; SubgraphViewSelector::SelectSubgraphs(graph, [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp;) { <span class="keywordflow">return</span> <span class="keyword">false</span>; });</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160;</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160; BOOST_TEST(subgraphs.empty());</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a3b6b0cf1f850f804946ab5cade49af8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b6b0cf1f850f804946ab5cade49af8c">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[10/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">OneSubgraphsSelectedASingleMatch&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00456">456</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00216">Layer::GetNameStr()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160;{</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(output-&gt;GetInputSlot(0), 0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; graph,</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <span class="comment">// select the output layer only</span></div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l)</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160; {</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; <span class="keywordtype">bool</span> isOutput = l.<a class="code" href="classarmnn_1_1_layer.html#a9a97cb6d32661a57fc33bd29b8e41ff4">GetNameStr</a>().compare(<span class="stringliteral">&quot;output&quot;</span>) == 0;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; <span class="keywordflow">return</span> isOutput;</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160; });</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160; BOOST_TEST(subgraphs.size() == 1);</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 1)</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; {</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; <span class="keyword">auto</span> expected = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({output}),</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; <span class="comment">// outputs of &#39;output&#39; will be empty</span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({output}),</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; {output});</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160;</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160; CompareSubgraphViews(subgraphs[0], expected);</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; }</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a9a97cb6d32661a57fc33bd29b8e41ff4"><div class="ttname"><a href="classarmnn_1_1_layer.html#a9a97cb6d32661a57fc33bd29b8e41ff4">armnn::Layer::GetNameStr</a></div><div class="ttdeci">const std::string &amp; GetNameStr() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00216">Layer.hpp:216</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aaa25f56b7dec5d9019931a0f9cf1e534"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa25f56b7dec5d9019931a0f9cf1e534">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[11/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">MultipleLayersSelectedInTheMiddle&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00485">485</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4aa9a62e70841c4d06dd16306a85700d36">armnn::Activation</a>, <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00259">Layer::GetType()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160;{</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; <span class="keyword">auto</span> output = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; <span class="keyword">auto</span> mid0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(output-&gt;GetInputSlot(0),</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; <span class="stringliteral">&quot;mid0&quot;</span>);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160; <span class="keyword">auto</span> mid1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(mid0-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160; <span class="stringliteral">&quot;mid1&quot;</span>);</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(mid1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160;</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160; graph,</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160; <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l)</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160; {</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160; <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">LayerType::Activation</a>);</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160; });</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160;</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160; BOOST_TEST(subgraphs.size() == 1);</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 1)</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; {</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; <span class="keyword">auto</span> expected = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({mid1}),</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({mid0}),</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; {mid1, mid0});</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160;</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; CompareSubgraphViews(subgraphs[0], expected);</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; }</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00259">Layer.hpp:259</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="namespacearmnn_html_a7636fbbc4f8ea2d0cf9f3ac2d12a4c62"><div class="ttname"><a href="namespacearmnn.html#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.html#l00012">Activation.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a5b01e2db18e971df88af09bd414ed032"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b01e2db18e971df88af09bd414ed032">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[12/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">DisjointGraphs&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00519">519</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160;{</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; <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>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160;</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160; <span class="comment">// the graph is constructed in reverse order</span></div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160; <span class="keyword">auto</span> o0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output0&quot;</span>);</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="keyword">auto</span> n0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(o0-&gt;GetInputSlot(0), <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;intermediate0&quot;</span>);</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>&#160; <span class="keyword">auto</span> i0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(n0-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">&quot;input0&quot;</span>);</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>&#160;</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160; <span class="keyword">auto</span> o1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(1, <span class="stringliteral">&quot;output1&quot;</span>);</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160; <span class="keyword">auto</span> n1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(o1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;intermediate1&quot;</span>);</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; <span class="keyword">auto</span> i1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(n1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 1, <span class="stringliteral">&quot;input1&quot;</span>);</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160;</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; SubgraphViewSelector::SelectSubgraphs(graph,</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a>&amp;) {</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; });</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160;</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160; <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; <span class="keyword">auto</span> expected1 = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>({}, {}, { o0, n0, i0 });</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160; <span class="keyword">auto</span> expected2 = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>({}, {}, { o1, n1, i1 });</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>&#160; BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>&#160; {</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160; <span class="keywordflow">if</span> (std::find(subgraphs[0]-&gt;GetLayers().begin(), subgraphs[0]-&gt;GetLayers().end(), i0) !=</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160; subgraphs[0]-&gt;GetLayers().end())</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160; {</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160; CompareSubgraphViews(subgraphs[0], expected1);</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160; CompareSubgraphViews(subgraphs[1], expected2);</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160; }</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; {</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160; CompareSubgraphViews(subgraphs[0], expected2);</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160; CompareSubgraphViews(subgraphs[1], expected1);</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160; }</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160; }</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; }</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="af129c6f1e40cd9a7cfbbfaa64853e364"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af129c6f1e40cd9a7cfbbfaa64853e364">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[13/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">IslandInTheMiddle&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00566">566</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160;{</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160; <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>&#160; <span class="comment">// of the selected M* nodes.</span></div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160; <span class="comment">// This checks that we don&#39;t merge M6 and M3 and create a dependency loop.</span></div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; <span class="comment">/*</span></div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160;<span class="comment"> M0</span></div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160;<span class="comment"> / \</span></div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160;<span class="comment"> M1 M4</span></div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160;<span class="comment"> | |</span></div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160;<span class="comment"> M2 X1 &lt; the island in the middle !</span></div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160;<span class="comment"> | |</span></div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160;<span class="comment"> M3 M5</span></div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160;<span class="comment"> \ /</span></div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160;<span class="comment"> M6</span></div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>&#160;</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160; <span class="keyword">auto</span> m6 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;m6&quot;</span>);</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160; <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m6-&gt;GetInputSlot(0),</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160; <span class="stringliteral">&quot;m3&quot;</span>);</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160; <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; <span class="stringliteral">&quot;m2&quot;</span>);</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160; <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160; <span class="stringliteral">&quot;m1&quot;</span>);</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160; <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">&quot;m0&quot;</span>);</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160;</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160; <span class="keyword">auto</span> m5 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m6-&gt;GetInputSlot(1),</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160; <span class="stringliteral">&quot;m5&quot;</span>);</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160; <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m5-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160; <span class="stringliteral">&quot;x1&quot;</span>);</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>&#160; <span class="keyword">auto</span> m4 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(x1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>&#160; <span class="stringliteral">&quot;m4&quot;</span>);</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160;</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160; <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>&#160; m0-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m4-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160;</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>&#160; <span class="comment">// All selected &#39;M*&#39; layers will be of Activation type</span></div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160; graph,</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a>&amp; l)</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>&#160; {</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>&#160; <span class="keywordtype">bool</span> toSelect = std::string(l.<a class="code" href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>())[0] == <span class="charliteral">&#39;m&#39;</span>;</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160; });</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160;</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160; <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>&#160; <span class="keyword">auto</span> largerSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m0 }),</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ m3, m4 }),</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>&#160; { m0, m1, m2, m3, m4 });</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160;</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>&#160; <span class="keyword">auto</span> smallerSubgraph =</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(std::vector&lt;InputSlot*&gt;{ &amp;m5-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), &amp; m6-&gt;GetInputSlot(0) },</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>&#160; std::vector&lt;OutputSlot*&gt;{},</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>&#160; { m5, m6 });</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>&#160;</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>&#160; BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160; {</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>&#160; <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>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>&#160;</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>&#160; <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>&#160; std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160; [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>&amp; lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>&amp; rhs)</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160; {</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>&#160; <span class="keywordflow">return</span> (lhs-&gt;GetLayers().size() &lt; rhs-&gt;GetLayers().size());</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>&#160; }</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>&#160; );</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span>&#160;</div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span>&#160; BOOST_TEST(subgraphs[0]-&gt;GetLayers().size() == 2);</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>&#160; BOOST_TEST(subgraphs[1]-&gt;GetLayers().size() == 5);</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>&#160;</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160; CompareSubgraphViews(subgraphs[0], smallerSubgraph);</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>&#160; CompareSubgraphViews(subgraphs[1], largerSubgraph);</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160; }</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160; }</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00305">Layer.hpp:305</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="aa07ebba5698b37742326ae94cab2083d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa07ebba5698b37742326ae94cab2083d">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[14/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">MultipleSimpleSubgraphs&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00657">657</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4aa9a62e70841c4d06dd16306a85700d36">armnn::Activation</a>, <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00259">Layer::GetType()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>&#160;{</div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>&#160; <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>&#160; <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>&#160; <span class="comment">// non-selected ones are the X*</span></div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>&#160; <span class="comment">// X1 -&gt; M1 -&gt; M2 -&gt; X2 -&gt; M3 -&gt; X3</span></div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>&#160; <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>&#160; <span class="comment">// with {M3}</span></div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>&#160;</div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>&#160; <span class="comment">// the graph is constructed in reverse order</span></div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>&#160; <span class="keyword">auto</span> x3 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>&#160; <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(x3-&gt;GetInputSlot(0),</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>&#160; <span class="stringliteral">&quot;m3&quot;</span>);</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>&#160; <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a>{},</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>&#160; <span class="stringliteral">&quot;x2&quot;</span>);</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span>&#160; <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(x2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>&#160; <span class="stringliteral">&quot;m2&quot;</span>);</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>&#160; <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span>&#160; <span class="stringliteral">&quot;m1&quot;</span>);</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">&quot;x1&quot;</span>);</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>&#160;</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>&#160; <span class="comment">// All selected &#39;M*&#39; layers will be of Activation type</span></div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>&#160; graph,</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>&#160; <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l)</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>&#160; {</div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span>&#160; <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">LayerType::Activation</a>);</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span>&#160; });</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>&#160;</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>&#160; <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>&#160; <span class="keyword">auto</span> largerSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m1}),</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m2}),</div><div class="line"><a name="l00700"></a><span class="lineno"> 700</span>&#160; {m1, m2});</div><div class="line"><a name="l00701"></a><span class="lineno"> 701</span>&#160;</div><div class="line"><a name="l00702"></a><span class="lineno"> 702</span>&#160; <span class="keyword">auto</span> smallerSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m3}),</div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m3}),</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>&#160; {m3});</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span>&#160;</div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>&#160; BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span>&#160; {</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span>&#160; <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>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>&#160;</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>&#160; <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>&#160; std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>&#160; [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> &amp; lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> &amp; rhs)</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>&#160; {</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>&#160; <span class="keywordflow">return</span> (lhs-&gt;GetLayers().size() &lt; rhs-&gt;GetLayers().size());</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>&#160; }</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>&#160; );</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>&#160;</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>&#160; BOOST_TEST(subgraphs[0]-&gt;GetLayers().size() == 1);</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>&#160; BOOST_TEST(subgraphs[1]-&gt;GetLayers().size() == 2);</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>&#160;</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>&#160; CompareSubgraphViews(subgraphs[0], smallerSubgraph);</div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>&#160; CompareSubgraphViews(subgraphs[1], largerSubgraph);</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span>&#160; }</div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>&#160; }</div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00259">Layer.hpp:259</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="namespacearmnn_html_a7636fbbc4f8ea2d0cf9f3ac2d12a4c62"><div class="ttname"><a href="namespacearmnn.html#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.html#l00012">Activation.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a7573ddbd1f802bfeb9e12e992022d4c0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7573ddbd1f802bfeb9e12e992022d4c0">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[15/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SimpleLinearTest&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00732">732</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4aa9a62e70841c4d06dd16306a85700d36">armnn::Activation</a>, <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::Addition</a>, <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_const_tensor_layer_visitor_8cpp_source.html#l00170">armnn::BOOST_AUTO_TEST_CASE()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4ae20f0f2826a6549809f050b86274567f">armnn::Concat</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00259">Layer::GetType()</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>, and <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a41cb9b797ebc6f6f6314e3ded935f4cf">armnn::Splitter</a>.</p>
<div class="fragment"><div class="line"><a name="l00733"></a><span class="lineno"> 733</span>&#160;{</div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>&#160; <span class="comment">//X1 -&gt; M1 -&gt; M2 -&gt; X2</span></div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>&#160;</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a> activationDefaults;</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>&#160;</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>&#160; <span class="keyword">auto</span> layerX1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;layerX1&quot;</span>);</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>&#160; <span class="keyword">auto</span> layerX2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;layerX2&quot;</span>);</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>&#160; <span class="keyword">auto</span> layerM1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(activationDefaults, <span class="stringliteral">&quot;layerM1&quot;</span>);</div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span>&#160; <span class="keyword">auto</span> layerM2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(activationDefaults, <span class="stringliteral">&quot;layerM2&quot;</span>);</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span>&#160;</div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span>&#160; <span class="comment">// X1</span></div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span>&#160; <span class="comment">// |</span></div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span>&#160; <span class="comment">// M1</span></div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>&#160; <span class="comment">// |</span></div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span>&#160; <span class="comment">// M2</span></div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>&#160; <span class="comment">// |</span></div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span>&#160; <span class="comment">// X2</span></div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span>&#160;</div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>&#160; layerX1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(layerM1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>&#160; layerM1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(layerM2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span>&#160; layerM2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(layerX2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span>&#160;</div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>&#160; graph,</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>&#160; <span class="comment">// select the activation layers M1 and M2</span></div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l)</div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>&#160; {</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span>&#160; <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a7636fbbc4f8ea2d0cf9f3ac2d12a4c62">LayerType::Activation</a>);</div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span>&#160; });</div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>&#160;</div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>&#160; <a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(subgraphs.size() == 1);</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>&#160; <span class="keywordflow">if</span>(subgraphs.size() == 1)</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>&#160; {</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>&#160; <span class="keyword">auto</span> expected = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({layerM1}),</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({layerM2}),</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>&#160; {layerM1, layerM2});</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>&#160;</div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>&#160; CompareSubgraphViews(subgraphs[0], expected);</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>&#160; }</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_aaef29472862381822654ab6cbf7cba2a"><div class="ttname"><a href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">armnn::Layer::GetType</a></div><div class="ttdeci">LayerType GetType() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00259">Layer.hpp:259</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_html_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="namespacearmnn_html_a7636fbbc4f8ea2d0cf9f3ac2d12a4c62"><div class="ttname"><a href="namespacearmnn.html#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.html#l00012">Activation.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a6f198cfda61ae25af4d853e6d4ccd7d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f198cfda61ae25af4d853e6d4ccd7d4">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[16/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">ValidMerge&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l00953">953</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l00954"></a><span class="lineno"> 954</span>&#160;{</div><div class="line"><a name="l00955"></a><span class="lineno"> 955</span>&#160; <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>&#160; <span class="comment">// one that it can (M0), and doesn&#39;t merge with the ones it can&#39;t (X2 and M2).</span></div><div class="line"><a name="l00957"></a><span class="lineno"> 957</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00958"></a><span class="lineno"> 958</span>&#160; <span class="comment">// X1</span></div><div class="line"><a name="l00959"></a><span class="lineno"> 959</span>&#160; <span class="comment">// |</span></div><div class="line"><a name="l00960"></a><span class="lineno"> 960</span>&#160; <span class="comment">// M1</span></div><div class="line"><a name="l00961"></a><span class="lineno"> 961</span>&#160; <span class="comment">// / \&#39;</span></div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>&#160; <span class="comment">// X2 M2 M0</span></div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span>&#160; <span class="comment">// \ | /</span></div><div class="line"><a name="l00964"></a><span class="lineno"> 964</span>&#160; <span class="comment">// M3</span></div><div class="line"><a name="l00965"></a><span class="lineno"> 965</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l00966"></a><span class="lineno"> 966</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l00967"></a><span class="lineno"> 967</span>&#160;</div><div class="line"><a name="l00968"></a><span class="lineno"> 968</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a> activationDefaults;</div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(3);</div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>&#160;</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>&#160; <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;x1&quot;</span>);</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>&#160; <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(activationDefaults, <span class="stringliteral">&quot;x2&quot;</span>);</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span>&#160; <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(1, <span class="stringliteral">&quot;m0&quot;</span>);</div><div class="line"><a name="l00974"></a><span class="lineno"> 974</span>&#160; <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(activationDefaults, <span class="stringliteral">&quot;m1&quot;</span>);</div><div class="line"><a name="l00975"></a><span class="lineno"> 975</span>&#160; <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(activationDefaults, <span class="stringliteral">&quot;m2&quot;</span>);</div><div class="line"><a name="l00976"></a><span class="lineno"> 976</span>&#160; <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;m3&quot;</span>);</div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span>&#160;</div><div class="line"><a name="l00978"></a><span class="lineno"> 978</span>&#160; x1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span>&#160; m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(x2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span>&#160; m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span>&#160; x2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>&#160; m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>&#160; m0-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(2));</div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span>&#160;</div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs = SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span>&#160; graph,</div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a>&amp; l) {</div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>&#160; <span class="keywordflow">return</span> std::string(l.<a class="code" href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>())[0] == <span class="charliteral">&#39;m&#39;</span>;</div><div class="line"><a name="l00989"></a><span class="lineno"> 989</span>&#160; });</div><div class="line"><a name="l00990"></a><span class="lineno"> 990</span>&#160;</div><div class="line"><a name="l00991"></a><span class="lineno"> 991</span>&#160; <span class="comment">// expected results to test against</span></div><div class="line"><a name="l00992"></a><span class="lineno"> 992</span>&#160; <span class="keyword">auto</span> expectedSubgraph0 =</div><div class="line"><a name="l00993"></a><span class="lineno"> 993</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(</div><div class="line"><a name="l00994"></a><span class="lineno"> 994</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m1 }),</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span>&#160; std::vector&lt;OutputSlot*&gt;{ &amp;m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0), &amp;m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0) },</div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span>&#160; { m1, m2 });</div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span>&#160;</div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span>&#160; <span class="keyword">auto</span> expectedSubgraph1 = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(</div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span>&#160; std::vector&lt;InputSlot*&gt;{ &amp;m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), &amp; m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1) },</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ }),</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160; { m0, m3 });</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160; BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160; {</div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160; <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>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160; <span class="keywordflow">if</span> (subgraphs[0]-&gt;GetInputSlots().size() == 1)</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160; {</div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160; CompareSubgraphViews(subgraphs[0], expectedSubgraph0);</div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160; CompareSubgraphViews(subgraphs[1], expectedSubgraph1);</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160; }</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160; {</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160; CompareSubgraphViews(subgraphs[0], expectedSubgraph1);</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160; CompareSubgraphViews(subgraphs[1], expectedSubgraph0);</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160; }</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160; }</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160; }</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00305">Layer.hpp:305</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a25f2d4d1faf84d756ab1a27d3d14cc43"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25f2d4d1faf84d756ab1a27d3d14cc43">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[17/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">PropagatedDependencies&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l01026">1026</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_graph_8hpp_source.html#l00409">Graph::InsertNewLayer()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;{</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160; <span class="comment">// Version of IslandInTheMiddle with longer chain</span></div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160; <span class="comment">// to make sure antecedents are propagated.</span></div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160; <span class="comment">/*</span></div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;<span class="comment"> M0</span></div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;<span class="comment"> / \</span></div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;<span class="comment"> M1 M4</span></div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;<span class="comment"> | |</span></div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;<span class="comment"> M2 X1 &lt; the island in the middle !</span></div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;<span class="comment"> | |</span></div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;<span class="comment"> | M10</span></div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;<span class="comment"> | |</span></div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;<span class="comment"> | X2 &lt; another island in the middle !</span></div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;<span class="comment"> | |</span></div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;<span class="comment"> M3 M5</span></div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;<span class="comment"> \ /</span></div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;<span class="comment"> M6</span></div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;</div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160; <span class="keyword">auto</span> m6 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;m6&quot;</span>);</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160; <span class="keyword">auto</span> m3 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m6-&gt;GetInputSlot(0),</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160; <span class="stringliteral">&quot;m3&quot;</span>);</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160; <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m3-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160; <span class="stringliteral">&quot;m2&quot;</span>);</div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160; <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160; <span class="stringliteral">&quot;m1&quot;</span>);</div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160; <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), 0, <span class="stringliteral">&quot;m0&quot;</span>);</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;</div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160; <span class="keyword">auto</span> m5 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m6-&gt;GetInputSlot(1),</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160; <span class="stringliteral">&quot;m5&quot;</span>);</div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160; <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m5-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;x2&quot;</span>);</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160; <span class="keyword">auto</span> m10 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(x2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;m10&quot;</span>);</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160; <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(m10-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160; <span class="stringliteral">&quot;x1&quot;</span>);</div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160; <span class="keyword">auto</span> m4 = graph.<a class="code" href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">InsertNewLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(x1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0),</div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160; <a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{},</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160; <span class="stringliteral">&quot;m4&quot;</span>);</div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>&#160;</div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>&#160; <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>&#160; m0-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m4-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>&#160;</div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>&#160; <span class="comment">// All selected &#39;M*&#39; layers will be of Activation type</span></div><div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>&#160; graph,</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>&#160; <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a>&amp; l)</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>&#160; {</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>&#160; <span class="keywordtype">bool</span> toSelect = std::string(l.<a class="code" href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>())[0] == <span class="charliteral">&#39;m&#39;</span>;</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160; });</div><div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;</div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160; <span class="comment">// expected results to test against</span></div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160; <span class="keyword">auto</span> largerSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m0 }),</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ m3, m4 }),</div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160; { m0, m1, m2, m3, m4 });</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;</div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160; <span class="keyword">auto</span> mediumSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(std::vector&lt;InputSlot*&gt;{ &amp;m5-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0), &amp;m6-&gt;GetInputSlot(0) },</div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160; std::vector&lt;OutputSlot*&gt;{}, { m5, m6 });</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160;</div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160; <span class="keyword">auto</span> smallerSubgraph =</div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({ m10 }), <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({ m10 }), { m10 });</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;</div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>&#160; BOOST_TEST(subgraphs.size() == 3);</div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 3)</div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>&#160; {</div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>&#160; <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>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>&#160; BOOST_TEST((subgraphs[2] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>&#160;</div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; subgraphs[1].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160; <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>&#160; std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160; [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>&amp; lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a>&amp; rhs)</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160; {</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160; <span class="keywordflow">return</span> (lhs-&gt;GetLayers().size() &lt; rhs-&gt;GetLayers().size());</div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160; }</div><div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160; );</div><div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160;</div><div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160; CompareSubgraphViews(subgraphs[0], smallerSubgraph);</div><div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160; CompareSubgraphViews(subgraphs[1], mediumSubgraph);</div><div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160; CompareSubgraphViews(subgraphs[2], largerSubgraph);</div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160; }</div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160; }</div><div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00305">Layer.hpp:305</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a3ff30c6669fdc69de1f5be1f89bacc3f"><div class="ttname"><a href="classarmnn_1_1_graph.html#a3ff30c6669fdc69de1f5be1f89bacc3f">armnn::Graph::InsertNewLayer</a></div><div class="ttdeci">LayerT * InsertNewLayer(InputSlot &amp;insertBefore, Args &amp;&amp;... args)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00409">Graph.hpp:409</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a1e046d7b4eb0f8382db7961e5cc7b3d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e046d7b4eb0f8382db7961e5cc7b3d4">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[18/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">Random&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l01122">1122</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_output_shape_of_squeeze_8cpp.html#ae3a6cb217a792718f2bd0e8f45e3ca9e">BOOST_AUTO_TEST_SUITE()</a>, <a class="el" href="_profiler_tests_8cpp.html#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4acb17869fe51048b5a5c4c6106551a255">armnn::Constant</a>, <a class="el" href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d">armnn::debug</a>, <a class="el" href="_layer_8hpp_source.html#l00055">InputSlot::GetConnectedOutputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00231">Layer::GetInputSlots()</a>, <a class="el" href="_layer_8hpp_source.html#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.html#l00308">Layer::GetNumOutputSlots()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::Input</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>, and <a class="el" href="_graph_8cpp_source.html#l00081">Graph::SerializeToDot()</a>.</p>
<div class="fragment"><div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>&#160;{</div><div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>&#160; <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>&#160; <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>&#160; <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>&#160; constexpr <span class="keywordtype">bool</span> <a class="code" href="namespacearmnn.html#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>&#160;</div><div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160; std::mt19937 randomGenerator;</div><div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160;</div><div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160; <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>&#160; <span class="keyword">auto</span> GetRandom = [&amp;randomGenerator](<span class="keyword">auto</span> maxExclusive) {</div><div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160; <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>&#160; <span class="comment">// which makes it harder to reproduce results.</span></div><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160; <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>&#160; std::uniform_real_distribution&lt;float&gt; uniform(0.0f, 1.0f);</div><div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160; <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>decltype(maxExclusive)<span class="keyword">&gt;</span>(uniform(randomGenerator) * <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(maxExclusive));</div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160; };</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160; <span class="comment">// Helper function to get a bool that has probability &#39;trueProb&#39; of being true.</span></div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160; <span class="keyword">auto</span> GetRandomFlag = [&amp;randomGenerator](<span class="keywordtype">float</span> trueProb) {</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span>&#160; std::uniform_real_distribution&lt;float&gt; uniform(0.0f, 1.0f);</div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>&#160; <span class="keywordflow">return</span> uniform(randomGenerator) &lt; trueProb;</div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>&#160; };</div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>&#160;</div><div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>&#160; constexpr uint32_t numTests = 100;</div><div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>&#160; <span class="keywordflow">for</span> (uint32_t testIdx = 0; testIdx &lt; numTests; ++testIdx)</div><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span>&#160; {</div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>&#160; 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>&#160;</div><div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160; <span class="comment">// Create random graph</span></div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160; {</div><div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160; <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>&#160; <span class="comment">// each layer to add, along with the chance that each layer will be &#39;supported&#39; (i.e. selected for</span></div><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160; <span class="comment">// inclusion in the resulting subgraphs).</span></div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160; uint32_t numInputs = 1 + GetRandom(4u);</div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160; uint32_t numConstants = 1 + GetRandom(4u);</div><div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160; uint32_t numOutputs = 1 + GetRandom(4u);</div><div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160; uint32_t numConcats = 0 + GetRandom(500u);</div><div class="line"><a name="l01160"></a><span class="lineno"> 1160</span>&#160; uint32_t numSplits = 0 + GetRandom(500u);</div><div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>&#160; <span class="keywordtype">float</span> supportedProb = 0.7f;</div><div class="line"><a name="l01162"></a><span class="lineno"> 1162</span>&#160;</div><div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numInputs; ++i)</div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>&#160; {</div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span>&#160; std::string name = <span class="stringliteral">&quot;input&quot;</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">&quot;S&quot;</span> : <span class="stringliteral">&quot;N&quot;</span>);</div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(<span class="keyword">static_cast&lt;</span><a class="code" href="namespacearmnn.html#ab8cf8f9fb6792e654c2d8d8382f6f01b">LayerBindingId</a><span class="keyword">&gt;</span>(i), name.c_str());</div><div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>&#160; }</div><div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numConstants; ++i)</div><div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160; {</div><div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160; std::string name = <span class="stringliteral">&quot;constant&quot;</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">&quot;S&quot;</span> : <span class="stringliteral">&quot;N&quot;</span>);</div><div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_constant_layer.html">ConstantLayer</a>&gt;(name.c_str());</div><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160; }</div><div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numOutputs; ++i)</div><div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160; {</div><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160; std::string name = <span class="stringliteral">&quot;output&quot;</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">&quot;S&quot;</span> : <span class="stringliteral">&quot;N&quot;</span>);</div><div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(<span class="keyword">static_cast&lt;</span><a class="code" href="namespacearmnn.html#ab8cf8f9fb6792e654c2d8d8382f6f01b">LayerBindingId</a><span class="keyword">&gt;</span>(i), name.c_str());</div><div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>&#160; }</div><div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numConcats; ++i)</div><div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>&#160; {</div><div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>&#160; std::string name = <span class="stringliteral">&quot;concat&quot;</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">&quot;S&quot;</span> : <span class="stringliteral">&quot;N&quot;</span>);</div><div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>&#160; uint32_t numInputs = 1 + GetRandom(3u);</div><div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDesc(numInputs);</div><div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDesc, name.c_str());</div><div class="line"><a name="l01184"></a><span class="lineno"> 1184</span>&#160; }</div><div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>&#160; <span class="keywordflow">for</span> (uint32_t i = 0; i &lt; numSplits; ++i)</div><div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160; {</div><div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160; std::string name = <span class="stringliteral">&quot;split&quot;</span> + std::to_string(i) + (GetRandomFlag(supportedProb) ? <span class="stringliteral">&quot;S&quot;</span> : <span class="stringliteral">&quot;N&quot;</span>);</div><div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160; uint32_t numOutputs = 1 + GetRandom(3u);</div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160; <a class="code" href="structarmnn_1_1_views_descriptor.html">ViewsDescriptor</a> splitDesc(numOutputs);</div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_splitter_layer.html">SplitterLayer</a>&gt;(splitDesc, name.c_str());</div><div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160; }</div><div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>&#160;</div><div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>&#160; <span class="comment">// Associate each layer with a &quot;depth&quot; parameter. This is used when creating connections to ensure</span></div><div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>&#160; <span class="comment">// that we don&#39;t have any loops, by only connecting to layers with a lower &quot;depth&quot;.</span></div><div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>&#160; <span class="comment">// This can be thought of as distance from the &quot;top&quot; of the graph (assuming the graph flows top-to-bottom).</span></div><div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>&#160; <span class="comment">// Unfortunately this approach ends up producing very &quot;wide&quot; graphs,</span></div><div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>&#160; <span class="comment">// which probably isn&#39;t very representative of &#39;real&#39; networks.</span></div><div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>&#160; uint32_t maxLayerDepth = 5 + GetRandom(2000u);</div><div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>&#160; std::map&lt;Layer*, uint32_t&gt; layerDepths;</div><div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>&#160; std::map&lt;uint32_t, std::vector&lt;Layer*&gt;&gt; layersAtDepth;</div><div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>&#160; <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.html">Layer</a>* layer : graph)</div><div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>&#160; {</div><div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160; uint32_t depth;</div><div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>&#160; <span class="keywordflow">if</span> (layer-&gt;GetType() == LayerType::Input || layer-&gt;GetType() == LayerType::Constant)</div><div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160; {</div><div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>&#160; <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>&#160; <span class="comment">// nothing for them to connect to!</span></div><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160; depth = 0;</div><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160; }</div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160; {</div><div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160; <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>&#160; depth = 1 + GetRandom(maxLayerDepth);</div><div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>&#160; }</div><div class="line"><a name="l01215"></a><span class="lineno"> 1215</span>&#160; layerDepths[layer] = depth;</div><div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>&#160; layersAtDepth[depth].push_back(layer);</div><div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>&#160; }</div><div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>&#160;</div><div class="line"><a name="l01219"></a><span class="lineno"> 1219</span>&#160; <span class="comment">// Connect layers to each other. Every input slot of every layer must be connected, but it doesn&#39;t</span></div><div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>&#160; <span class="comment">// matter if an output slot goes unused.</span></div><div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>&#160; <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.html">Layer</a>* layer : graph)</div><div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>&#160; {</div><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160; <span class="keywordflow">for</span> (uint32_t inputSlotIdx = 0; inputSlotIdx &lt; layer-&gt;GetNumInputSlots(); ++inputSlotIdx)</div><div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160; {</div><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160; <a class="code" href="classarmnn_1_1_input_slot.html">InputSlot</a>&amp; inputSlot = layer-&gt;GetInputSlot(inputSlotIdx);</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>&#160; 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>&#160; <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>&#160; <span class="keywordflow">while</span> (inputSlot.<a class="code" href="classarmnn_1_1_input_slot.html#a9effd325a6d512a3f8ff4bd207d53255">GetConnectedOutputSlot</a>() == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160; {</div><div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160; uint32_t layerDepth = GetRandom(maxLayerDepthToConnectTo);</div><div class="line"><a name="l01231"></a><span class="lineno"> 1231</span>&#160; <span class="keyword">const</span> std::vector&lt;Layer*&gt;&amp; layersToChooseFrom = layersAtDepth[layerDepth];</div><div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160; <span class="keywordflow">if</span> (layersToChooseFrom.size() == 0)</div><div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160; {</div><div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l01235"></a><span class="lineno"> 1235</span>&#160; }</div><div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* layerToConnectWith = layersToChooseFrom[GetRandom(layersToChooseFrom.size())];</div><div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160; <span class="keywordflow">if</span> (layerToConnectWith-&gt;<a class="code" href="classarmnn_1_1_layer.html#a1594bddc87d6477df300317658f566bb">GetNumOutputSlots</a>() == 0)</div><div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160; {</div><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l01240"></a><span class="lineno"> 1240</span>&#160; }</div><div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>&#160; uint32_t outputSlotIdx = GetRandom(layerToConnectWith-&gt;<a class="code" href="classarmnn_1_1_layer.html#a1594bddc87d6477df300317658f566bb">GetNumOutputSlots</a>());</div><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160; layerToConnectWith-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(outputSlotIdx).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(inputSlot);</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160; }</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160; }</div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span>&#160; }</div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>&#160; }</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>&#160;</div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>&#160; <span class="keywordflow">if</span> (debug)</div><div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>&#160; {</div><div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>&#160; std::ofstream f(<span class="stringliteral">&quot;INPUT_&quot;</span> + std::to_string(testIdx) + <span class="stringliteral">&quot;.dot&quot;</span>);</div><div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>&#160; graph.SerializeToDot(f);</div><div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>&#160; }</div><div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>&#160;</div><div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160; <span class="comment">// Run the splitting algorithm, selecting all nodes ending in an &#39;S&#39; (as randomly assigned above).</span></div><div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>&#160; <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>&#160;</div><div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160; SubgraphViewSelector::SelectSubgraphs(graph,</div><div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a>&amp; l) { <span class="keywordflow">return</span> std::string(l.<a class="code" href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">GetName</a>()).back() == <span class="charliteral">&#39;S&#39;</span>; });</div><div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>&#160;</div><div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>&#160; <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>&#160; <span class="keyword">auto</span> duration = std::chrono::duration_cast&lt;std::chrono::microseconds&gt;(endTime - startTime);</div><div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>&#160; <span class="keywordflow">if</span> (debug)</div><div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>&#160; {</div><div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Test &quot;</span> &lt;&lt; testIdx &lt;&lt; <span class="stringliteral">&quot;: &quot;</span> &lt;&lt; duration.count() &lt;&lt; <span class="stringliteral">&quot; microseconds&quot;</span> &lt;&lt; std::endl;</div><div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>&#160; }</div><div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>&#160;</div><div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>&#160; <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>&#160; <span class="comment">// This helps some of the following code.</span></div><div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160; std::map&lt;Layer*, SubgraphView*&gt; layerToSubgraph;</div><div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160; <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.html">Layer</a>* layer : graph)</div><div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>&#160; {</div><div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>&#160; <span class="keywordtype">size_t</span> i = 0;</div><div class="line"><a name="l01274"></a><span class="lineno"> 1274</span>&#160; <span class="keywordflow">for</span> (std::unique_ptr&lt;SubgraphView&gt;&amp; subgraph : subgraphs)</div><div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>&#160; {</div><div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160; std::string name = std::to_string(i++);</div><div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160; <span class="keywordflow">if</span> (std::find(subgraph-&gt;begin(), subgraph-&gt;end(), layer) != subgraph-&gt;end())</div><div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>&#160; {</div><div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>&#160; layerToSubgraph[layer] = subgraph.get();</div><div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160; }</div><div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>&#160; }</div><div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160; }</div><div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160;</div><div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160; <span class="keywordflow">if</span> (debug)</div><div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160; {</div><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160; <span class="comment">// Before dumping the dot file, set each Layer&#39;s BackendId property so that the dot file</span></div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160; <span class="comment">// shows the resulting subgraph assignments.</span></div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160; <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_layer.html">Layer</a>* layer : graph)</div><div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>&#160; {</div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160; std::string name = <span class="stringliteral">&quot;NotAssigned&quot;</span>;</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160; <span class="keyword">auto</span> subgraphIt = layerToSubgraph.find(layer);</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160; <span class="keywordflow">if</span> (subgraphIt != layerToSubgraph.end())</div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160; {</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160; <span class="keyword">auto</span> subgraphIdx = std::distance(subgraphs.begin(),</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160; std::find_if(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160; [&amp;](<span class="keyword">auto</span>&amp; s) { <span class="keywordflow">return</span> s.get() == subgraphIt-&gt;second; }));</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160; name = std::to_string(subgraphIdx);</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160; }</div><div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160; layer-&gt;SetBackendId(<a class="code" href="classarmnn_1_1_backend_id.html">armnn::BackendId</a>(name));</div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160; }</div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>&#160;</div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>&#160; std::ofstream f(<span class="stringliteral">&quot;GRAPH_&quot;</span> + std::to_string(testIdx) + <span class="stringliteral">&quot;.dot&quot;</span>);</div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>&#160; graph.SerializeToDot(f);</div><div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>&#160; }</div><div class="line"><a name="l01306"></a><span class="lineno"> 1306</span>&#160;</div><div class="line"><a name="l01307"></a><span class="lineno"> 1307</span>&#160; <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>&#160; <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>&#160; <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>&#160; <span class="keywordflow">for</span> (std::unique_ptr&lt;SubgraphView&gt;&amp; subgraph : subgraphs)</div><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>&#160; {</div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160; <span class="keywordflow">for</span> (<a class="code" href="classarmnn_1_1_input_slot.html">InputSlot</a>* inputSlot : subgraph-&gt;GetInputSlots())</div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160; {</div><div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>&#160; std::queue&lt;Layer*&gt; toProcess;</div><div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>&#160; toProcess.push(&amp;inputSlot-&gt;<a class="code" href="classarmnn_1_1_input_slot.html#a9effd325a6d512a3f8ff4bd207d53255">GetConnectedOutputSlot</a>()-&gt;<a class="code" href="classarmnn_1_1_output_slot.html#a7ddaf04177053a536f0e7be83a642bc6">GetOwningLayer</a>());</div><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>&#160; <span class="keywordflow">while</span> (toProcess.size() &gt; 0)</div><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160; {</div><div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* l = toProcess.front();</div><div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160; toProcess.pop();</div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160;</div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160; <a class="code" href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(layerToSubgraph[l] != subgraph.get());</div><div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>&#160;</div><div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>&#160; <span class="keywordflow">for</span> (<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_input_slot.html">InputSlot</a>&amp; is : l-&gt;<a class="code" href="classarmnn_1_1_layer.html#af5f530544d09a44d726f24702b67b35b">GetInputSlots</a>())</div><div class="line"><a name="l01324"></a><span class="lineno"> 1324</span>&#160; {</div><div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>&#160; toProcess.push(&amp;is.GetConnectedOutputSlot()-&gt;GetOwningLayer());</div><div class="line"><a name="l01326"></a><span class="lineno"> 1326</span>&#160; }</div><div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160; }</div><div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>&#160; }</div><div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160; }</div><div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>&#160; }</div><div class="line"><a name="l01331"></a><span class="lineno"> 1331</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_input_slot.html">armnn::InputSlot</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00041">Layer.hpp:41</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a1594bddc87d6477df300317658f566bb"><div class="ttname"><a href="classarmnn_1_1_layer.html#a1594bddc87d6477df300317658f566bb">armnn::Layer::GetNumOutputSlots</a></div><div class="ttdeci">unsigned int GetNumOutputSlots() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00308">Layer.hpp:308</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a9effd325a6d512a3f8ff4bd207d53255"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00055">Layer.hpp:55</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a7ddf0cf6f620d59c10e63495ace795d0"><div class="ttname"><a href="classarmnn_1_1_layer.html#a7ddf0cf6f620d59c10e63495ace795d0">armnn::Layer::GetName</a></div><div class="ttdeci">const char * GetName() const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00305">Layer.hpp:305</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_views_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.html">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00190">Descriptors.hpp:190</a></div></div>
<div class="ttc" id="namespacearmnn_html_a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d"><div class="ttname"><a href="namespacearmnn.html#a4dc0adc6737b5944e7671bee71788407aad42f6697b035b7580e4fef93be20b4d">armnn::BoostLogSeverityMapping::debug</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_af5f530544d09a44d726f24702b67b35b"><div class="ttname"><a href="classarmnn_1_1_layer.html#af5f530544d09a44d726f24702b67b35b">armnn::Layer::GetInputSlots</a></div><div class="ttdeci">const std::vector&lt; InputSlot &gt; &amp; GetInputSlots() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00231">Layer.hpp:231</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_backend_id_html"><div class="ttname"><a href="classarmnn_1_1_backend_id.html">armnn::BackendId</a></div><div class="ttdef"><b>Definition:</b> <a href="_backend_id_8hpp_source.html#l00075">BackendId.hpp:75</a></div></div>
<div class="ttc" id="classarmnn_1_1_splitter_layer_html"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.html">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.html#l00013">SplitterLayer.hpp:13</a></div></div>
<div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_html_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.html#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_constant_layer_html"><div class="ttname"><a href="classarmnn_1_1_constant_layer.html">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.html#l00015">ConstantLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a7ddaf04177053a536f0e7be83a642bc6"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#a7ddaf04177053a536f0e7be83a642bc6">armnn::OutputSlot::GetOwningLayer</a></div><div class="ttdeci">Layer &amp; GetOwningLayer() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00115">Layer.hpp:115</a></div></div>
<div class="ttc" id="namespacearmnn_html_ab8cf8f9fb6792e654c2d8d8382f6f01b"><div class="ttname"><a href="namespacearmnn.html#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.html#l00168">Types.hpp:168</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="ad4198d24a503ac7babf90a96bc13e74b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4198d24a503ac7babf90a96bc13e74b">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[19/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SingleSubgraph&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l01337">1337</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_layer_8hpp_source.html#l00263">Layer::GetBackendId()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="namespacearmnn.html#ae2f04a162585c0a5222a537efd5456aeafaa4524e3df19ada32643ce9a222362b">armnn::GpuAcc</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>, <a class="el" href="_layer_8hpp_source.html#l00264">Layer::SetBackendId()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l01338"></a><span class="lineno"> 1338</span>&#160;{</div><div class="line"><a name="l01339"></a><span class="lineno"> 1339</span>&#160; <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>&#160; <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>&#160;</div><div class="line"><a name="l01342"></a><span class="lineno"> 1342</span>&#160; <span class="comment">//Construct graph</span></div><div class="line"><a name="l01343"></a><span class="lineno"> 1343</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l01344"></a><span class="lineno"> 1344</span>&#160;</div><div class="line"><a name="l01345"></a><span class="lineno"> 1345</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l01346"></a><span class="lineno"> 1346</span>&#160;</div><div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::GpuAcc);</div><div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>&#160;</div><div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>&#160; convLayer2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::GpuAcc);</div><div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>&#160;</div><div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>&#160;</div><div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>&#160; convLayer2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>&#160;</div><div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>&#160; <span class="comment">// GpuAcc sub graph selector</span></div><div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01363"></a><span class="lineno"> 1363</span>&#160; graph,</div><div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>&#160; <span class="comment">// select the GpuAcc layers only</span></div><div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l){</div><div class="line"><a name="l01366"></a><span class="lineno"> 1366</span>&#160; <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.html#afdb1d37740e7a083b625d669588b6a0e">GetBackendId</a>() == Compute::GpuAcc);</div><div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>&#160; });</div><div class="line"><a name="l01369"></a><span class="lineno"> 1369</span>&#160;</div><div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>&#160; BOOST_TEST(subgraphs.size() == 1);</div><div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>&#160; <span class="keywordflow">if</span>(subgraphs.size() == 1)</div><div class="line"><a name="l01372"></a><span class="lineno"> 1372</span>&#160; {</div><div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>&#160;</div><div class="line"><a name="l01375"></a><span class="lineno"> 1375</span>&#160; <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>&#160; {</div><div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputSlots = boost::numeric_cast&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;(subgraphs[0]-&gt;GetInputSlots().size());</div><div class="line"><a name="l01378"></a><span class="lineno"> 1378</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOutputSlots = boost::numeric_cast&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;(subgraphs[0]-&gt;GetOutputSlots().size());</div><div class="line"><a name="l01379"></a><span class="lineno"> 1379</span>&#160;</div><div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>&#160; BOOST_TEST((numInputSlots == 1));</div><div class="line"><a name="l01381"></a><span class="lineno"> 1381</span>&#160; BOOST_TEST((numOutputSlots == 1));</div><div class="line"><a name="l01382"></a><span class="lineno"> 1382</span>&#160;</div><div class="line"><a name="l01383"></a><span class="lineno"> 1383</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraphInputConn1 = subgraphs[0]-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01385"></a><span class="lineno"> 1385</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraphOutputConn1 = subgraphs[0]-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01386"></a><span class="lineno"> 1386</span>&#160;</div><div class="line"><a name="l01387"></a><span class="lineno"> 1387</span>&#160; <span class="comment">// Construct dummy pre-compiled layer</span></div><div class="line"><a name="l01388"></a><span class="lineno"> 1388</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor(numInputSlots, numOutputSlots);</div><div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor, <span class="stringliteral">&quot;pre-compiled&quot;</span>);</div><div class="line"><a name="l01390"></a><span class="lineno"> 1390</span>&#160;</div><div class="line"><a name="l01391"></a><span class="lineno"> 1391</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l01392"></a><span class="lineno"> 1392</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraphs[0], preCompiledLayer);</div><div class="line"><a name="l01393"></a><span class="lineno"> 1393</span>&#160;</div><div class="line"><a name="l01394"></a><span class="lineno"> 1394</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l01395"></a><span class="lineno"> 1395</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraphInputConn1);</div><div class="line"><a name="l01396"></a><span class="lineno"> 1396</span>&#160;</div><div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraphOutputConn1);</div><div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>&#160; }</div><div class="line"><a name="l01399"></a><span class="lineno"> 1399</span>&#160; }</div><div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_afdb1d37740e7a083b625d669588b6a0e"><div class="ttname"><a href="classarmnn_1_1_layer.html#afdb1d37740e7a083b625d669588b6a0e">armnn::Layer::GetBackendId</a></div><div class="ttdeci">const BackendId &amp; GetBackendId() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00263">Layer.hpp:263</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a3f6ad59212fa8a47c9265162fff8a274"><div class="ttname"><a href="classarmnn_1_1_layer.html#a3f6ad59212fa8a47c9265162fff8a274">armnn::Layer::SetBackendId</a></div><div class="ttdeci">void SetBackendId(const BackendId &amp;id)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00264">Layer.hpp:264</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a8449c7072fc187ac2d66f217b1d707b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8449c7072fc187ac2d66f217b1d707b1">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[20/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">MultipleSubgraphs&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l01402">1402</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.html#ae2f04a162585c0a5222a537efd5456aea39f8662ca778258e9c6a14f26fec5ec1">armnn::CpuAcc</a>, <a class="el" href="_layer_8hpp_source.html#l00263">Layer::GetBackendId()</a>, <a class="el" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">IInputSlot::GetConnection()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">IOutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00199">InputSlot::GetConnection()</a>, <a class="el" href="_layer_8cpp_source.html#l00046">OutputSlot::GetConnection()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>, <a class="el" href="_layer_8hpp_source.html#l00264">Layer::SetBackendId()</a>, and <a class="el" href="_graph_8cpp_source.html#l00396">Graph::SubstituteSubgraph()</a>.</p>
<div class="fragment"><div class="line"><a name="l01403"></a><span class="lineno"> 1403</span>&#160;{</div><div class="line"><a name="l01404"></a><span class="lineno"> 1404</span>&#160; <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>&#160; <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>&#160;</div><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>&#160; <span class="comment">//Construct graph</span></div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>&#160;</div><div class="line"><a name="l01410"></a><span class="lineno"> 1410</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> inputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;input&quot;</span>);</div><div class="line"><a name="l01411"></a><span class="lineno"> 1411</span>&#160;</div><div class="line"><a name="l01412"></a><span class="lineno"> 1412</span>&#160; <a class="code" href="structarmnn_1_1_views_descriptor.html">ViewsDescriptor</a> splitterDescriptor(2);</div><div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> splitterLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_splitter_layer.html">SplitterLayer</a>&gt;(splitterDescriptor, <span class="stringliteral">&quot;splitter&quot;</span>);</div><div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::CpuAcc);</div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>&#160;</div><div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>&#160; <a class="code" href="structarmnn_1_1_convolution2d_descriptor.html">Convolution2dDescriptor</a> convDescriptor;</div><div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv1&quot;</span>);</div><div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> convLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_convolution2d_layer.html">Convolution2dLayer</a>&gt;(convDescriptor, <span class="stringliteral">&quot;conv2&quot;</span>);</div><div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>&#160;</div><div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> concatDescriptor(2);</div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> pConcatLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_concat_layer.html">ConcatLayer</a>&gt;(concatDescriptor, <span class="stringliteral">&quot;concat&quot;</span>);</div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>&#160; pConcatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a3f6ad59212fa8a47c9265162fff8a274">SetBackendId</a>(Compute::CpuAcc);</div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>&#160;</div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> outputLayer = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>&gt;(0, <span class="stringliteral">&quot;output&quot;</span>);</div><div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>&#160;</div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span>&#160; inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>&#160; splitterLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(convLayer2-&gt;GetInputSlot(0));</div><div class="line"><a name="l01429"></a><span class="lineno"> 1429</span>&#160; convLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(pConcatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>&#160; convLayer2-&gt;GetOutputSlot(0).Connect(pConcatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l01431"></a><span class="lineno"> 1431</span>&#160; pConcatLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(outputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01432"></a><span class="lineno"> 1432</span>&#160;</div><div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>&#160; <span class="comment">// CpuAcc sub graph selector</span></div><div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01436"></a><span class="lineno"> 1436</span>&#160; graph,</div><div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>&#160; <span class="comment">// select the CpuAcc layers only</span></div><div class="line"><a name="l01438"></a><span class="lineno"> 1438</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l){</div><div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>&#160; <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.html#afdb1d37740e7a083b625d669588b6a0e">GetBackendId</a>() == Compute::CpuAcc);</div><div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>&#160; });</div><div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>&#160;</div><div class="line"><a name="l01443"></a><span class="lineno"> 1443</span>&#160; BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>&#160; <span class="keywordflow">if</span>(subgraphs.size() == 2)</div><div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>&#160; {</div><div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01448"></a><span class="lineno"> 1448</span>&#160;</div><div class="line"><a name="l01449"></a><span class="lineno"> 1449</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l01451"></a><span class="lineno"> 1451</span>&#160; <span class="comment">//Sort subgraphs by their inputSlot size.</span></div><div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>&#160; std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>&#160; [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> &amp; lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> &amp; rhs)</div><div class="line"><a name="l01454"></a><span class="lineno"> 1454</span>&#160; {</div><div class="line"><a name="l01455"></a><span class="lineno"> 1455</span>&#160; <span class="keywordflow">return</span> (lhs-&gt;GetInputSlots().size() &lt; rhs-&gt;GetInputSlots().size());</div><div class="line"><a name="l01456"></a><span class="lineno"> 1456</span>&#160; }</div><div class="line"><a name="l01457"></a><span class="lineno"> 1457</span>&#160; );</div><div class="line"><a name="l01458"></a><span class="lineno"> 1458</span>&#160;</div><div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputSlots1 = boost::numeric_cast&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;(subgraphs[0]-&gt;GetInputSlots().size());</div><div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOutputSlots1 = boost::numeric_cast&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;(subgraphs[0]-&gt;GetOutputSlots().size());</div><div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>&#160;</div><div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputSlots2 = boost::numeric_cast&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;(subgraphs[1]-&gt;GetInputSlots().size());</div><div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOutputSlots2 = boost::numeric_cast&lt;<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>&gt;(subgraphs[1]-&gt;GetOutputSlots().size());</div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>&#160;</div><div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraph1InputConn = subgraphs[0]-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraph1OutputConn1 = subgraphs[0]-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraph1OutputConn2 = subgraphs[0]-&gt;GetOutputSlot(1)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;</div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160; <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>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraph2InputConn1 = subgraphs[1]-&gt;GetInputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>&#160; <a class="code" href="classarmnn_1_1_i_output_slot.html">IOutputSlot</a>* subgraph2InputConn2 = subgraphs[1]-&gt;GetInputSlot(1)-&gt;<a class="code" href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">GetConnection</a>();</div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>&#160; <a class="code" href="classarmnn_1_1_i_input_slot.html">IInputSlot</a>* subgraph2OutputConn = subgraphs[1]-&gt;GetOutputSlot(0)-&gt;<a class="code" href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">GetConnection</a>(0);</div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>&#160;</div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor1(numInputSlots1, numOutputSlots1);</div><div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor1, <span class="stringliteral">&quot;pre-compiled1&quot;</span>);</div><div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>&#160;</div><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160; <a class="code" href="structarmnn_1_1_pre_compiled_descriptor.html">PreCompiledDescriptor</a> preCompiledDescriptor2(numInputSlots2, numOutputSlots2);</div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160; <a class="code" href="classarmnn_1_1_layer.html">Layer</a>* <span class="keyword">const</span> preCompiledLayer2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_pre_compiled_layer.html">PreCompiledLayer</a>&gt;(preCompiledDescriptor2, <span class="stringliteral">&quot;pre-compiled2&quot;</span>);</div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;</div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160; <span class="comment">// Substitute sub-graph with pre-compiled layer</span></div><div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraphs[0], preCompiledLayer1);</div><div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>&#160; graph.<a class="code" href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">SubstituteSubgraph</a>(*subgraphs[1], preCompiledLayer2);</div><div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>&#160;</div><div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>&#160; <span class="comment">// Check that connections are correct after substitution</span></div><div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraph1InputConn);</div><div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraph1OutputConn1);</div><div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(1).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraph1OutputConn2);</div><div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>&#160;</div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraph2InputConn1);</div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1).<a class="code" href="classarmnn_1_1_input_slot.html#a3153abb7c0c0a84629079b2fac7db54f">GetConnection</a>(), subgraph2InputConn2);</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>&#160; BOOST_CHECK_EQUAL(preCompiledLayer2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#a048e8c1536cf6b8871b093a73a4a3a85">GetConnection</a>(0), subgraph2OutputConn);</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160; }</div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160; }</div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_i_input_slot_html_a81fbf6103761e55061b62ba989b00f10"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html#a81fbf6103761e55061b62ba989b00f10">armnn::IInputSlot::GetConnection</a></div><div class="ttdeci">virtual const IOutputSlot * GetConnection() const =0</div></div>
<div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="classarmnn_1_1_convolution2d_layer_html"><div class="ttname"><a href="classarmnn_1_1_convolution2d_layer.html">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.html#l00015">Convolution2dLayer.hpp:15</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html_a9fffb92dc6d2edd5258d574a5862fc83"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a9fffb92dc6d2edd5258d574a5862fc83">armnn::IOutputSlot::GetConnection</a></div><div class="ttdeci">virtual const IInputSlot * GetConnection(unsigned int index) const =0</div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_afdb1d37740e7a083b625d669588b6a0e"><div class="ttname"><a href="classarmnn_1_1_layer.html#afdb1d37740e7a083b625d669588b6a0e">armnn::Layer::GetBackendId</a></div><div class="ttdeci">const BackendId &amp; GetBackendId() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00263">Layer.hpp:263</a></div></div>
<div class="ttc" id="classarmnn_1_1_pre_compiled_layer_html"><div class="ttname"><a href="classarmnn_1_1_pre_compiled_layer.html">armnn::PreCompiledLayer</a></div><div class="ttdef"><b>Definition:</b> <a href="_pre_compiled_layer_8hpp_source.html#l00022">PreCompiledLayer.hpp:22</a></div></div>
<div class="ttc" id="classarmnn_1_1_concat_layer_html"><div class="ttname"><a href="classarmnn_1_1_concat_layer.html">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.html#l00013">ConcatLayer.hpp:13</a></div></div>
<div class="ttc" id="structarmnn_1_1_views_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.html">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. Descriptor to configure the splitting process. Number of Views must be equal to the number of outputs, and their order must match - e.g. first view corresponds to the first output, second view to the second output, etc. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00190">Descriptors.hpp:190</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a3f6ad59212fa8a47c9265162fff8a274"><div class="ttname"><a href="classarmnn_1_1_layer.html#a3f6ad59212fa8a47c9265162fff8a274">armnn::Layer::SetBackendId</a></div><div class="ttdeci">void SetBackendId(const BackendId &amp;id)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00264">Layer.hpp:264</a></div></div>
<div class="ttc" id="classarmnn_1_1_input_slot_html_a3153abb7c0c0a84629079b2fac7db54f"><div class="ttname"><a href="classarmnn_1_1_input_slot.html#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.html#l00199">Layer.hpp:199</a></div></div>
<div class="ttc" id="classarmnn_1_1_splitter_layer_html"><div class="ttname"><a href="classarmnn_1_1_splitter_layer.html">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.html#l00013">SplitterLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_a048e8c1536cf6b8871b093a73a4a3a85"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#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.html#l00046">Layer.cpp:46</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_input_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_input_slot.html">armnn::IInputSlot</a></div><div class="ttdoc">An input connection slot for a layer. The input slot can be connected to an output slot of the preced...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00024">INetwork.hpp:24</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">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.html#l00013">OutputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_aafbd4b469e47160017f409df8d077184"><div class="ttname"><a href="classarmnn_1_1_graph.html#aafbd4b469e47160017f409df8d077184">armnn::Graph::SubstituteSubgraph</a></div><div class="ttdeci">void SubstituteSubgraph(SubgraphView &amp;subgraph, IConnectableLayer *substituteLayer)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_8cpp_source.html#l00396">Graph.cpp:396</a></div></div>
<div class="ttc" id="classarmnn_1_1_i_output_slot_html"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. The output slot may be connected to 1 or more input slots of s...</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00037">INetwork.hpp:37</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.html">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00392">Descriptors.hpp:392</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_pre_compiled_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_pre_compiled_descriptor.html">armnn::PreCompiledDescriptor</a></div><div class="ttdoc">A PreCompiledDescriptor for the PreCompiledLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l01066">Descriptors.hpp:1066</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a4612ae0ff7acb1d5063a7f5d8cff3a4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4612ae0ff7acb1d5063a7f5d8cff3a4b">&#9670;&nbsp;</a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[21/21]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">BOOST_AUTO_TEST_CASE </td>
<td>(</td>
<td class="paramtype">SubgraphCycles&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_subgraph_view_tests_8cpp_source.html#l01497">1497</a> of file <a class="el" href="_subgraph_view_tests_8cpp_source.html">SubgraphViewTests.cpp</a>.</p>
<p class="reference">References <a class="el" href="_graph_8hpp_source.html#l00397">Graph::AddLayer()</a>, <a class="el" href="_profiler_tests_8cpp.html#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_layer_8cpp_source.html#l00079">OutputSlot::Connect()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00012">CreateInputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00025">CreateOutputsFrom()</a>, <a class="el" href="_common_test_utils_8cpp_source.html#l00038">CreateSubgraphViewFrom()</a>, <a class="el" href="_layer_8hpp_source.html#l00310">Layer::GetInputSlot()</a>, <a class="el" href="_layer_8hpp_source.html#l00216">Layer::GetNameStr()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00251">SubgraphViewSelector::SelectSubgraphs()</a>.</p>
<div class="fragment"><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;{</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160; <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>&#160; <span class="comment">//</span></div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160; <span class="comment">// X0 -&gt; M0 -&gt; X1 -&gt; M2 -&gt; X2</span></div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160; <span class="comment">// X0 -&gt; M0 -&gt; M1 -&gt; M2 -&gt; X2</span></div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160; <span class="comment">//</span></div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160; <span class="comment">/*</span></div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;<span class="comment"> X0</span></div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;<span class="comment"> |</span></div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;<span class="comment"> |</span></div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;<span class="comment"> M0</span></div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;<span class="comment"> / |</span></div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>&#160;<span class="comment"> / |</span></div><div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;<span class="comment"> X1 M1</span></div><div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;<span class="comment"> \ /</span></div><div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>&#160;<span class="comment"> M2</span></div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;<span class="comment"> |</span></div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;<span class="comment"> X2</span></div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160; <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>&#160; <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>&#160; <span class="comment">//</span></div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160; <a class="code" href="classarmnn_1_1_graph.html">Graph</a> graph;</div><div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;</div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160; <a class="code" href="structarmnn_1_1_origins_descriptor.html">OriginsDescriptor</a> originsDescriptor(2);</div><div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>&#160; <span class="keyword">auto</span> x0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>&gt;(0, <span class="stringliteral">&quot;x0&quot;</span>);</div><div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>&#160; <span class="keyword">auto</span> m0 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(<a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;m0&quot;</span>);</div><div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>&#160; <span class="keyword">auto</span> x1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(<a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;x1&quot;</span>);</div><div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>&#160; <span class="keyword">auto</span> m1 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(<a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;m1&quot;</span>);</div><div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>&#160; <span class="keyword">auto</span> m2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_addition_layer.html">AdditionLayer</a>&gt;(<span class="stringliteral">&quot;m2&quot;</span>);</div><div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>&#160; <span class="keyword">auto</span> x2 = graph.<a class="code" href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">AddLayer</a>&lt;<a class="code" href="classarmnn_1_1_activation_layer.html">ActivationLayer</a>&gt;(<a class="code" href="structarmnn_1_1_activation_descriptor.html">ActivationDescriptor</a>{}, <span class="stringliteral">&quot;x2&quot;</span>);</div><div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>&#160;</div><div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160; x0-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m0-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160; m0-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(x1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160; m0-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>&#160; x1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>&#160; m1-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(1));</div><div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>&#160; m2-&gt;<a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(x2-&gt;<a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div><div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>&#160;</div><div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>&#160; <span class="comment">// All selected &#39;M*&#39; layers will be have &#39;m&#39; in the name</span></div><div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>&#160; <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">SubgraphViewSelector::Subgraphs</a> subgraphs =</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160; SubgraphViewSelector::SelectSubgraphs(</div><div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160; graph,</div><div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>&#160; <span class="comment">// select the middle layers only</span></div><div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>&#160; [](<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_layer.html">Layer</a> &amp; l)</div><div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>&#160; {</div><div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>&#160; <span class="keywordtype">bool</span> toSelect = (l.<a class="code" href="classarmnn_1_1_layer.html#a9a97cb6d32661a57fc33bd29b8e41ff4">GetNameStr</a>().find(<span class="charliteral">&#39;m&#39;</span>) != std::string::npos);</div><div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>&#160; <span class="keywordflow">return</span> toSelect;</div><div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>&#160; });</div><div class="line"><a name="l01547"></a><span class="lineno"> 1547</span>&#160;</div><div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>&#160; <span class="comment">// expected results to test against</span></div><div class="line"><a name="l01549"></a><span class="lineno"> 1549</span>&#160; <span class="keyword">auto</span> inputSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m0}),</div><div class="line"><a name="l01550"></a><span class="lineno"> 1550</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m0, m1}),</div><div class="line"><a name="l01551"></a><span class="lineno"> 1551</span>&#160; {m0, m1});</div><div class="line"><a name="l01552"></a><span class="lineno"> 1552</span>&#160;</div><div class="line"><a name="l01553"></a><span class="lineno"> 1553</span>&#160; <span class="keyword">auto</span> outputSubgraph = <a class="code" href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a>(<a class="code" href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a>({m2}),</div><div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>&#160; <a class="code" href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a>({m2}),</div><div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>&#160; {m2});</div><div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>&#160;</div><div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>&#160; BOOST_TEST(subgraphs.size() == 2);</div><div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>&#160; <span class="keywordflow">if</span> (subgraphs.size() == 2)</div><div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>&#160; {</div><div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>&#160; <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>&#160; BOOST_TEST((subgraphs[0] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>&#160; BOOST_TEST((subgraphs[1] != <span class="keyword">nullptr</span>));</div><div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>&#160;</div><div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>&#160; <span class="keywordflow">if</span> (subgraphs[0].<span class="keyword">get</span>() != <span class="keyword">nullptr</span> &amp;&amp; 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>&#160; {</div><div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>&#160; <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>&#160; std::sort(subgraphs.begin(), subgraphs.end(),</div><div class="line"><a name="l01568"></a><span class="lineno"> 1568</span>&#160; [](<a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> &amp; lhs, <a class="code" href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">SubgraphViewSelector::SubgraphViewPtr</a> &amp; rhs)</div><div class="line"><a name="l01569"></a><span class="lineno"> 1569</span>&#160; {</div><div class="line"><a name="l01570"></a><span class="lineno"> 1570</span>&#160; <span class="keywordflow">return</span> (lhs-&gt;GetLayers().size() &lt; rhs-&gt;GetLayers().size());</div><div class="line"><a name="l01571"></a><span class="lineno"> 1571</span>&#160; }</div><div class="line"><a name="l01572"></a><span class="lineno"> 1572</span>&#160; );</div><div class="line"><a name="l01573"></a><span class="lineno"> 1573</span>&#160;</div><div class="line"><a name="l01574"></a><span class="lineno"> 1574</span>&#160; <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>&#160; BOOST_TEST(subgraphs[0]-&gt;GetLayers().size() == 1);</div><div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>&#160; BOOST_TEST(subgraphs[1]-&gt;GetLayers().size() == 2);</div><div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>&#160;</div><div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>&#160; CompareSubgraphViews(subgraphs[0], outputSubgraph);</div><div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>&#160; CompareSubgraphViews(subgraphs[1], inputSubgraph);</div><div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>&#160; }</div><div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>&#160; }</div><div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">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.html#l00013">InputLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html"><div class="ttname"><a href="classarmnn_1_1_layer.html">armnn::Layer</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00209">Layer.hpp:209</a></div></div>
<div class="ttc" id="structarmnn_1_1_activation_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.html">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00020">Descriptors.hpp:20</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html_a7563c5b899e7d0ada08fd0fdb202f205"><div class="ttname"><a href="classarmnn_1_1_graph.html#a7563c5b899e7d0ada08fd0fdb202f205">armnn::Graph::AddLayer</a></div><div class="ttdeci">LayerT * AddLayer(Args &amp;&amp;... 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.html#l00397">Graph.hpp:397</a></div></div>
<div class="ttc" id="classarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &amp;destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00079">Layer.cpp:79</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a9a97cb6d32661a57fc33bd29b8e41ff4"><div class="ttname"><a href="classarmnn_1_1_layer.html#a9a97cb6d32661a57fc33bd29b8e41ff4">armnn::Layer::GetNameStr</a></div><div class="ttdeci">const std::string &amp; GetNameStr() const</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00216">Layer.hpp:216</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_aaf71a63dbbc776f8961b0f4fdb9da021"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#aaf71a63dbbc776f8961b0f4fdb9da021">armnn::SubgraphViewSelector::Subgraphs</a></div><div class="ttdeci">std::vector&lt; SubgraphViewPtr &gt; Subgraphs</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00025">SubgraphViewSelector.hpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_activation_layer_html"><div class="ttname"><a href="classarmnn_1_1_activation_layer.html">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.html#l00012">ActivationLayer.hpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a9892eac8f1b8ed9cea0baf643fb6d951"><div class="ttname"><a href="_common_test_utils_8cpp.html#a9892eac8f1b8ed9cea0baf643fb6d951">CreateInputsFrom</a></div><div class="ttdeci">SubgraphView::InputSlots CreateInputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00012">CommonTestUtils.cpp:12</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_ae405c72b6d52a1bf4b3471032e76e3f0"><div class="ttname"><a href="_common_test_utils_8cpp.html#ae405c72b6d52a1bf4b3471032e76e3f0">CreateOutputsFrom</a></div><div class="ttdeci">SubgraphView::OutputSlots CreateOutputsFrom(const std::vector&lt; Layer *&gt; &amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00025">CommonTestUtils.cpp:25</a></div></div>
<div class="ttc" id="classarmnn_1_1_addition_layer_html"><div class="ttname"><a href="classarmnn_1_1_addition_layer.html">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.html#l00013">AdditionLayer.hpp:13</a></div></div>
<div class="ttc" id="classarmnn_1_1_graph_html"><div class="ttname"><a href="classarmnn_1_1_graph.html">armnn::Graph</a></div><div class="ttdef"><b>Definition:</b> <a href="_graph_8hpp_source.html#l00029">Graph.hpp:29</a></div></div>
<div class="ttc" id="classarmnn_1_1_subgraph_view_selector_html_a4684a457c7786484375f06e9ab2d2265"><div class="ttname"><a href="classarmnn_1_1_subgraph_view_selector.html#a4684a457c7786484375f06e9ab2d2265">armnn::SubgraphViewSelector::SubgraphViewPtr</a></div><div class="ttdeci">std::unique_ptr&lt; SubgraphView &gt; SubgraphViewPtr</div><div class="ttdef"><b>Definition:</b> <a href="_subgraph_view_selector_8hpp_source.html#l00024">SubgraphViewSelector.hpp:24</a></div></div>
<div class="ttc" id="_common_test_utils_8cpp_html_a3ed487c53d08c08186837be90030a855"><div class="ttname"><a href="_common_test_utils_8cpp.html#a3ed487c53d08c08186837be90030a855">CreateSubgraphViewFrom</a></div><div class="ttdeci">SubgraphView::SubgraphViewPtr CreateSubgraphViewFrom(SubgraphView::InputSlots &amp;&amp;inputs, SubgraphView::OutputSlots &amp;&amp;outputs, SubgraphView::Layers &amp;&amp;layers)</div><div class="ttdef"><b>Definition:</b> <a href="_common_test_utils_8cpp_source.html#l00038">CommonTestUtils.cpp:38</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot &amp; GetOutputSlot(unsigned int index=0) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00312">Layer.hpp:312</a></div></div>
<div class="ttc" id="structarmnn_1_1_origins_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.html">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. Descriptor to configure the concatenation process...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00147">Descriptors.hpp:147</a></div></div>
<div class="ttc" id="classarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot &amp; GetInputSlot(unsigned int index) const override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00310">Layer.hpp:310</a></div></div>
</div><!-- fragment -->
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_e0a84d05c80a2ef4231141dcbbeac5c8.html">armnn</a></li><li class="navelem"><a class="el" href="dir_9d86fd1fbecbedf5bdb69c7e7235fe5f.html">test</a></li><li class="navelem"><a class="el" href="_subgraph_view_tests_8cpp.html">SubgraphViewTests.cpp</a></li>
<li class="footer">Generated on Fri Mar 13 2020 16:06:59 for ArmNN by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>