Update ACL pin to 8abbabd6ad946441c8ef1a03896fa98f7801af1f
[platform/upstream/armnn.git] / Documentation / _assert_8cpp.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml">
3 <head>
4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
6 <meta name="generator" content="Doxygen 1.8.13"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>ArmNN: src/armnnTfParser/test/Assert.cpp File Reference</title>
9 <link href="tabs.css" rel="stylesheet" type="text/css"/>
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <link href="navtree.css" rel="stylesheet" type="text/css"/>
13 <script type="text/javascript" src="resize.js"></script>
14 <script type="text/javascript" src="navtreedata.js"></script>
15 <script type="text/javascript" src="navtree.js"></script>
16 <script type="text/javascript">
17   $(document).ready(initResizable);
18 </script>
19 <link href="search/search.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="search/searchdata.js"></script>
21 <script type="text/javascript" src="search/search.js"></script>
22 <link href="doxygen.css" rel="stylesheet" type="text/css" />
23 </head>
24 <body>
25 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
26 <div id="titlearea">
27 <table cellspacing="0" cellpadding="0">
28  <tbody>
29  <tr style="height: 56px;">
30   <td id="projectalign" style="padding-left: 0.5em;">
31    <div id="projectname">ArmNN
32    &#160;<span id="projectnumber">NotReleased</span>
33    </div>
34   </td>
35  </tr>
36  </tbody>
37 </table>
38 </div>
39 <!-- end header part -->
40 <!-- Generated by Doxygen 1.8.13 -->
41 <script type="text/javascript">
42 var searchBox = new SearchBox("searchBox", "search",false,'Search');
43 </script>
44 <script type="text/javascript" src="menudata.js"></script>
45 <script type="text/javascript" src="menu.js"></script>
46 <script type="text/javascript">
47 $(function() {
48   initMenu('',true,false,'search.php','Search');
49   $(document).ready(function() { init_search(); });
50 });
51 </script>
52 <div id="main-nav"></div>
53 </div><!-- top -->
54 <div id="side-nav" class="ui-resizable side-nav-resizable">
55   <div id="nav-tree">
56     <div id="nav-tree-contents">
57       <div id="nav-sync" class="sync"></div>
58     </div>
59   </div>
60   <div id="splitbar" style="-moz-user-select:none;" 
61        class="ui-resizable-handle">
62   </div>
63 </div>
64 <script type="text/javascript">
65 $(document).ready(function(){initNavTree('_assert_8cpp.html','');});
66 </script>
67 <div id="doc-content">
68 <!-- window showing the filter options -->
69 <div id="MSearchSelectWindow"
70      onmouseover="return searchBox.OnSearchSelectShow()"
71      onmouseout="return searchBox.OnSearchSelectHide()"
72      onkeydown="return searchBox.OnSearchSelectKey(event)">
73 </div>
74
75 <!-- iframe showing the search results (closed by default) -->
76 <div id="MSearchResultsWindow">
77 <iframe src="javascript:void(0)" frameborder="0" 
78         name="MSearchResults" id="MSearchResults">
79 </iframe>
80 </div>
81
82 <div class="header">
83   <div class="summary">
84 <a href="#func-members">Functions</a>  </div>
85   <div class="headertitle">
86 <div class="title">Assert.cpp File Reference</div>  </div>
87 </div><!--header-->
88 <div class="contents">
89 <div class="textblock"><code>#include &quot;<a class="el" href="_i_tf_parser_8hpp_source.html">armnnTfParser/ITfParser.hpp</a>&quot;</code><br />
90 <code>#include &quot;<a class="el" href="_parser_prototxt_fixture_8hpp_source.html">ParserPrototxtFixture.hpp</a>&quot;</code><br />
91 <code>#include &quot;<a class="el" href="_graph_utils_8hpp_source.html">test/GraphUtils.hpp</a>&quot;</code><br />
92 <code>#include &lt;boost/test/unit_test.hpp&gt;</code><br />
93 </div>
94 <p><a href="_assert_8cpp_source.html">Go to the source code of this file.</a></p>
95 <table class="memberdecls">
96 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
97 Functions</h2></td></tr>
98 <tr class="memitem:aca9c806a9c2cf6fa453c4110ecb79af9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_assert_8cpp.html#aca9c806a9c2cf6fa453c4110ecb79af9">BOOST_FIXTURE_TEST_CASE</a> (AssertSimpleTest, AssertSimpleFixture)</td></tr>
99 <tr class="separator:aca9c806a9c2cf6fa453c4110ecb79af9"><td class="memSeparator" colspan="2">&#160;</td></tr>
100 <tr class="memitem:ac27dc1cabf754208dae88e0879dd6515"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_assert_8cpp.html#ac27dc1cabf754208dae88e0879dd6515">BOOST_FIXTURE_TEST_CASE</a> (AssertSimpleGraphStructureTest, AssertSimpleFixture)</td></tr>
101 <tr class="separator:ac27dc1cabf754208dae88e0879dd6515"><td class="memSeparator" colspan="2">&#160;</td></tr>
102 <tr class="memitem:a79cb077a071f8d5232e2e902d562becd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_assert_8cpp.html#a79cb077a071f8d5232e2e902d562becd">BOOST_FIXTURE_TEST_CASE</a> (AssertTest, AssertFixture)</td></tr>
103 <tr class="separator:a79cb077a071f8d5232e2e902d562becd"><td class="memSeparator" colspan="2">&#160;</td></tr>
104 <tr class="memitem:a1645128a338ac44257fe852d11ea968b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_assert_8cpp.html#a1645128a338ac44257fe852d11ea968b">BOOST_FIXTURE_TEST_CASE</a> (AssertGraphStructureTest, AssertFixture)</td></tr>
105 <tr class="separator:a1645128a338ac44257fe852d11ea968b"><td class="memSeparator" colspan="2">&#160;</td></tr>
106 </table>
107 <h2 class="groupheader">Function Documentation</h2>
108 <a id="aca9c806a9c2cf6fa453c4110ecb79af9"></a>
109 <h2 class="memtitle"><span class="permalink"><a href="#aca9c806a9c2cf6fa453c4110ecb79af9">&#9670;&nbsp;</a></span>BOOST_FIXTURE_TEST_CASE() <span class="overload">[1/4]</span></h2>
110
111 <div class="memitem">
112 <div class="memproto">
113       <table class="memname">
114         <tr>
115           <td class="memname">BOOST_FIXTURE_TEST_CASE </td>
116           <td>(</td>
117           <td class="paramtype">AssertSimpleTest&#160;</td>
118           <td class="paramname">, </td>
119         </tr>
120         <tr>
121           <td class="paramkey"></td>
122           <td></td>
123           <td class="paramtype">AssertSimpleFixture&#160;</td>
124           <td class="paramname">&#160;</td>
125         </tr>
126         <tr>
127           <td></td>
128           <td>)</td>
129           <td></td><td></td>
130         </tr>
131       </table>
132 </div><div class="memdoc">
133
134 <p class="definition">Definition at line <a class="el" href="_assert_8cpp_source.html#l00093">93</a> of file <a class="el" href="_assert_8cpp_source.html">Assert.cpp</a>.</p>
135
136 <p class="reference">References <a class="el" href="_parser_prototxt_fixture_8hpp_source.html#l00086">ParserPrototxtFixture&lt; TParser &gt;::SetupSingleInputSingleOutput()</a>.</p>
137 <div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;{</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    SetupSingleInputSingleOutput({ 1, 1, 1, 4 }, <span class="stringliteral">&quot;Placeholder&quot;</span>, <span class="stringliteral">&quot;Add&quot;</span>);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    RunTest&lt;4&gt;({ 1.0f, 2.0f, 3.0f, 4.0f }, { 2.0f, 4.0f, 6.0f, 8.0f });</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;}</div></div><!-- fragment -->
138 </div>
139 </div>
140 <a id="ac27dc1cabf754208dae88e0879dd6515"></a>
141 <h2 class="memtitle"><span class="permalink"><a href="#ac27dc1cabf754208dae88e0879dd6515">&#9670;&nbsp;</a></span>BOOST_FIXTURE_TEST_CASE() <span class="overload">[2/4]</span></h2>
142
143 <div class="memitem">
144 <div class="memproto">
145       <table class="memname">
146         <tr>
147           <td class="memname">BOOST_FIXTURE_TEST_CASE </td>
148           <td>(</td>
149           <td class="paramtype">AssertSimpleGraphStructureTest&#160;</td>
150           <td class="paramname">, </td>
151         </tr>
152         <tr>
153           <td class="paramkey"></td>
154           <td></td>
155           <td class="paramtype">AssertSimpleFixture&#160;</td>
156           <td class="paramname">&#160;</td>
157         </tr>
158         <tr>
159           <td></td>
160           <td>)</td>
161           <td></td><td></td>
162         </tr>
163       </table>
164 </div><div class="memdoc">
165
166 <p class="definition">Definition at line <a class="el" href="_assert_8cpp_source.html#l00099">99</a> of file <a class="el" href="_assert_8cpp_source.html">Assert.cpp</a>.</p>
167
168 <p class="reference">References <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::Addition</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00032">CheckNumberOfInputSlot()</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00037">CheckNumberOfOutputSlot()</a>, <a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00020">GetFirstLayerWithName()</a>, <a class="el" href="_layer_8hpp_source.html#l00259">Layer::GetType()</a>, <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::Input</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00042">IsConnected()</a>, and <a class="el" href="_parser_prototxt_fixture_8hpp_source.html#l00158">ParserPrototxtFixture&lt; TParser &gt;::SetupOptimizedNetwork()</a>.</p>
169 <div class="fragment"><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;{</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    <span class="keyword">auto</span> optimized = SetupOptimizedNetwork({ { <span class="stringliteral">&quot;Placeholder&quot;</span>, { 1, 1, 1, 4 } } }, { <span class="stringliteral">&quot;Add&quot;</span> });</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    <span class="keyword">auto</span> optimizedNetwork = boost::polymorphic_downcast&lt;armnn::OptimizedNetwork*&gt;(optimized.get());</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    <span class="keyword">auto</span> graph = optimizedNetwork-&gt;GetGraph();</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    BOOST_TEST((graph.GetNumInputs() == 1));</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    BOOST_TEST((graph.GetNumOutputs() == 1));</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    BOOST_TEST((graph.GetNumLayers() == 3));</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <a class="code" href="classarmnn_1_1_layer.html">armnn::Layer</a>* inputLayer = <a class="code" href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a>(graph, <span class="stringliteral">&quot;Placeholder&quot;</span>);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    BOOST_TEST((inputLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a>));</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a>(inputLayer, 0));</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a>(inputLayer, 1));</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <a class="code" href="classarmnn_1_1_layer.html">armnn::Layer</a>* addLayer = <a class="code" href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a>(graph, <span class="stringliteral">&quot;Add&quot;</span>);</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;    BOOST_TEST((addLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::LayerType::Addition</a>));</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a>(addLayer, 2));</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a>(addLayer, 1));</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> tensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a>({1, 1, 1, 4}), <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(inputLayer, addLayer, 0, 0, tensorInfo));</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(inputLayer, addLayer, 0, 1, tensorInfo));</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; outputLayer : graph.GetOutputLayers())</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    {</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(addLayer, const_cast&lt;armnn::OutputLayer*&gt;(outputLayer), 0, 0, tensorInfo));</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    }</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;}</div><div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::LayerType::Addition</a></div></div>
170 <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>
171 <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>
172 <div class="ttc" id="_graph_utils_8cpp_html_a4c04337db4d5f380219a005657a8223b"><div class="ttname"><a href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a></div><div class="ttdeci">bool CheckNumberOfInputSlot(armnn::Layer *layer, unsigned int num)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00032">GraphUtils.cpp:32</a></div></div>
173 <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div>
174 <div class="ttc" id="_graph_utils_8cpp_html_afd518dba3d52728670459e4ad3bed5e1"><div class="ttname"><a href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a></div><div class="ttdeci">bool IsConnected(armnn::Layer *srcLayer, armnn::Layer *destLayer, unsigned int srcSlot, unsigned int destSlot, const armnn::TensorInfo &amp;expectedTensorInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00042">GraphUtils.cpp:42</a></div></div>
175 <div class="ttc" id="namespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div>
176 <div class="ttc" id="classarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div>
177 <div class="ttc" id="_graph_utils_8cpp_html_a5f17e02e0054dac0a691685a0464ed36"><div class="ttname"><a href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a></div><div class="ttdeci">armnn::Layer * GetFirstLayerWithName(armnn::Graph &amp;graph, const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00020">GraphUtils.cpp:20</a></div></div>
178 <div class="ttc" id="_graph_utils_8cpp_html_aada2e27f100807f5786eecb03390ba58"><div class="ttname"><a href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a></div><div class="ttdeci">bool CheckNumberOfOutputSlot(armnn::Layer *layer, unsigned int num)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00037">GraphUtils.cpp:37</a></div></div>
179 <div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a></div></div>
180 </div><!-- fragment -->
181 </div>
182 </div>
183 <a id="a79cb077a071f8d5232e2e902d562becd"></a>
184 <h2 class="memtitle"><span class="permalink"><a href="#a79cb077a071f8d5232e2e902d562becd">&#9670;&nbsp;</a></span>BOOST_FIXTURE_TEST_CASE() <span class="overload">[3/4]</span></h2>
185
186 <div class="memitem">
187 <div class="memproto">
188       <table class="memname">
189         <tr>
190           <td class="memname">BOOST_FIXTURE_TEST_CASE </td>
191           <td>(</td>
192           <td class="paramtype">AssertTest&#160;</td>
193           <td class="paramname">, </td>
194         </tr>
195         <tr>
196           <td class="paramkey"></td>
197           <td></td>
198           <td class="paramtype">AssertFixture&#160;</td>
199           <td class="paramname">&#160;</td>
200         </tr>
201         <tr>
202           <td></td>
203           <td>)</td>
204           <td></td><td></td>
205         </tr>
206       </table>
207 </div><div class="memdoc">
208
209 <p class="definition">Definition at line <a class="el" href="_assert_8cpp_source.html#l00237">237</a> of file <a class="el" href="_assert_8cpp_source.html">Assert.cpp</a>.</p>
210 <div class="fragment"><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;{</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    Setup({ { <span class="stringliteral">&quot;Input0&quot;</span>, { 1, 1, 2, 2 } },</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;            { <span class="stringliteral">&quot;Input1&quot;</span>, { 1, 1, 2, 2 } } },</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;          { <span class="stringliteral">&quot;Output&quot;</span> });</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    RunTest&lt;4&gt;({ { <span class="stringliteral">&quot;Input0&quot;</span>, { 4.0f,   3.0f,</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                               2.0f,   1.0f } },</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="stringliteral">&quot;Input1&quot;</span>, { 1.0f,   2.0f,</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                               3.0f,   4.0f } } },</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;               { { <span class="stringliteral">&quot;Output&quot;</span>, { 7.0f,   4.0f,</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                               1.0f,  -2.0f } } });</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;}</div></div><!-- fragment -->
211 </div>
212 </div>
213 <a id="a1645128a338ac44257fe852d11ea968b"></a>
214 <h2 class="memtitle"><span class="permalink"><a href="#a1645128a338ac44257fe852d11ea968b">&#9670;&nbsp;</a></span>BOOST_FIXTURE_TEST_CASE() <span class="overload">[4/4]</span></h2>
215
216 <div class="memitem">
217 <div class="memproto">
218       <table class="memname">
219         <tr>
220           <td class="memname">BOOST_FIXTURE_TEST_CASE </td>
221           <td>(</td>
222           <td class="paramtype">AssertGraphStructureTest&#160;</td>
223           <td class="paramname">, </td>
224         </tr>
225         <tr>
226           <td class="paramkey"></td>
227           <td></td>
228           <td class="paramtype">AssertFixture&#160;</td>
229           <td class="paramname">&#160;</td>
230         </tr>
231         <tr>
232           <td></td>
233           <td>)</td>
234           <td></td><td></td>
235         </tr>
236       </table>
237 </div><div class="memdoc">
238
239 <p class="definition">Definition at line <a class="el" href="_assert_8cpp_source.html#l00253">253</a> of file <a class="el" href="_assert_8cpp_source.html">Assert.cpp</a>.</p>
240
241 <p class="reference">References <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::Addition</a>, <a class="el" href="_profiler_tests_8cpp.html#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00032">CheckNumberOfInputSlot()</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00037">CheckNumberOfOutputSlot()</a>, <a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00020">GetFirstLayerWithName()</a>, <a class="el" href="_layer_8hpp_source.html#l00259">Layer::GetType()</a>, <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::Input</a>, <a class="el" href="_graph_utils_8cpp_source.html#l00042">IsConnected()</a>, and <a class="el" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a6eb8b8b560161603402c0238b3a7d8b0">armnn::Subtraction</a>.</p>
242 <div class="fragment"><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;{</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    <span class="keyword">auto</span> optimized = SetupOptimizedNetwork({ { <span class="stringliteral">&quot;Input0&quot;</span>, { 1, 1, 2, 2 } },</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                                             { <span class="stringliteral">&quot;Input1&quot;</span>, { 1, 1, 2, 2 } } },</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                                           { <span class="stringliteral">&quot;Output&quot;</span> });</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="keyword">auto</span> optimizedNetwork = boost::polymorphic_downcast&lt;armnn::OptimizedNetwork*&gt;(optimized.get());</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    <span class="keyword">auto</span> graph = optimizedNetwork-&gt;GetGraph();</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    BOOST_TEST((graph.GetNumInputs() == 2));</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    BOOST_TEST((graph.GetNumOutputs() == 1));</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    BOOST_TEST((graph.GetNumLayers() == 5));</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <a class="code" href="classarmnn_1_1_layer.html">armnn::Layer</a>* inputLayer0 = <a class="code" href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a>(graph, <span class="stringliteral">&quot;Input0&quot;</span>);</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    BOOST_TEST((inputLayer0-&gt;<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a>));</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a>(inputLayer0, 0));</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a>(inputLayer0, 1));</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">armnn::Layer</a>* inputLayer1 = <a class="code" href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a>(graph, <span class="stringliteral">&quot;Input1&quot;</span>);</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;    BOOST_TEST((inputLayer1-&gt;<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a>));</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a>(inputLayer1, 0));</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a>(inputLayer1, 1));</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    <a class="code" href="classarmnn_1_1_layer.html">armnn::Layer</a>* subLayer = <a class="code" href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a>(graph, <span class="stringliteral">&quot;Sub&quot;</span>);</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;    BOOST_TEST((subLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a6eb8b8b560161603402c0238b3a7d8b0">armnn::LayerType::Subtraction</a>));</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a>(subLayer, 2));</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a>(subLayer, 1));</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;    <a class="code" href="classarmnn_1_1_layer.html">armnn::Layer</a>* addLayer = <a class="code" href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a>(graph, <span class="stringliteral">&quot;Output&quot;</span>);</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;    BOOST_TEST((addLayer-&gt;<a class="code" href="classarmnn_1_1_layer.html#aaef29472862381822654ab6cbf7cba2a">GetType</a>() == <a class="code" href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::LayerType::Addition</a>));</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a>(addLayer, 2));</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a>(addLayer, 1));</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> tensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a>({1, 1, 2, 2}), <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(inputLayer0, subLayer, 0, 0, tensorInfo));</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(inputLayer1, subLayer, 0, 1, tensorInfo));</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(inputLayer0, addLayer, 0, 0, tensorInfo));</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(subLayer, addLayer, 0, 1, tensorInfo));</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp;&amp; outputLayer : graph.GetOutputLayers())</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;        BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(addLayer, const_cast&lt;armnn::OutputLayer*&gt;(outputLayer), 0, 0, tensorInfo));</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    }</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;}</div><div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a7c5531bbefed0945814f874baf9e0e0f">armnn::LayerType::Addition</a></div></div>
243 <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>
244 <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>
245 <div class="ttc" id="_graph_utils_8cpp_html_a4c04337db4d5f380219a005657a8223b"><div class="ttname"><a href="_graph_utils_8cpp.html#a4c04337db4d5f380219a005657a8223b">CheckNumberOfInputSlot</a></div><div class="ttdeci">bool CheckNumberOfInputSlot(armnn::Layer *layer, unsigned int num)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00032">GraphUtils.cpp:32</a></div></div>
246 <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div>
247 <div class="ttc" id="_graph_utils_8cpp_html_afd518dba3d52728670459e4ad3bed5e1"><div class="ttname"><a href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a></div><div class="ttdeci">bool IsConnected(armnn::Layer *srcLayer, armnn::Layer *destLayer, unsigned int srcSlot, unsigned int destSlot, const armnn::TensorInfo &amp;expectedTensorInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00042">GraphUtils.cpp:42</a></div></div>
248 <div class="ttc" id="namespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div>
249 <div class="ttc" id="classarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div>
250 <div class="ttc" id="_graph_utils_8cpp_html_a5f17e02e0054dac0a691685a0464ed36"><div class="ttname"><a href="_graph_utils_8cpp.html#a5f17e02e0054dac0a691685a0464ed36">GetFirstLayerWithName</a></div><div class="ttdeci">armnn::Layer * GetFirstLayerWithName(armnn::Graph &amp;graph, const std::string &amp;name)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00020">GraphUtils.cpp:20</a></div></div>
251 <div class="ttc" id="_graph_utils_8cpp_html_aada2e27f100807f5786eecb03390ba58"><div class="ttname"><a href="_graph_utils_8cpp.html#aada2e27f100807f5786eecb03390ba58">CheckNumberOfOutputSlot</a></div><div class="ttdeci">bool CheckNumberOfOutputSlot(armnn::Layer *layer, unsigned int num)</div><div class="ttdef"><b>Definition:</b> <a href="_graph_utils_8cpp_source.html#l00037">GraphUtils.cpp:37</a></div></div>
252 <div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4a6eb8b8b560161603402c0238b3a7d8b0"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a6eb8b8b560161603402c0238b3a7d8b0">armnn::LayerType::Subtraction</a></div></div>
253 <div class="ttc" id="namespacearmnn_html_a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5"><div class="ttname"><a href="namespacearmnn.html#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a></div></div>
254 </div><!-- fragment -->
255 </div>
256 </div>
257 </div><!-- contents -->
258 </div><!-- doc-content -->
259 <!-- start footer part -->
260 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
261   <ul>
262     <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_50aba35e23cba3c8856f8642cc06d5dc.html">armnnTfParser</a></li><li class="navelem"><a class="el" href="dir_4ccaefd65a1feacebd3c00536508ef51.html">test</a></li><li class="navelem"><a class="el" href="_assert_8cpp.html">Assert.cpp</a></li>
263     <li class="footer">Generated on Fri Mar 13 2020 16:06:59 for ArmNN by
264     <a href="http://www.doxygen.org/index.html">
265     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
266   </ul>
267 </div>
268 </body>
269 </html>