Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame^] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: src/armnn/test/UtilsTests.cpp File Reference</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('_utils_tests_8cpp.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="summary"> |
| 98 | <a href="#func-members">Functions</a> </div> |
| 99 | <div class="headertitle"> |
| 100 | <div class="title">UtilsTests.cpp File Reference</div> </div> |
| 101 | </div><!--header--> |
| 102 | <div class="contents"> |
| 103 | <div class="textblock"><code>#include <boost/test/unit_test.hpp></code><br /> |
| 104 | <code>#include <<a class="el" href="_utils_8hpp_source.xhtml">armnn/Utils.hpp</a>></code><br /> |
| 105 | <code>#include <<a class="el" href="_types_8hpp_source.xhtml">armnn/Types.hpp</a>></code><br /> |
| 106 | <code>#include <<a class="el" href="_types_utils_8hpp_source.xhtml">armnn/TypesUtils.hpp</a>></code><br /> |
| 107 | <code>#include <<a class="el" href="_descriptors_8hpp_source.xhtml">armnn/Descriptors.hpp</a>></code><br /> |
| 108 | <code>#include <<a class="el" href="_graph_topological_sort_8hpp_source.xhtml">GraphTopologicalSort.hpp</a>></code><br /> |
| 109 | <code>#include <<a class="el" href="_graph_8hpp_source.xhtml">Graph.hpp</a>></code><br /> |
| 110 | <code>#include <<a class="el" href="_resolve_type_8hpp_source.xhtml">ResolveType.hpp</a>></code><br /> |
| 111 | </div> |
| 112 | <p><a href="_utils_tests_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 113 | <table class="memberdecls"> |
| 114 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 115 | Functions</h2></td></tr> |
| 116 | <tr class="memitem:a3318a36fdb980622f80f76c95740018e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a3318a36fdb980622f80f76c95740018e">BOOST_AUTO_TEST_CASE</a> (DataTypeSize)</td></tr> |
| 117 | <tr class="separator:a3318a36fdb980622f80f76c95740018e"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:ac5b40dacd8c5c14e92816a14cef9df3c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#ac5b40dacd8c5c14e92816a14cef9df3c">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithTooManyMappings)</td></tr> |
| 119 | <tr class="separator:ac5b40dacd8c5c14e92816a14cef9df3c"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:a4177a0297cc117d1a0e9a5df023b911b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a4177a0297cc117d1a0e9a5df023b911b">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithInvalidMappings1d)</td></tr> |
| 121 | <tr class="separator:a4177a0297cc117d1a0e9a5df023b911b"><td class="memSeparator" colspan="2"> </td></tr> |
| 122 | <tr class="memitem:a97af3b0f5dd1bce84bee01f9508c42eb"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a97af3b0f5dd1bce84bee01f9508c42eb">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithInvalidMappings2d)</td></tr> |
| 123 | <tr class="separator:a97af3b0f5dd1bce84bee01f9508c42eb"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:aab6bce9938905a82526bb7a33b89e91f"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#aab6bce9938905a82526bb7a33b89e91f">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithInvalidMappings3d)</td></tr> |
| 125 | <tr class="separator:aab6bce9938905a82526bb7a33b89e91f"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <tr class="memitem:a4c9f4af80112cd2651e31259b6d04157"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a4c9f4af80112cd2651e31259b6d04157">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithInvalidMappings4d)</td></tr> |
| 127 | <tr class="separator:a4c9f4af80112cd2651e31259b6d04157"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:a0814ade1be7f4cf228342249e1cbe71b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a0814ade1be7f4cf228342249e1cbe71b">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithInvalidMappings5d)</td></tr> |
| 129 | <tr class="separator:a0814ade1be7f4cf228342249e1cbe71b"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <tr class="memitem:abe41ea63168a5418b26c9f7fff0b27ce"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#abe41ea63168a5418b26c9f7fff0b27ce">BOOST_AUTO_TEST_CASE</a> (PermuteDescriptorWithDuplicatedMappings)</td></tr> |
| 131 | <tr class="separator:abe41ea63168a5418b26c9f7fff0b27ce"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | <tr class="memitem:a51f0d67c2d9f5ca83782f23ef88f1b37"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a51f0d67c2d9f5ca83782f23ef88f1b37">BOOST_AUTO_TEST_CASE</a> (HalfType)</td></tr> |
| 133 | <tr class="separator:a51f0d67c2d9f5ca83782f23ef88f1b37"><td class="memSeparator" colspan="2"> </td></tr> |
| 134 | <tr class="memitem:afc5e3f247107aada6cd4bfbc0d3d31d5"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#afc5e3f247107aada6cd4bfbc0d3d31d5">BOOST_AUTO_TEST_CASE</a> (BFloatType)</td></tr> |
| 135 | <tr class="separator:afc5e3f247107aada6cd4bfbc0d3d31d5"><td class="memSeparator" colspan="2"> </td></tr> |
| 136 | <tr class="memitem:a8b7ed18ec6dc4024e2d25e7624f96d59"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a8b7ed18ec6dc4024e2d25e7624f96d59">BOOST_AUTO_TEST_CASE</a> (Float32ToBFloat16Test)</td></tr> |
| 137 | <tr class="separator:a8b7ed18ec6dc4024e2d25e7624f96d59"><td class="memSeparator" colspan="2"> </td></tr> |
| 138 | <tr class="memitem:af648055c5cc8f1005ea5c585eda9ca4b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#af648055c5cc8f1005ea5c585eda9ca4b">BOOST_AUTO_TEST_CASE</a> (BFloat16ToFloat32Test)</td></tr> |
| 139 | <tr class="separator:af648055c5cc8f1005ea5c585eda9ca4b"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <tr class="memitem:ac1e7309c6fe82de2dad673bd952eafcf"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#ac1e7309c6fe82de2dad673bd952eafcf">BOOST_AUTO_TEST_CASE</a> (GraphTopologicalSortSimpleTest)</td></tr> |
| 141 | <tr class="separator:ac1e7309c6fe82de2dad673bd952eafcf"><td class="memSeparator" colspan="2"> </td></tr> |
| 142 | <tr class="memitem:a1fe602be9a83fee8fb54eca4ca3ba4aa"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a1fe602be9a83fee8fb54eca4ca3ba4aa">BOOST_AUTO_TEST_CASE</a> (GraphTopologicalSortVariantTest)</td></tr> |
| 143 | <tr class="separator:a1fe602be9a83fee8fb54eca4ca3ba4aa"><td class="memSeparator" colspan="2"> </td></tr> |
| 144 | <tr class="memitem:a94028e60dc9c94d940323cdb441e319c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="_utils_tests_8cpp.xhtml#a94028e60dc9c94d940323cdb441e319c">BOOST_AUTO_TEST_CASE</a> (CyclicalGraphTopologicalSortTest)</td></tr> |
| 145 | <tr class="separator:a94028e60dc9c94d940323cdb441e319c"><td class="memSeparator" colspan="2"> </td></tr> |
| 146 | </table> |
| 147 | <h2 class="groupheader">Function Documentation</h2> |
| 148 | <a id="a3318a36fdb980622f80f76c95740018e"></a> |
| 149 | <h2 class="memtitle"><span class="permalink"><a href="#a3318a36fdb980622f80f76c95740018e">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[1/15]</span></h2> |
| 150 | |
| 151 | <div class="memitem"> |
| 152 | <div class="memproto"> |
| 153 | <table class="memname"> |
| 154 | <tr> |
| 155 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 156 | <td>(</td> |
| 157 | <td class="paramtype">DataTypeSize </td> |
| 158 | <td class="paramname"></td><td>)</td> |
| 159 | <td></td> |
| 160 | </tr> |
| 161 | </table> |
| 162 | </div><div class="memdoc"> |
| 163 | |
| 164 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00018">18</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 165 | |
| 166 | <p class="reference">References <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a27226c864bac7454a8504f8edb15d95b">armnn::Boolean</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_types_utils_8hpp_source.xhtml#l00115">armnn::GetDataTypeSize()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::QAsymmU8</a>, and <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7">armnn::Signed32</a>.</p> |
| 167 | <div class="fragment"><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  BOOST_TEST(<a class="code" href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>) == 4);</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  BOOST_TEST(<a class="code" href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a>) == 1);</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  BOOST_TEST(<a class="code" href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7">armnn::DataType::Signed32</a>) == 4);</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  BOOST_TEST(<a class="code" href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a27226c864bac7454a8504f8edb15d95b">armnn::DataType::Boolean</a>) == 1);</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> }</div><div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a27226c864bac7454a8504f8edb15d95b"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a27226c864bac7454a8504f8edb15d95b">armnn::DataType::Boolean</a></div></div> |
| 168 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7">armnn::DataType::Signed32</a></div></div> |
| 169 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a></div></div> |
| 170 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 171 | <div class="ttc" id="namespacearmnn_xhtml_aa02b9e06fb20fa3c13da0427e6ee5ab2"><div class="ttname"><a href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a></div><div class="ttdeci">constexpr unsigned int GetDataTypeSize(DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_types_utils_8hpp_source.xhtml#l00115">TypesUtils.hpp:115</a></div></div> |
| 172 | </div><!-- fragment --> |
| 173 | </div> |
| 174 | </div> |
| 175 | <a id="ac5b40dacd8c5c14e92816a14cef9df3c"></a> |
| 176 | <h2 class="memtitle"><span class="permalink"><a href="#ac5b40dacd8c5c14e92816a14cef9df3c">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[2/15]</span></h2> |
| 177 | |
| 178 | <div class="memitem"> |
| 179 | <div class="memproto"> |
| 180 | <table class="memname"> |
| 181 | <tr> |
| 182 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 183 | <td>(</td> |
| 184 | <td class="paramtype">PermuteDescriptorWithTooManyMappings </td> |
| 185 | <td class="paramname"></td><td>)</td> |
| 186 | <td></td> |
| 187 | </tr> |
| 188 | </table> |
| 189 | </div><div class="memdoc"> |
| 190 | |
| 191 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00026">26</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 192 | <div class="fragment"><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_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 0u, 1u, 2u, 3u, 4u, 5u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 193 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 194 | </div><!-- fragment --> |
| 195 | </div> |
| 196 | </div> |
| 197 | <a id="a4177a0297cc117d1a0e9a5df023b911b"></a> |
| 198 | <h2 class="memtitle"><span class="permalink"><a href="#a4177a0297cc117d1a0e9a5df023b911b">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[3/15]</span></h2> |
| 199 | |
| 200 | <div class="memitem"> |
| 201 | <div class="memproto"> |
| 202 | <table class="memname"> |
| 203 | <tr> |
| 204 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 205 | <td>(</td> |
| 206 | <td class="paramtype">PermuteDescriptorWithInvalidMappings1d </td> |
| 207 | <td class="paramname"></td><td>)</td> |
| 208 | <td></td> |
| 209 | </tr> |
| 210 | </table> |
| 211 | </div><div class="memdoc"> |
| 212 | |
| 213 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00031">31</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 214 | <div class="fragment"><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>  BOOST_CHECK_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 1u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 215 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 216 | </div><!-- fragment --> |
| 217 | </div> |
| 218 | </div> |
| 219 | <a id="a97af3b0f5dd1bce84bee01f9508c42eb"></a> |
| 220 | <h2 class="memtitle"><span class="permalink"><a href="#a97af3b0f5dd1bce84bee01f9508c42eb">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[4/15]</span></h2> |
| 221 | |
| 222 | <div class="memitem"> |
| 223 | <div class="memproto"> |
| 224 | <table class="memname"> |
| 225 | <tr> |
| 226 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 227 | <td>(</td> |
| 228 | <td class="paramtype">PermuteDescriptorWithInvalidMappings2d </td> |
| 229 | <td class="paramname"></td><td>)</td> |
| 230 | <td></td> |
| 231 | </tr> |
| 232 | </table> |
| 233 | </div><div class="memdoc"> |
| 234 | |
| 235 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00036">36</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 236 | <div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> {</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  BOOST_CHECK_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 2u, 0u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 237 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 238 | </div><!-- fragment --> |
| 239 | </div> |
| 240 | </div> |
| 241 | <a id="aab6bce9938905a82526bb7a33b89e91f"></a> |
| 242 | <h2 class="memtitle"><span class="permalink"><a href="#aab6bce9938905a82526bb7a33b89e91f">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[5/15]</span></h2> |
| 243 | |
| 244 | <div class="memitem"> |
| 245 | <div class="memproto"> |
| 246 | <table class="memname"> |
| 247 | <tr> |
| 248 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 249 | <td>(</td> |
| 250 | <td class="paramtype">PermuteDescriptorWithInvalidMappings3d </td> |
| 251 | <td class="paramname"></td><td>)</td> |
| 252 | <td></td> |
| 253 | </tr> |
| 254 | </table> |
| 255 | </div><div class="memdoc"> |
| 256 | |
| 257 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00041">41</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 258 | <div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  BOOST_CHECK_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 0u, 3u, 1u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 259 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 260 | </div><!-- fragment --> |
| 261 | </div> |
| 262 | </div> |
| 263 | <a id="a4c9f4af80112cd2651e31259b6d04157"></a> |
| 264 | <h2 class="memtitle"><span class="permalink"><a href="#a4c9f4af80112cd2651e31259b6d04157">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[6/15]</span></h2> |
| 265 | |
| 266 | <div class="memitem"> |
| 267 | <div class="memproto"> |
| 268 | <table class="memname"> |
| 269 | <tr> |
| 270 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 271 | <td>(</td> |
| 272 | <td class="paramtype">PermuteDescriptorWithInvalidMappings4d </td> |
| 273 | <td class="paramname"></td><td>)</td> |
| 274 | <td></td> |
| 275 | </tr> |
| 276 | </table> |
| 277 | </div><div class="memdoc"> |
| 278 | |
| 279 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00046">46</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 280 | <div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  BOOST_CHECK_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 0u, 1u, 2u, 4u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 281 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 282 | </div><!-- fragment --> |
| 283 | </div> |
| 284 | </div> |
| 285 | <a id="a0814ade1be7f4cf228342249e1cbe71b"></a> |
| 286 | <h2 class="memtitle"><span class="permalink"><a href="#a0814ade1be7f4cf228342249e1cbe71b">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[7/15]</span></h2> |
| 287 | |
| 288 | <div class="memitem"> |
| 289 | <div class="memproto"> |
| 290 | <table class="memname"> |
| 291 | <tr> |
| 292 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 293 | <td>(</td> |
| 294 | <td class="paramtype">PermuteDescriptorWithInvalidMappings5d </td> |
| 295 | <td class="paramname"></td><td>)</td> |
| 296 | <td></td> |
| 297 | </tr> |
| 298 | </table> |
| 299 | </div><div class="memdoc"> |
| 300 | |
| 301 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00051">51</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 302 | <div class="fragment"><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  BOOST_CHECK_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 0u, 1u, 2u, 3u, 5u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 303 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 304 | </div><!-- fragment --> |
| 305 | </div> |
| 306 | </div> |
| 307 | <a id="abe41ea63168a5418b26c9f7fff0b27ce"></a> |
| 308 | <h2 class="memtitle"><span class="permalink"><a href="#abe41ea63168a5418b26c9f7fff0b27ce">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[8/15]</span></h2> |
| 309 | |
| 310 | <div class="memitem"> |
| 311 | <div class="memproto"> |
| 312 | <table class="memname"> |
| 313 | <tr> |
| 314 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 315 | <td>(</td> |
| 316 | <td class="paramtype">PermuteDescriptorWithDuplicatedMappings </td> |
| 317 | <td class="paramname"></td><td>)</td> |
| 318 | <td></td> |
| 319 | </tr> |
| 320 | </table> |
| 321 | </div><div class="memdoc"> |
| 322 | |
| 323 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00056">56</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 324 | <div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  BOOST_CHECK_THROW(<a class="code" href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a>({ 1u, 1u, 0u }), <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a>);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 325 | <div class="ttc" id="structarmnn_1_1_permute_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_permute_descriptor.xhtml">armnn::PermuteDescriptor</a></div><div class="ttdoc">A PermuteDescriptor for the PermuteLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00102">Descriptors.hpp:102</a></div></div> |
| 326 | </div><!-- fragment --> |
| 327 | </div> |
| 328 | </div> |
| 329 | <a id="a51f0d67c2d9f5ca83782f23ef88f1b37"></a> |
| 330 | <h2 class="memtitle"><span class="permalink"><a href="#a51f0d67c2d9f5ca83782f23ef88f1b37">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[9/15]</span></h2> |
| 331 | |
| 332 | <div class="memitem"> |
| 333 | <div class="memproto"> |
| 334 | <table class="memname"> |
| 335 | <tr> |
| 336 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 337 | <td>(</td> |
| 338 | <td class="paramtype">HalfType </td> |
| 339 | <td class="paramname"></td><td>)</td> |
| 340 | <td></td> |
| 341 | </tr> |
| 342 | </table> |
| 343 | </div><div class="memdoc"> |
| 344 | |
| 345 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00061">61</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 346 | |
| 347 | <p class="reference">References <a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">armnn::Float16</a>, <a class="el" href="_types_utils_8hpp_source.xhtml#l00168">armnn::GetDataTypeName()</a>, and <a class="el" href="_types_utils_8hpp_source.xhtml#l00115">armnn::GetDataTypeSize()</a>.</p> |
| 348 | <div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">using namespace </span>half_float::literal;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="namespacearmnn.xhtml#a0f38fa92b2468d5378258a2b074c1a31">armnn::Half</a> a = 1.0_h;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordtype">float</span> b = 1.0f;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="namespacearmnn.xhtml#a0f38fa92b2468d5378258a2b074c1a31">armnn::Half</a> c(b);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="comment">// Test half type</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  BOOST_CHECK_EQUAL(a, b);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  BOOST_CHECK_EQUAL(<span class="keyword">sizeof</span>(c), 2);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="comment">// Test half type is floating point type</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(std::is_floating_point<armnn::Half>::value);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="comment">// Test utility function returns correct type.</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keyword">using</span> ResolvedType = <a class="code" href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType<armnn::DataType::Float16></a>;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  constexpr <span class="keywordtype">bool</span> isHalfType = std::is_same<armnn::Half, ResolvedType>::value;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(isHalfType);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">//Test utility functions return correct size</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(<a class="code" href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">GetDataTypeSize</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">armnn::DataType::Float16</a>) == 2);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="comment">//Test utility functions return correct name</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>((<a class="code" href="namespacearmnn.xhtml#a81b5ff8545adad19a1c9d4ca076d552c">GetDataTypeName</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">armnn::DataType::Float16</a>) == std::string(<span class="stringliteral">"Float16"</span>)));</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> }</div><div class="ttc" id="namespacearmnn_xhtml_a0743ed5e860c316a20b68ca96301b411"><div class="ttname"><a href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType</a></div><div class="ttdeci">typename ResolveTypeImpl< DT >::Type ResolveType</div><div class="ttdef"><b>Definition:</b> <a href="_resolve_type_8hpp_source.xhtml#l00073">ResolveType.hpp:73</a></div></div> |
| 349 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div> |
| 350 | <div class="ttc" id="namespacearmnn_xhtml_a81b5ff8545adad19a1c9d4ca076d552c"><div class="ttname"><a href="namespacearmnn.xhtml#a81b5ff8545adad19a1c9d4ca076d552c">armnn::GetDataTypeName</a></div><div class="ttdeci">constexpr const char * GetDataTypeName(DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_types_utils_8hpp_source.xhtml#l00168">TypesUtils.hpp:168</a></div></div> |
| 351 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">armnn::DataType::Float16</a></div></div> |
| 352 | <div class="ttc" id="namespacearmnn_xhtml_a0f38fa92b2468d5378258a2b074c1a31"><div class="ttname"><a href="namespacearmnn.xhtml#a0f38fa92b2468d5378258a2b074c1a31">armnn::Half</a></div><div class="ttdeci">half_float::half Half</div><div class="ttdef"><b>Definition:</b> <a href="_half_8hpp_source.xhtml#l00016">Half.hpp:16</a></div></div> |
| 353 | <div class="ttc" id="namespacearmnn_xhtml_aa02b9e06fb20fa3c13da0427e6ee5ab2"><div class="ttname"><a href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a></div><div class="ttdeci">constexpr unsigned int GetDataTypeSize(DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_types_utils_8hpp_source.xhtml#l00115">TypesUtils.hpp:115</a></div></div> |
| 354 | </div><!-- fragment --> |
| 355 | </div> |
| 356 | </div> |
| 357 | <a id="afc5e3f247107aada6cd4bfbc0d3d31d5"></a> |
| 358 | <h2 class="memtitle"><span class="permalink"><a href="#afc5e3f247107aada6cd4bfbc0d3d31d5">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[10/15]</span></h2> |
| 359 | |
| 360 | <div class="memitem"> |
| 361 | <div class="memproto"> |
| 362 | <table class="memname"> |
| 363 | <tr> |
| 364 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 365 | <td>(</td> |
| 366 | <td class="paramtype">BFloatType </td> |
| 367 | <td class="paramname"></td><td>)</td> |
| 368 | <td></td> |
| 369 | </tr> |
| 370 | </table> |
| 371 | </div><div class="memdoc"> |
| 372 | |
| 373 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00088">88</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 374 | |
| 375 | <p class="reference">References <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6acdb56b2d2f73c26480207524f2dbe0af">armnn::BFloat16</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="_types_utils_8hpp_source.xhtml#l00168">armnn::GetDataTypeName()</a>, <a class="el" href="_types_utils_8hpp_source.xhtml#l00115">armnn::GetDataTypeSize()</a>, <a class="el" href="_b_float16_8hpp_source.xhtml#l00111">BFloat16::Inf()</a>, <a class="el" href="_b_float16_8hpp_source.xhtml#l00105">BFloat16::Nan()</a>, and <a class="el" href="_b_float16_8hpp_source.xhtml#l00094">BFloat16::Val()</a>.</p> |
| 376 | <div class="fragment"><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  uint16_t v = 16256;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> a(v);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> b(1.0f);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> zero;</div><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>  <span class="comment">// Test BFloat16 type</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  BOOST_CHECK_EQUAL(<span class="keyword">sizeof</span>(a), 2);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  BOOST_CHECK_EQUAL(a, b);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  BOOST_CHECK_EQUAL(a.Val(), v);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  BOOST_CHECK_EQUAL(a, 1.0f);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  BOOST_CHECK_EQUAL(zero, 0.0f);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="comment">// Infinity</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordtype">float</span> infFloat = std::numeric_limits<float>::infinity();</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> infBF(infFloat);</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  BOOST_CHECK_EQUAL(infBF, <a class="code" href="classarmnn_1_1_b_float16.xhtml#ae5b250d59f169e00a39ad3ec787db22a">armnn::BFloat16::Inf</a>());</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="comment">// NaN</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keywordtype">float</span> nan = std::numeric_limits<float>::quiet_NaN();</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> nanBF(nan);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  BOOST_CHECK_EQUAL(nanBF, <a class="code" href="classarmnn_1_1_b_float16.xhtml#ae80b11dd8875fbf6e76cb054764ca6fb">armnn::BFloat16::Nan</a>());</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="comment">// Test utility function returns correct type.</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keyword">using</span> ResolvedType = <a class="code" href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType<armnn::DataType::BFloat16></a>;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  constexpr <span class="keywordtype">bool</span> isBFloat16Type = std::is_same<armnn::BFloat16, ResolvedType>::value;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(isBFloat16Type);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="comment">//Test utility functions return correct size</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(<a class="code" href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">GetDataTypeSize</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6acdb56b2d2f73c26480207524f2dbe0af">armnn::DataType::BFloat16</a>) == 2);</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>  <span class="comment">//Test utility functions return correct name</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>((<a class="code" href="namespacearmnn.xhtml#a81b5ff8545adad19a1c9d4ca076d552c">GetDataTypeName</a>(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6acdb56b2d2f73c26480207524f2dbe0af">armnn::DataType::BFloat16</a>) == std::string(<span class="stringliteral">"BFloat16"</span>)));</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> }</div><div class="ttc" id="classarmnn_1_1_b_float16_xhtml"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a></div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00014">BFloat16.hpp:14</a></div></div> |
| 377 | <div class="ttc" id="namespacearmnn_xhtml_a0743ed5e860c316a20b68ca96301b411"><div class="ttname"><a href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType</a></div><div class="ttdeci">typename ResolveTypeImpl< DT >::Type ResolveType</div><div class="ttdef"><b>Definition:</b> <a href="_resolve_type_8hpp_source.xhtml#l00073">ResolveType.hpp:73</a></div></div> |
| 378 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div> |
| 379 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_ae5b250d59f169e00a39ad3ec787db22a"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#ae5b250d59f169e00a39ad3ec787db22a">armnn::BFloat16::Inf</a></div><div class="ttdeci">static BFloat16 Inf()</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00111">BFloat16.hpp:111</a></div></div> |
| 380 | <div class="ttc" id="namespacearmnn_xhtml_a81b5ff8545adad19a1c9d4ca076d552c"><div class="ttname"><a href="namespacearmnn.xhtml#a81b5ff8545adad19a1c9d4ca076d552c">armnn::GetDataTypeName</a></div><div class="ttdeci">constexpr const char * GetDataTypeName(DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_types_utils_8hpp_source.xhtml#l00168">TypesUtils.hpp:168</a></div></div> |
| 381 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6acdb56b2d2f73c26480207524f2dbe0af"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6acdb56b2d2f73c26480207524f2dbe0af">armnn::DataType::BFloat16</a></div></div> |
| 382 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_ae80b11dd8875fbf6e76cb054764ca6fb"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#ae80b11dd8875fbf6e76cb054764ca6fb">armnn::BFloat16::Nan</a></div><div class="ttdeci">static BFloat16 Nan()</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00105">BFloat16.hpp:105</a></div></div> |
| 383 | <div class="ttc" id="namespacearmnn_xhtml_aa02b9e06fb20fa3c13da0427e6ee5ab2"><div class="ttname"><a href="namespacearmnn.xhtml#aa02b9e06fb20fa3c13da0427e6ee5ab2">armnn::GetDataTypeSize</a></div><div class="ttdeci">constexpr unsigned int GetDataTypeSize(DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_types_utils_8hpp_source.xhtml#l00115">TypesUtils.hpp:115</a></div></div> |
| 384 | </div><!-- fragment --> |
| 385 | </div> |
| 386 | </div> |
| 387 | <a id="a8b7ed18ec6dc4024e2d25e7624f96d59"></a> |
| 388 | <h2 class="memtitle"><span class="permalink"><a href="#a8b7ed18ec6dc4024e2d25e7624f96d59">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[11/15]</span></h2> |
| 389 | |
| 390 | <div class="memitem"> |
| 391 | <div class="memproto"> |
| 392 | <table class="memname"> |
| 393 | <tr> |
| 394 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 395 | <td>(</td> |
| 396 | <td class="paramtype">Float32ToBFloat16Test </td> |
| 397 | <td class="paramname"></td><td>)</td> |
| 398 | <td></td> |
| 399 | </tr> |
| 400 | </table> |
| 401 | </div><div class="memdoc"> |
| 402 | |
| 403 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00124">124</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 404 | |
| 405 | <p class="reference">References <a class="el" href="_b_float16_8hpp_source.xhtml#l00052">BFloat16::Float32ToBFloat16()</a>, <a class="el" href="_b_float16_8hpp_source.xhtml#l00111">BFloat16::Inf()</a>, and <a class="el" href="_b_float16_8hpp_source.xhtml#l00094">BFloat16::Val()</a>.</p> |
| 406 | <div class="fragment"><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>  <span class="comment">// LSB = 0, R = 0 -> round down</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> roundDown0 = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(1.704735E38f); <span class="comment">// 0x7F004000</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  BOOST_CHECK_EQUAL(roundDown0.<a class="code" href="classarmnn_1_1_b_float16.xhtml#afbd0d2d6540777e3898d125b79f6a5bc">Val</a>(), 0x7F00);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="comment">// LSB = 1, R = 0 -> round down</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> roundDown1 = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(9.18355E-41f); <span class="comment">// 0x00010000</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  BOOST_CHECK_EQUAL(roundDown1.Val(), 0x0001);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="comment">// LSB = 0, R = 1 all 0 -> round down</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> roundDown2 = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(1.14794E-40f); <span class="comment">// 0x00014000</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  BOOST_CHECK_EQUAL(roundDown2.Val(), 0x0001);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="comment">// LSB = 1, R = 1 -> round up</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> roundUp = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(-2.0234377f); <span class="comment">// 0xC0018001</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  BOOST_CHECK_EQUAL(roundUp.Val(), 0xC002);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// LSB = 0, R = 1 -> round up</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> roundUp1 = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(4.843037E-35f); <span class="comment">// 0x0680C000</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  BOOST_CHECK_EQUAL(roundUp1.Val(), 0x0681);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="comment">// Max positive value -> infinity</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> maxPositive = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(3.4028235E38f); <span class="comment">// 0x7F7FFFFF</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  BOOST_CHECK_EQUAL(maxPositive, <a class="code" href="classarmnn_1_1_b_float16.xhtml#ae5b250d59f169e00a39ad3ec787db22a">armnn::BFloat16::Inf</a>());</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="comment">// Max negative value -> -infinity</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> maxNeg = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(-3.4028235E38f); <span class="comment">// 0xFF7FFFFF</span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  BOOST_CHECK_EQUAL(maxNeg.<a class="code" href="classarmnn_1_1_b_float16.xhtml#afbd0d2d6540777e3898d125b79f6a5bc">Val</a>(), 0xFF80);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// Min positive value</span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> minPositive = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(1.1754942E-38f); <span class="comment">// 0x007FFFFF</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  BOOST_CHECK_EQUAL(minPositive.Val(), 0x0080);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="comment">// Min negative value</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> minNeg = <a class="code" href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a>(-1.1754942E-38f); <span class="comment">// 0x807FFFFF</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  BOOST_CHECK_EQUAL(minNeg.Val(), 0x8080);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> }</div><div class="ttc" id="classarmnn_1_1_b_float16_xhtml"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a></div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00014">BFloat16.hpp:14</a></div></div> |
| 407 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_ae5b250d59f169e00a39ad3ec787db22a"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#ae5b250d59f169e00a39ad3ec787db22a">armnn::BFloat16::Inf</a></div><div class="ttdeci">static BFloat16 Inf()</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00111">BFloat16.hpp:111</a></div></div> |
| 408 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_afbd0d2d6540777e3898d125b79f6a5bc"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#afbd0d2d6540777e3898d125b79f6a5bc">armnn::BFloat16::Val</a></div><div class="ttdeci">uint16_t Val() const</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00094">BFloat16.hpp:94</a></div></div> |
| 409 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_a3ff08d61c8f7403c9f790e2b96d91a9d"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#a3ff08d61c8f7403c9f790e2b96d91a9d">armnn::BFloat16::Float32ToBFloat16</a></div><div class="ttdeci">static BFloat16 Float32ToBFloat16(const float v)</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00052">BFloat16.hpp:52</a></div></div> |
| 410 | </div><!-- fragment --> |
| 411 | </div> |
| 412 | </div> |
| 413 | <a id="af648055c5cc8f1005ea5c585eda9ca4b"></a> |
| 414 | <h2 class="memtitle"><span class="permalink"><a href="#af648055c5cc8f1005ea5c585eda9ca4b">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[12/15]</span></h2> |
| 415 | |
| 416 | <div class="memitem"> |
| 417 | <div class="memproto"> |
| 418 | <table class="memname"> |
| 419 | <tr> |
| 420 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 421 | <td>(</td> |
| 422 | <td class="paramtype">BFloat16ToFloat32Test </td> |
| 423 | <td class="paramname"></td><td>)</td> |
| 424 | <td></td> |
| 425 | </tr> |
| 426 | </table> |
| 427 | </div><div class="memdoc"> |
| 428 | |
| 429 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00155">155</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 430 | |
| 431 | <p class="reference">References <a class="el" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK()</a>, <a class="el" href="_b_float16_8hpp_source.xhtml#l00111">BFloat16::Inf()</a>, <a class="el" href="_b_float16_8hpp_source.xhtml#l00105">BFloat16::Nan()</a>, and <a class="el" href="_b_float16_8hpp_source.xhtml#l00087">BFloat16::ToFloat32()</a>.</p> |
| 432 | <div class="fragment"><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> bf0(1.5f);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  BOOST_CHECK_EQUAL(bf0.ToFloat32(), 1.5f);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> bf1(-5.525308E-25f);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  BOOST_CHECK_EQUAL(bf1.ToFloat32(), -5.525308E-25f);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> bf2(-2.0625f);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  BOOST_CHECK_EQUAL(bf2.ToFloat32(), -2.0625f);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  uint16_t v = 32639;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a> bf3(v);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  BOOST_CHECK_EQUAL(bf3.ToFloat32(), 3.3895314E38f);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="comment">// Infinity</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  BOOST_CHECK_EQUAL(<a class="code" href="classarmnn_1_1_b_float16.xhtml#ae5b250d59f169e00a39ad3ec787db22a">armnn::BFloat16::Inf</a>().ToFloat32(), std::numeric_limits<float>::infinity());</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// NaN</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a>(std::isnan(<a class="code" href="classarmnn_1_1_b_float16.xhtml#ae80b11dd8875fbf6e76cb054764ca6fb">armnn::BFloat16::Nan</a>().ToFloat32()));</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> }</div><div class="ttc" id="classarmnn_1_1_b_float16_xhtml"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml">armnn::BFloat16</a></div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00014">BFloat16.hpp:14</a></div></div> |
| 433 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a0c262ba6f6c189a2d092d127c1b7627b"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a0c262ba6f6c189a2d092d127c1b7627b">BOOST_CHECK</a></div><div class="ttdeci">BOOST_CHECK(profilingService.GetCurrentState()==ProfilingState::WaitingForAck)</div></div> |
| 434 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_ae5b250d59f169e00a39ad3ec787db22a"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#ae5b250d59f169e00a39ad3ec787db22a">armnn::BFloat16::Inf</a></div><div class="ttdeci">static BFloat16 Inf()</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00111">BFloat16.hpp:111</a></div></div> |
| 435 | <div class="ttc" id="classarmnn_1_1_b_float16_xhtml_ae80b11dd8875fbf6e76cb054764ca6fb"><div class="ttname"><a href="classarmnn_1_1_b_float16.xhtml#ae80b11dd8875fbf6e76cb054764ca6fb">armnn::BFloat16::Nan</a></div><div class="ttdeci">static BFloat16 Nan()</div><div class="ttdef"><b>Definition:</b> <a href="_b_float16_8hpp_source.xhtml#l00105">BFloat16.hpp:105</a></div></div> |
| 436 | </div><!-- fragment --> |
| 437 | </div> |
| 438 | </div> |
| 439 | <a id="ac1e7309c6fe82de2dad673bd952eafcf"></a> |
| 440 | <h2 class="memtitle"><span class="permalink"><a href="#ac1e7309c6fe82de2dad673bd952eafcf">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[13/15]</span></h2> |
| 441 | |
| 442 | <div class="memitem"> |
| 443 | <div class="memproto"> |
| 444 | <table class="memname"> |
| 445 | <tr> |
| 446 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 447 | <td>(</td> |
| 448 | <td class="paramtype">GraphTopologicalSortSimpleTest </td> |
| 449 | <td class="paramname"></td><td>)</td> |
| 450 | <td></td> |
| 451 | </tr> |
| 452 | </table> |
| 453 | </div><div class="memdoc"> |
| 454 | |
| 455 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00172">172</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 456 | <div class="fragment"><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  std::map<int, std::vector<int>> graph;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  graph[0] = {2};</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  graph[1] = {3};</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  graph[2] = {4};</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  graph[3] = {4};</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  graph[4] = {5};</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  graph[5] = {};</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keyword">auto</span> getNodeInputs = [graph](<span class="keywordtype">int</span> node) -> std::vector<int></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  {</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">return</span> graph.find(node)->second;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  };</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  std::vector<int> targetNodes = {0, 1};</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span> </div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  std::vector<int> output;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordtype">bool</span> sortCompleted = armnnUtils::GraphTopologicalSort<int>(targetNodes, getNodeInputs, output);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  BOOST_TEST(sortCompleted);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  std::vector<int> correctResult = {5, 4, 2, 0, 3, 1};</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  BOOST_CHECK_EQUAL_COLLECTIONS(output.begin(), output.end(), correctResult.begin(), correctResult.end());</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div></div><!-- fragment --> |
| 457 | </div> |
| 458 | </div> |
| 459 | <a id="a1fe602be9a83fee8fb54eca4ca3ba4aa"></a> |
| 460 | <h2 class="memtitle"><span class="permalink"><a href="#a1fe602be9a83fee8fb54eca4ca3ba4aa">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[14/15]</span></h2> |
| 461 | |
| 462 | <div class="memitem"> |
| 463 | <div class="memproto"> |
| 464 | <table class="memname"> |
| 465 | <tr> |
| 466 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 467 | <td>(</td> |
| 468 | <td class="paramtype">GraphTopologicalSortVariantTest </td> |
| 469 | <td class="paramname"></td><td>)</td> |
| 470 | <td></td> |
| 471 | </tr> |
| 472 | </table> |
| 473 | </div><div class="memdoc"> |
| 474 | |
| 475 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00199">199</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 476 | <div class="fragment"><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  std::map<int, std::vector<int>> graph;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> </div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  graph[0] = {2};</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  graph[1] = {2};</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  graph[2] = {3, 4};</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  graph[3] = {5};</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  graph[4] = {5};</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  graph[5] = {6};</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  graph[6] = {};</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span> </div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keyword">auto</span> getNodeInputs = [graph](<span class="keywordtype">int</span> node) -> std::vector<int></div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  {</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">return</span> graph.find(node)->second;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  };</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  std::vector<int> targetNodes = {0, 1};</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span> </div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  std::vector<int> output;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordtype">bool</span> sortCompleted = armnnUtils::GraphTopologicalSort<int>(targetNodes, getNodeInputs, output);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span> </div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  BOOST_TEST(sortCompleted);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> </div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  std::vector<int> correctResult = {6, 5, 3, 4, 2, 0, 1};</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  BOOST_CHECK_EQUAL_COLLECTIONS(output.begin(), output.end(), correctResult.begin(), correctResult.end());</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> }</div></div><!-- fragment --> |
| 477 | </div> |
| 478 | </div> |
| 479 | <a id="a94028e60dc9c94d940323cdb441e319c"></a> |
| 480 | <h2 class="memtitle"><span class="permalink"><a href="#a94028e60dc9c94d940323cdb441e319c">◆ </a></span>BOOST_AUTO_TEST_CASE() <span class="overload">[15/15]</span></h2> |
| 481 | |
| 482 | <div class="memitem"> |
| 483 | <div class="memproto"> |
| 484 | <table class="memname"> |
| 485 | <tr> |
| 486 | <td class="memname">BOOST_AUTO_TEST_CASE </td> |
| 487 | <td>(</td> |
| 488 | <td class="paramtype">CyclicalGraphTopologicalSortTest </td> |
| 489 | <td class="paramname"></td><td>)</td> |
| 490 | <td></td> |
| 491 | </tr> |
| 492 | </table> |
| 493 | </div><div class="memdoc"> |
| 494 | |
| 495 | <p class="definition">Definition at line <a class="el" href="_utils_tests_8cpp_source.xhtml#l00227">227</a> of file <a class="el" href="_utils_tests_8cpp_source.xhtml">UtilsTests.cpp</a>.</p> |
| 496 | |
| 497 | <p class="reference">References <a class="el" href="_profiler_tests_8cpp.xhtml#af7f71af5c6c124222dd1c42c5df892f4">BOOST_AUTO_TEST_SUITE_END()</a>.</p> |
| 498 | <div class="fragment"><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> {</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  std::map<int, std::vector<int>> graph;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> </div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  graph[0] = {1};</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  graph[1] = {2};</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  graph[2] = {0};</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keyword">auto</span> getNodeInputs = [graph](<span class="keywordtype">int</span> node) -> std::vector<int></div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  {</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">return</span> graph.find(node)->second;</div><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> </div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  std::vector<int> targetNodes = {0};</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> </div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  std::vector<int> output;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordtype">bool</span> sortCompleted = armnnUtils::GraphTopologicalSort<int>(targetNodes, getNodeInputs, output);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span> </div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  BOOST_TEST(!sortCompleted);</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span> }</div></div><!-- fragment --> |
| 499 | </div> |
| 500 | </div> |
| 501 | </div><!-- contents --> |
| 502 | </div><!-- doc-content --> |
| 503 | <!-- start footer part --> |
| 504 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 505 | <ul> |
| 506 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_e0a84d05c80a2ef4231141dcbbeac5c8.xhtml">armnn</a></li><li class="navelem"><a class="el" href="dir_9d86fd1fbecbedf5bdb69c7e7235fe5f.xhtml">test</a></li><li class="navelem"><a class="el" href="_utils_tests_8cpp.xhtml">UtilsTests.cpp</a></li> |
| 507 | <li class="footer">Generated on Fri Mar 13 2020 16:09:14 for ArmNN by |
| 508 | <a href="http://www.doxygen.org/index.html"> |
| 509 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 510 | </ul> |
| 511 | </div> |
| 512 | </body> |
| 513 | </html> |