Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 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 |  <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 "<a class="el" href="_i_tf_parser_8hpp_source.html">armnnTfParser/ITfParser.hpp</a>"</code><br /> |
| 90 | <code>#include "<a class="el" href="_parser_prototxt_fixture_8hpp_source.html">ParserPrototxtFixture.hpp</a>"</code><br /> |
| 91 | <code>#include "<a class="el" href="_graph_utils_8hpp_source.html">test/GraphUtils.hpp</a>"</code><br /> |
| 92 | <code>#include <boost/test/unit_test.hpp></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"> </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"> </td></tr> |
| 100 | <tr class="memitem:ac27dc1cabf754208dae88e0879dd6515"><td class="memItemLeft" align="right" valign="top"> </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"> </td></tr> |
| 102 | <tr class="memitem:a79cb077a071f8d5232e2e902d562becd"><td class="memItemLeft" align="right" valign="top"> </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"> </td></tr> |
| 104 | <tr class="memitem:a1645128a338ac44257fe852d11ea968b"><td class="memItemLeft" align="right" valign="top"> </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"> </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">◆ </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 </td> |
| 118 | <td class="paramname">, </td> |
| 119 | </tr> |
| 120 | <tr> |
| 121 | <td class="paramkey"></td> |
| 122 | <td></td> |
| 123 | <td class="paramtype">AssertSimpleFixture </td> |
| 124 | <td class="paramname"> </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< TParser >::SetupSingleInputSingleOutput()</a>.</p> |
| 137 | <div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  SetupSingleInputSingleOutput({ 1, 1, 1, 4 }, <span class="stringliteral">"Placeholder"</span>, <span class="stringliteral">"Add"</span>);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  RunTest<4>({ 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> }</div></div><!-- fragment --> |
| 138 | </div> |
| 139 | </div> |
| 140 | <a id="ac27dc1cabf754208dae88e0879dd6515"></a> |
| 141 | <h2 class="memtitle"><span class="permalink"><a href="#ac27dc1cabf754208dae88e0879dd6515">◆ </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 </td> |
| 150 | <td class="paramname">, </td> |
| 151 | </tr> |
| 152 | <tr> |
| 153 | <td class="paramkey"></td> |
| 154 | <td></td> |
| 155 | <td class="paramtype">AssertSimpleFixture </td> |
| 156 | <td class="paramname"> </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< TParser >::SetupOptimizedNetwork()</a>.</p> |
| 169 | <div class="fragment"><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keyword">auto</span> optimized = SetupOptimizedNetwork({ { <span class="stringliteral">"Placeholder"</span>, { 1, 1, 1, 4 } } }, { <span class="stringliteral">"Add"</span> });</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">auto</span> optimizedNetwork = boost::polymorphic_downcast<armnn::OptimizedNetwork*>(optimized.get());</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keyword">auto</span> graph = optimizedNetwork->GetGraph();</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  BOOST_TEST((graph.GetNumInputs() == 1));</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  BOOST_TEST((graph.GetNumOutputs() == 1));</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  BOOST_TEST((graph.GetNumLayers() == 3));</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <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">"Placeholder"</span>);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  BOOST_TEST((inputLayer-><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>  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>  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> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <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">"Add"</span>);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  BOOST_TEST((addLayer-><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>  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>  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> </div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <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>  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>  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> </div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& outputLayer : graph.GetOutputLayers())</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(addLayer, const_cast<armnn::OutputLayer*>(outputLayer), 0, 0, tensorInfo));</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  }</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> }</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 &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 &graph, const std::string &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">◆ </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 </td> |
| 193 | <td class="paramname">, </td> |
| 194 | </tr> |
| 195 | <tr> |
| 196 | <td class="paramkey"></td> |
| 197 | <td></td> |
| 198 | <td class="paramtype">AssertFixture </td> |
| 199 | <td class="paramname"> </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> {</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  Setup({ { <span class="stringliteral">"Input0"</span>, { 1, 1, 2, 2 } },</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  { <span class="stringliteral">"Input1"</span>, { 1, 1, 2, 2 } } },</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  { <span class="stringliteral">"Output"</span> });</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  RunTest<4>({ { <span class="stringliteral">"Input0"</span>, { 4.0f, 3.0f,</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  2.0f, 1.0f } },</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> </div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  { <span class="stringliteral">"Input1"</span>, { 1.0f, 2.0f,</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  3.0f, 4.0f } } },</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  { { <span class="stringliteral">"Output"</span>, { 7.0f, 4.0f,</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  1.0f, -2.0f } } });</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> }</div></div><!-- fragment --> |
| 211 | </div> |
| 212 | </div> |
| 213 | <a id="a1645128a338ac44257fe852d11ea968b"></a> |
| 214 | <h2 class="memtitle"><span class="permalink"><a href="#a1645128a338ac44257fe852d11ea968b">◆ </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 </td> |
| 223 | <td class="paramname">, </td> |
| 224 | </tr> |
| 225 | <tr> |
| 226 | <td class="paramkey"></td> |
| 227 | <td></td> |
| 228 | <td class="paramtype">AssertFixture </td> |
| 229 | <td class="paramname"> </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> {</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">auto</span> optimized = SetupOptimizedNetwork({ { <span class="stringliteral">"Input0"</span>, { 1, 1, 2, 2 } },</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  { <span class="stringliteral">"Input1"</span>, { 1, 1, 2, 2 } } },</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  { <span class="stringliteral">"Output"</span> });</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span> </div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keyword">auto</span> optimizedNetwork = boost::polymorphic_downcast<armnn::OptimizedNetwork*>(optimized.get());</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keyword">auto</span> graph = optimizedNetwork->GetGraph();</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> </div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  BOOST_TEST((graph.GetNumInputs() == 2));</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  BOOST_TEST((graph.GetNumOutputs() == 1));</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  BOOST_TEST((graph.GetNumLayers() == 5));</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> </div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <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">"Input0"</span>);</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  BOOST_TEST((inputLayer0-><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>  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>  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> </div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <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">"Input1"</span>);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  BOOST_TEST((inputLayer1-><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>  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>  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> </div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <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">"Sub"</span>);</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  BOOST_TEST((subLayer-><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>  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>  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> </div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <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">"Output"</span>);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  BOOST_TEST((addLayer-><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>  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>  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> </div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <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>  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>  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>  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>  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> </div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& outputLayer : graph.GetOutputLayers())</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  {</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  BOOST_TEST(<a class="code" href="_graph_utils_8cpp.html#afd518dba3d52728670459e4ad3bed5e1">IsConnected</a>(addLayer, const_cast<armnn::OutputLayer*>(outputLayer), 0, 0, tensorInfo));</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  }</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span> }</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 &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 &graph, const std::string &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> |