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/backends/reference/test/ArgMinMaxTests.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('_arg_min_max_tests_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">ArgMinMaxTests.cpp File Reference</div> </div> |
| 87 | </div><!--header--> |
| 88 | <div class="contents"> |
| 89 | <div class="textblock"><code>#include <<a class="el" href="_arg_min_max_8hpp_source.html">reference/workloads/ArgMinMax.hpp</a>></code><br /> |
| 90 | <code>#include <boost/test/unit_test.hpp></code><br /> |
| 91 | </div> |
| 92 | <p><a href="_arg_min_max_tests_8cpp_source.html">Go to the source code of this file.</a></p> |
| 93 | <table class="memberdecls"> |
| 94 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 95 | Functions</h2></td></tr> |
| 96 | <tr class="memitem:a297bb5f6dc944fa8d393bea2960402e1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_arg_min_max_tests_8cpp.html#a297bb5f6dc944fa8d393bea2960402e1">BOOST_AUTO_TEST_CASE</a> (ArgMinTest)</td></tr> |
| 97 | <tr class="separator:a297bb5f6dc944fa8d393bea2960402e1"><td class="memSeparator" colspan="2"> </td></tr> |
| 98 | <tr class="memitem:a7db2a23ad741c538033bf94b5c242802"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_arg_min_max_tests_8cpp.html#a7db2a23ad741c538033bf94b5c242802">BOOST_AUTO_TEST_CASE</a> (ArgMaxTest)</td></tr> |
| 99 | <tr class="separator:a7db2a23ad741c538033bf94b5c242802"><td class="memSeparator" colspan="2"> </td></tr> |
| 100 | </table> |
| 101 | <h2 class="groupheader">Function Documentation</h2> |
| 102 | <a id="a297bb5f6dc944fa8d393bea2960402e1"></a> |
| 103 | <h2 class="memtitle"><span class="permalink"><a href="#a297bb5f6dc944fa8d393bea2960402e1">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[1/2]</span></h2> |
| 104 | |
| 105 | <div class="memitem"> |
| 106 | <div class="memproto"> |
| 107 | <table class="memname"> |
| 108 | <tr> |
| 109 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 110 | <td>(</td> |
| 111 | <td class="paramtype">ArgMinTest </td> |
| 112 | <td class="paramname"></td><td>)</td> |
| 113 | <td></td> |
| 114 | </tr> |
| 115 | </table> |
| 116 | </div><div class="memdoc"> |
| 117 | |
| 118 | <p class="definition">Definition at line <a class="el" href="_arg_min_max_tests_8cpp_source.html#l00012">12</a> of file <a class="el" href="_arg_min_max_tests_8cpp_source.html">ArgMinMaxTests.cpp</a>.</p> |
| 119 | |
| 120 | <p class="reference">References <a class="el" href="_arg_min_max_8cpp_source.html#l00015">armnn::ArgMinMax()</a>, <a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, and <a class="el" href="namespacearmnn.html#ae7e8cbf71db6a490789ca6dcaa8deeaea78d811e98514cd165dda532286610fd2">armnn::Min</a>.</p> |
| 121 | <div class="fragment"><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> {</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> inputInfo({ 1, 2, 3 } , <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> outputInfo({ 1, 3 }, <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>  std::vector<float> inputValues({ 1.0f, 5.0f, 3.0f, 4.0f, 2.0f, 6.0f});</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  std::vector<int32_t> outputValues(outputInfo.GetNumElements());</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  std::vector<int32_t> expectedValues({ 0, 1, 0 });</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <a class="code" href="namespacearmnn.html#a374120de442fe42c26536bb4f1e2a5a1">ArgMinMax</a>(*armnn::MakeDecoder<float>(inputInfo, inputValues.data()),</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  outputValues.data(),</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  inputInfo,</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  outputInfo,</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  <a class="code" href="namespacearmnn.html#ae7e8cbf71db6a490789ca6dcaa8deeaea78d811e98514cd165dda532286610fd2">armnn::ArgMinMaxFunction::Min</a>,</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  -2);</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  BOOST_CHECK_EQUAL_COLLECTIONS(outputValues.begin(),</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  outputValues.end(),</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  expectedValues.begin(),</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  expectedValues.end());</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> }</div><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> |
| 122 | <div class="ttc" id="namespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 123 | <div class="ttc" id="namespacearmnn_html_a374120de442fe42c26536bb4f1e2a5a1"><div class="ttname"><a href="namespacearmnn.html#a374120de442fe42c26536bb4f1e2a5a1">armnn::ArgMinMax</a></div><div class="ttdeci">void ArgMinMax(Decoder< float > &in, int32_t *out, const TensorInfo &inputTensorInfo, const TensorInfo &outputTensorInfo, ArgMinMaxFunction function, int axis)</div><div class="ttdef"><b>Definition:</b> <a href="_arg_min_max_8cpp_source.html#l00015">ArgMinMax.cpp:15</a></div></div> |
| 124 | <div class="ttc" id="namespacearmnn_html_ae7e8cbf71db6a490789ca6dcaa8deeaea78d811e98514cd165dda532286610fd2"><div class="ttname"><a href="namespacearmnn.html#ae7e8cbf71db6a490789ca6dcaa8deeaea78d811e98514cd165dda532286610fd2">armnn::ArgMinMaxFunction::Min</a></div></div> |
| 125 | </div><!-- fragment --> |
| 126 | </div> |
| 127 | </div> |
| 128 | <a id="a7db2a23ad741c538033bf94b5c242802"></a> |
| 129 | <h2 class="memtitle"><span class="permalink"><a href="#a7db2a23ad741c538033bf94b5c242802">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[2/2]</span></h2> |
| 130 | |
| 131 | <div class="memitem"> |
| 132 | <div class="memproto"> |
| 133 | <table class="memname"> |
| 134 | <tr> |
| 135 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 136 | <td>(</td> |
| 137 | <td class="paramtype">ArgMaxTest </td> |
| 138 | <td class="paramname"></td><td>)</td> |
| 139 | <td></td> |
| 140 | </tr> |
| 141 | </table> |
| 142 | </div><div class="memdoc"> |
| 143 | |
| 144 | <p class="definition">Definition at line <a class="el" href="_arg_min_max_tests_8cpp_source.html#l00035">35</a> of file <a class="el" href="_arg_min_max_tests_8cpp_source.html">ArgMinMaxTests.cpp</a>.</p> |
| 145 | |
| 146 | <p class="reference">References <a class="el" href="_arg_min_max_8cpp_source.html#l00015">armnn::ArgMinMax()</a>, <a class="el" href="_profiler_tests_8cpp.html#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>, <a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, and <a class="el" href="namespacearmnn.html#ae7e8cbf71db6a490789ca6dcaa8deeaea6a061313d22e51e0f25b7cd4dc065233">armnn::Max</a>.</p> |
| 147 | <div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> inputInfo({ 1, 2, 3 } , <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a> outputInfo({ 1, 3 }, <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  std::vector<float> inputValues({ 1.0f, 5.0f, 3.0f, 4.0f, 2.0f, 6.0f });</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  std::vector<int32_t> outputValues(outputInfo.GetNumElements());</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  std::vector<int32_t> expectedValues({ 1, 0, 1 });</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="namespacearmnn.html#a374120de442fe42c26536bb4f1e2a5a1">ArgMinMax</a>(*armnn::MakeDecoder<float>(inputInfo, inputValues.data()),</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  outputValues.data(),</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  inputInfo,</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  outputInfo,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="namespacearmnn.html#ae7e8cbf71db6a490789ca6dcaa8deeaea6a061313d22e51e0f25b7cd4dc065233">armnn::ArgMinMaxFunction::Max</a>,</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  -2);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  BOOST_CHECK_EQUAL_COLLECTIONS(outputValues.begin(),</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  outputValues.end(),</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  expectedValues.begin(),</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  expectedValues.end());</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> }</div><div class="ttc" id="namespacearmnn_html_ae7e8cbf71db6a490789ca6dcaa8deeaea6a061313d22e51e0f25b7cd4dc065233"><div class="ttname"><a href="namespacearmnn.html#ae7e8cbf71db6a490789ca6dcaa8deeaea6a061313d22e51e0f25b7cd4dc065233">armnn::ArgMinMaxFunction::Max</a></div></div> |
| 148 | <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> |
| 149 | <div class="ttc" id="namespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 150 | <div class="ttc" id="namespacearmnn_html_a374120de442fe42c26536bb4f1e2a5a1"><div class="ttname"><a href="namespacearmnn.html#a374120de442fe42c26536bb4f1e2a5a1">armnn::ArgMinMax</a></div><div class="ttdeci">void ArgMinMax(Decoder< float > &in, int32_t *out, const TensorInfo &inputTensorInfo, const TensorInfo &outputTensorInfo, ArgMinMaxFunction function, int axis)</div><div class="ttdef"><b>Definition:</b> <a href="_arg_min_max_8cpp_source.html#l00015">ArgMinMax.cpp:15</a></div></div> |
| 151 | </div><!-- fragment --> |
| 152 | </div> |
| 153 | </div> |
| 154 | </div><!-- contents --> |
| 155 | </div><!-- doc-content --> |
| 156 | <!-- start footer part --> |
| 157 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 158 | <ul> |
| 159 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_0f3cdec46afbc61a1ded8e1687c9c9a0.html">backends</a></li><li class="navelem"><a class="el" href="dir_efae4012d0e357ebeaba7d02491d70e5.html">reference</a></li><li class="navelem"><a class="el" href="dir_820f114a135ae891c13c0cafd2ecf138.html">test</a></li><li class="navelem"><a class="el" href="_arg_min_max_tests_8cpp.html">ArgMinMaxTests.cpp</a></li> |
| 160 | <li class="footer">Generated on Fri Mar 13 2020 16:07:01 for ArmNN by |
| 161 | <a href="http://www.doxygen.org/index.html"> |
| 162 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 163 | </ul> |
| 164 | </div> |
| 165 | </body> |
| 166 | </html> |