| <!-- HTML header for doxygen 1.8.9.1--> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.6"/> |
| <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| <title>Compute Library: tests/Utils.h Source File</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| $(window).load(resizeHeight); |
| </script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| </script> |
| <script type="text/x-mathjax-config"> |
| MathJax.Hub.Config({ |
| extensions: ["tex2jax.js"], |
| jax: ["input/TeX","output/HTML-CSS"], |
| }); |
| </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Compute Library |
|  <span id="projectnumber">17.10</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.6 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.xhtml"><span>Main Page</span></a></li> |
| <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
| <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| <li> |
| <div id="MSearchBox" class="MSearchBoxInactive"> |
| <span class="left"> |
| <img id="MSearchSelect" src="search/mag_sel.png" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| alt=""/> |
| <input type="text" id="MSearchField" value="Search" accesskey="S" |
| onfocus="searchBox.OnSearchFieldFocus(true)" |
| onblur="searchBox.OnSearchFieldFocus(false)" |
| onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| </span><span class="right"> |
| <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| </span> |
| </div> |
| </li> |
| </ul> |
| </div> |
| <div id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="files.xhtml"><span>File List</span></a></li> |
| <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| </ul> |
| </div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| $(document).ready(function(){initNavTree('tests_2_utils_8h_source.xhtml','');}); |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">Utils.h</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <a href="tests_2_utils_8h.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> |
| <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) 2017 ARM Limited.</span></div> |
| <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * SPDX-License-Identifier: MIT</span></div> |
| <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div> |
| <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * of this software and associated documentation files (the "Software"), to</span></div> |
| <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * deal in the Software without restriction, including without limitation the</span></div> |
| <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div> |
| <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div> |
| <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div> |
| <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div> |
| <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * copies or substantial portions of the Software.</span></div> |
| <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div> |
| <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div> |
| <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div> |
| <div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div> |
| <div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div> |
| <div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div> |
| <div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div> |
| <div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SOFTWARE.</span></div> |
| <div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> */</span></div> |
| <div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#ifndef __ARM_COMPUTE_TEST_UTILS_H__</span></div> |
| <div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor"></span><span class="preprocessor">#define __ARM_COMPUTE_TEST_UTILS_H__</span></div> |
| <div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="preprocessor"></span></div> |
| <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#include "<a class="code" href="_coordinates_8h.xhtml">arm_compute/core/Coordinates.h</a>"</span></div> |
| <div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="preprocessor">#include "<a class="code" href="_error_8h.xhtml">arm_compute/core/Error.h</a>"</span></div> |
| <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor">#include "<a class="code" href="arm__compute_2core_2_fixed_point_8h.xhtml">arm_compute/core/FixedPoint.h</a>"</span></div> |
| <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor">#include "<a class="code" href="_tensor_info_8h.xhtml">arm_compute/core/TensorInfo.h</a>"</span></div> |
| <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="preprocessor">#include "<a class="code" href="_tensor_shape_8h.xhtml">arm_compute/core/TensorShape.h</a>"</span></div> |
| <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include "<a class="code" href="arm__compute_2core_2_types_8h.xhtml">arm_compute/core/Types.h</a>"</span></div> |
| <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#include "<a class="code" href="_toolchain_support_8h.xhtml">support/ToolchainSupport.h</a>"</span></div> |
| <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div> |
| <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <cmath></span></div> |
| <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include <cstddef></span></div> |
| <div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <limits></span></div> |
| <div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <memory></span></div> |
| <div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <random></span></div> |
| <div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include <sstream></span></div> |
| <div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="preprocessor">#include <string></span></div> |
| <div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#include <type_traits></span></div> |
| <div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#include <vector></span></div> |
| <div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div> |
| <div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">namespace </span>arm_compute</div> |
| <div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div> |
| <div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">namespace </span>test</div> |
| <div class="line"><a name="l00048"></a><span class="lineno"> 48</span> {</div> |
| <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value</a>><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">::type</a>></div> |
| <div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#af4bcf30f8c56f547f66d61c7c5ae01db"> 56</a></span> <span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#af4bcf30f8c56f547f66d61c7c5ae01db">round_half_up</a>(T <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>)</div> |
| <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>  <span class="keywordflow">return</span> std::floor(value + 0.5f);</div> |
| <div class="line"><a name="l00059"></a><span class="lineno"> 59</span> }</div> |
| <div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div> |
| <div class="line"><a name="l00068"></a><span class="lineno"> 68</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">template <typename T, typename = typename std::enable_if<std::is_floating_point<T>::value</a>><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">::type</a>></div> |
| <div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ad93bb148a873f19ad7692756e59617f4"> 69</a></span> <span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#ad93bb148a873f19ad7692756e59617f4">round_half_even</a>(T <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>, T epsilon = std::numeric_limits<T>::epsilon())</div> |
| <div class="line"><a name="l00070"></a><span class="lineno"> 70</span> {</div> |
| <div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  T positive_value = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">std::abs</a>(value);</div> |
| <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  T ipart = 0;</div> |
| <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  std::modf(positive_value, &ipart);</div> |
| <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// If 'value' is exactly halfway between two integers</span></div> |
| <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">std::abs</a>(positive_value - (ipart + 0.5f)) < epsilon)</div> |
| <div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  {</div> |
| <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="comment">// If 'ipart' is even then return 'ipart'</span></div> |
| <div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">if</span>(std::fmod(ipart, 2.f) < epsilon)</div> |
| <div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {</div> |
| <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">support::cpp11::copysign</a>(ipart, value);</div> |
| <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  }</div> |
| <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="comment">// Else return the nearest even integer</span></div> |
| <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">support::cpp11::copysign</a>(std::ceil(ipart + 0.5f), value);</div> |
| <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  }</div> |
| <div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <span class="comment">// Otherwise use the usual round to closest</span></div> |
| <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">support::cpp11::copysign</a>(<a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ab71c35ca207b916a9f8b0336ab88484e">support::cpp11::round</a>(positive_value), value);</div> |
| <div class="line"><a name="l00087"></a><span class="lineno"> 87</span> }</div> |
| <div class="line"><a name="l00088"></a><span class="lineno"> 88</span> </div> |
| <div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml"> 89</a></span> <span class="keyword">namespace </span>traits</div> |
| <div class="line"><a name="l00090"></a><span class="lineno"> 90</span> {</div> |
| <div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="comment">// *INDENT-OFF*</span></div> |
| <div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="comment">// clang-format off</span></div> |
| <div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml"> 93</a></span> <span class="keyword">template</span> <<span class="keyword">typename</span> T> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a> { };</div> |
| <div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54"> 94</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><uint8_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54">type</a> = uint16_t; };</div> |
| <div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73"> 95</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><int8_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73">type</a> = int16_t; };</div> |
| <div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23"> 96</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><uint16_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23">type</a> = uint32_t; };</div> |
| <div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305"> 97</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><int16_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305">type</a> = int32_t; };</div> |
| <div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b"> 98</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><uint32_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b">type</a> = uint64_t; };</div> |
| <div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3"> 99</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><int32_t> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3">type</a> = int64_t; };</div> |
| <div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01float_01_4.xhtml#a05cacf975133703fccd67d8b60ed9ae0"> 100</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><float> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01float_01_4.xhtml#a05cacf975133703fccd67d8b60ed9ae0">type</a> = float; };</div> |
| <div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01half_01_4.xhtml#a871173f31fa2a65afb444d262bc1aadb"> 101</a></span> <span class="keyword">template</span> <> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a><<a class="code" href="namespacearm__compute.xhtml#a73e2825fd61d349c5ca2f5313e3c8ea1">half</a>> { <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01half_01_4.xhtml#a871173f31fa2a65afb444d262bc1aadb">type</a> = <a class="code" href="namespacearm__compute.xhtml#a73e2825fd61d349c5ca2f5313e3c8ea1">half</a>; };</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> </div> |
| <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div> |
| <div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233"> 105</a></span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233">promote_t</a> = <span class="keyword">typename</span> <a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote<T>::type</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="keyword">template</span> <<span class="keyword">typename</span> T></div> |
| <div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml#a381020121bcfd7b20c6bc4ecb807caa1"> 108</a></span> <span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#a381020121bcfd7b20c6bc4ecb807caa1">make_signed_conditional_t</a> = <span class="keyword">typename</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::conditional<std::is_integral<T>::value</a>, std::make_signed<T>, std::common_type<T>><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">::type</a>;</div> |
| <div class="line"><a name="l00109"></a><span class="lineno"> 109</span> <span class="comment">// clang-format on</span></div> |
| <div class="line"><a name="l00110"></a><span class="lineno"> 110</span> <span class="comment">// *INDENT-ON*</span></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> </div> |
| <div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf"> 119</a></span> <span class="keyword">inline</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> <a class="code" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">get_format_for_channel</a>(<a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel)</div> |
| <div class="line"><a name="l00120"></a><span class="lineno"> 120</span> {</div> |
| <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="keywordflow">switch</span>(channel)</div> |
| <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  {</div> |
| <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aae1e1d3d40573127e9ee0480caf1283d6">Channel::R</a>:</div> |
| <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aadfcf28d0734569a6a693bc8194de62bf">Channel::G</a>:</div> |
| <div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">Channel::B</a>:</div> |
| <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">Format::RGB888</a>;</div> |
| <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">default</span>:</div> |
| <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"Unsupported channel"</span>);</div> |
| <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div> |
| <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> }</div> |
| <div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div> |
| <div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac7dbe33793790fc37a5eda11ed6b0273"> 138</a></span> <span class="keyword">inline</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> <a class="code" href="namespacearm__compute_1_1test.xhtml#ac7dbe33793790fc37a5eda11ed6b0273">get_channel_format</a>(<a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">Channel</a> channel)</div> |
| <div class="line"><a name="l00139"></a><span class="lineno"> 139</span> {</div> |
| <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">switch</span>(channel)</div> |
| <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  {</div> |
| <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aae1e1d3d40573127e9ee0480caf1283d6">Channel::R</a>:</div> |
| <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aadfcf28d0734569a6a693bc8194de62bf">Channel::G</a>:</div> |
| <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">Channel::B</a>:</div> |
| <div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>;</div> |
| <div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">default</span>:</div> |
| <div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">"Unsupported channel"</span>);</div> |
| <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  }</div> |
| <div class="line"><a name="l00149"></a><span class="lineno"> 149</span> }</div> |
| <div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div> |
| <div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">template</span> <<span class="keyword">typename</span> F, <span class="keyword">typename</span> T></div> |
| <div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447"> 156</a></span> <span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(F &&, <span class="keyword">const</span> T &value)</div> |
| <div class="line"><a name="l00157"></a><span class="lineno"> 157</span> {</div> |
| <div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordflow">return</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>;</div> |
| <div class="line"><a name="l00159"></a><span class="lineno"> 159</span> }</div> |
| <div class="line"><a name="l00160"></a><span class="lineno"> 160</span> </div> |
| <div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="keyword">template</span> <<span class="keyword">typename</span> F, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U></div> |
| <div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ad933f996ccb22854ae56dd86de8cbbfe"> 166</a></span> <span class="keyword">inline</span> <span class="keyword">auto</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(F &&func, T &&value1, U &&value2) -> decltype(func(value1, value2))</div> |
| <div class="line"><a name="l00167"></a><span class="lineno"> 167</span> {</div> |
| <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="keywordflow">return</span> func(value1, value2);</div> |
| <div class="line"><a name="l00169"></a><span class="lineno"> 169</span> }</div> |
| <div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div> |
| <div class="line"><a name="l00178"></a><span class="lineno"> 178</span> <span class="keyword">template</span> <<span class="keyword">typename</span> F, <span class="keyword">typename</span> I, <span class="keyword">typename</span> T, <span class="keyword">typename</span>... Vs></div> |
| <div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a89322cccde5e0a27d3a41085d3fd366c"> 179</a></span> <span class="keyword">inline</span> I <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(F &&func, I &&initial, T &&value, Vs &&... values)</div> |
| <div class="line"><a name="l00180"></a><span class="lineno"> 180</span> {</div> |
| <div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(std::forward<F>(func), func(std::forward<I>(initial), std::forward<T>(value)), std::forward<Vs>(values)...);</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> </div> |
| <div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a4c9ad143c34306817986409ffb1dbd40"> 193</a></span> <span class="keyword">inline</span> <a class="code" href="structarm__compute_1_1_valid_region.xhtml">ValidRegion</a> <a class="code" href="namespacearm__compute_1_1test.xhtml#a4c9ad143c34306817986409ffb1dbd40">shape_to_valid_region</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a>, <span class="keywordtype">bool</span> border_undefined = <span class="keyword">false</span>, <a class="code" href="structarm__compute_1_1_border_size.xhtml">BorderSize</a> border_size = <a class="code" href="structarm__compute_1_1_border_size.xhtml">BorderSize</a>(0))</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>  <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> anchor;</div> |
| <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a810a78f0b7cc0270f38d4136e023ea3b">set_num_dimensions</a>(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>());</div> |
| <div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div> |
| <div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="keywordflow">if</span>(border_undefined)</div> |
| <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  {</div> |
| <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>() < 2);</div> |
| <div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div> |
| <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">set</a>(0, border_size.left);</div> |
| <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">set</a>(1, border_size.top);</div> |
| <div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div> |
| <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> valid_shape_x = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(0, static_cast<int>(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>()) - static_cast<int>(border_size.left) - <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(border_size.right));</div> |
| <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> valid_shape_y = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(0, static_cast<int>(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>()) - static_cast<int>(border_size.top) - <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(border_size.bottom));</div> |
| <div class="line"><a name="l00207"></a><span class="lineno"> 207</span> </div> |
| <div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a0cb0e1f5da2e1cc2e0ea5690450f53e8">set</a>(0, valid_shape_x);</div> |
| <div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a0cb0e1f5da2e1cc2e0ea5690450f53e8">set</a>(1, valid_shape_y);</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> </div> |
| <div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordflow">return</span> <a class="code" href="structarm__compute_1_1_valid_region.xhtml">ValidRegion</a>(std::move(anchor), std::move(shape));</div> |
| <div class="line"><a name="l00213"></a><span class="lineno"> 213</span> }</div> |
| <div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div> |
| <div class="line"><a name="l00223"></a><span class="lineno"> 223</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div> |
| <div class="line"><a name="l00224"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116"> 224</a></span> <span class="keywordtype">void</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">store_value_with_data_type</a>(<span class="keywordtype">void</span> *ptr, T value, <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>)</div> |
| <div class="line"><a name="l00225"></a><span class="lineno"> 225</span> {</div> |
| <div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">switch</span>(data_type)</div> |
| <div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  {</div> |
| <div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>:</div> |
| <div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  *<span class="keyword">reinterpret_cast<</span>uint8_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">DataType::S8</a>:</div> |
| <div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">DataType::QS8</a>:</div> |
| <div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  *<span class="keyword">reinterpret_cast<</span>int8_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">DataType::U16</a>:</div> |
| <div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  *<span class="keyword">reinterpret_cast<</span>uint16_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>:</div> |
| <div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">DataType::QS16</a>:</div> |
| <div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  *<span class="keyword">reinterpret_cast<</span>int16_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>:</div> |
| <div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  *<span class="keyword">reinterpret_cast<</span>uint32_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">DataType::S32</a>:</div> |
| <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  *<span class="keyword">reinterpret_cast<</span>int32_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">DataType::U64</a>:</div> |
| <div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  *<span class="keyword">reinterpret_cast<</span>uint64_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">DataType::S64</a>:</div> |
| <div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  *<span class="keyword">reinterpret_cast<</span>int64_t *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">DataType::F16</a>:</div> |
| <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  *<span class="keyword">reinterpret_cast<</span><a class="code" href="namespacearm__compute.xhtml#a73e2825fd61d349c5ca2f5313e3c8ea1">half</a> *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div> |
| <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  *<span class="keyword">reinterpret_cast<</span><span class="keywordtype">float</span> *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">DataType::F64</a>:</div> |
| <div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  *<span class="keyword">reinterpret_cast<</span><span class="keywordtype">double</span> *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">DataType::SIZET</a>:</div> |
| <div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  *<span class="keyword">reinterpret_cast<</span><span class="keywordtype">size_t</span> *<span class="keyword">></span>(ptr) = value;</div> |
| <div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">break</span>;</div> |
| <div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="keywordflow">default</span>:</div> |
| <div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">"NOT SUPPORTED!"</span>);</div> |
| <div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  }</div> |
| <div class="line"><a name="l00269"></a><span class="lineno"> 269</span> }</div> |
| <div class="line"><a name="l00270"></a><span class="lineno"> 270</span> </div> |
| <div class="line"><a name="l00277"></a><span class="lineno"> 277</span> <span class="keyword">template</span> <<span class="keyword">typename</span> U, <span class="keyword">typename</span> T></div> |
| <div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377"> 278</a></span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377">saturate_cast</a>(T val)</div> |
| <div class="line"><a name="l00279"></a><span class="lineno"> 279</span> {</div> |
| <div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">if</span>(val > static_cast<T>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<U>::max</a>()))</div> |
| <div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  {</div> |
| <div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  val = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits<U>::max</a>());</div> |
| <div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div> |
| <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keywordflow">if</span>(val < static_cast<T>(std::numeric_limits<U>::lowest()))</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>  val = <span class="keyword">static_cast<</span>T<span class="keyword">></span>(std::numeric_limits<U>::lowest());</div> |
| <div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  }</div> |
| <div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keywordflow">return</span> val;</div> |
| <div class="line"><a name="l00289"></a><span class="lineno"> 289</span> }</div> |
| <div class="line"><a name="l00290"></a><span class="lineno"> 290</span> </div> |
| <div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="keyword">template</span> <<span class="keyword">typename</span>... T></div> |
| <div class="line"><a name="l00294"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml"> 294</a></span> <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml">common_promoted_signed_type</a></div> |
| <div class="line"><a name="l00295"></a><span class="lineno"> 295</span> {</div> |
| <div class="line"><a name="l00296"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a5dc4a681965ff1118a0491b07867c032"> 296</a></span>  <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a5dc4a681965ff1118a0491b07867c032">common_type</a> = <span class="keyword">typename</span> std::common_type<T...><a class="code" href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">::type</a>;</div> |
| <div class="line"><a name="l00297"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#aeab553c4422f2a498954db0b4eb15789"> 297</a></span>  <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#aeab553c4422f2a498954db0b4eb15789">promoted_type</a> = <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233">traits::promote_t<common_type></a>;</div> |
| <div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a6d8309776a9cb10567df1735666919ff"> 298</a></span>  <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a6d8309776a9cb10567df1735666919ff">intermediate_type</a> = <span class="keyword">typename</span> <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#a381020121bcfd7b20c6bc4ecb807caa1">traits::make_signed_conditional_t<promoted_type>::type</a>;</div> |
| <div class="line"><a name="l00299"></a><span class="lineno"> 299</span> };</div> |
| <div class="line"><a name="l00300"></a><span class="lineno"> 300</span> </div> |
| <div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09"> 308</a></span> <span class="keyword">inline</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> <a class="code" href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09">index2coord</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &shape, <span class="keywordtype">int</span> index)</div> |
| <div class="line"><a name="l00309"></a><span class="lineno"> 309</span> {</div> |
| <div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keywordtype">int</span> num_elements = shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a4eaec01ba2c12093db609d1034ad0bc1">total_size</a>();</div> |
| <div class="line"><a name="l00311"></a><span class="lineno"> 311</span> </div> |
| <div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(index < 0 || index >= num_elements, <span class="stringliteral">"Index has to be in [0, num_elements]"</span>);</div> |
| <div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(num_elements == 0, <span class="stringliteral">"Cannot create coordinate from empty shape"</span>);</div> |
| <div class="line"><a name="l00314"></a><span class="lineno"> 314</span> </div> |
| <div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> coord{ 0 };</div> |
| <div class="line"><a name="l00316"></a><span class="lineno"> 316</span> </div> |
| <div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">for</span>(<span class="keywordtype">int</span> d = shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>() - 1; d >= 0; --d)</div> |
| <div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  {</div> |
| <div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  num_elements /= shape[d];</div> |
| <div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  coord.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a0cb0e1f5da2e1cc2e0ea5690450f53e8">set</a>(d, index / num_elements);</div> |
| <div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  index %= num_elements;</div> |
| <div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  }</div> |
| <div class="line"><a name="l00323"></a><span class="lineno"> 323</span> </div> |
| <div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="keywordflow">return</span> coord;</div> |
| <div class="line"><a name="l00325"></a><span class="lineno"> 325</span> }</div> |
| <div class="line"><a name="l00326"></a><span class="lineno"> 326</span> </div> |
| <div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a9be4cb7e6ee20063a4a10bc3abb750b9"> 337</a></span> <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a9be4cb7e6ee20063a4a10bc3abb750b9">coord2index</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &shape, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &coord)</div> |
| <div class="line"><a name="l00338"></a><span class="lineno"> 338</span> {</div> |
| <div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a4eaec01ba2c12093db609d1034ad0bc1">total_size</a>() == 0, <span class="stringliteral">"Cannot get index from empty shape"</span>);</div> |
| <div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(coord.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>() == 0, <span class="stringliteral">"Cannot get index of empty coordinate"</span>);</div> |
| <div class="line"><a name="l00341"></a><span class="lineno"> 341</span> </div> |
| <div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <span class="keywordtype">int</span> index = 0;</div> |
| <div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordtype">int</span> dim_size = 1;</div> |
| <div class="line"><a name="l00344"></a><span class="lineno"> 344</span> </div> |
| <div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < coord.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>(); ++i)</div> |
| <div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  {</div> |
| <div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  index += coord[i] * dim_size;</div> |
| <div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  dim_size *= shape[i];</div> |
| <div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  }</div> |
| <div class="line"><a name="l00350"></a><span class="lineno"> 350</span> </div> |
| <div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  <span class="keywordflow">return</span> index;</div> |
| <div class="line"><a name="l00352"></a><span class="lineno"> 352</span> }</div> |
| <div class="line"><a name="l00353"></a><span class="lineno"> 353</span> </div> |
| <div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a856b55fc20ddcbdbeb84c35ae27bedac"> 355</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a856b55fc20ddcbdbeb84c35ae27bedac">is_in_valid_region</a>(<span class="keyword">const</span> <a class="code" href="structarm__compute_1_1_valid_region.xhtml">ValidRegion</a> &valid_region, <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> coord)</div> |
| <div class="line"><a name="l00356"></a><span class="lineno"> 356</span> {</div> |
| <div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> d = 0; d < <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a>; ++d)</div> |
| <div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  {</div> |
| <div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordflow">if</span>(coord[d] < valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#aec54a7ff1ca347fdda25821cfb8fd0ed">start</a>(d) || coord[d] >= valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#adc8388028db66f138de6b1aca27ad620">end</a>(d))</div> |
| <div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  {</div> |
| <div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</div> |
| <div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  }</div> |
| <div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  }</div> |
| <div class="line"><a name="l00364"></a><span class="lineno"> 364</span> </div> |
| <div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="keywordflow">return</span> <span class="keyword">true</span>;</div> |
| <div class="line"><a name="l00366"></a><span class="lineno"> 366</span> }</div> |
| <div class="line"><a name="l00367"></a><span class="lineno"> 367</span> </div> |
| <div class="line"><a name="l00377"></a><span class="lineno"> 377</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T></div> |
| <div class="line"><a name="l00378"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a2ce249581879425cc66db8d364c838f3"> 378</a></span> <span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a2ce249581879425cc66db8d364c838f3">create_tensor</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &shape, <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>, <span class="keywordtype">int</span> num_channels = 1, <span class="keywordtype">int</span> fixed_point_position = 0)</div> |
| <div class="line"><a name="l00379"></a><span class="lineno"> 379</span> {</div> |
| <div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  T tensor;</div> |
| <div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  tensor.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(shape, num_channels, data_type, fixed_point_position));</div> |
| <div class="line"><a name="l00382"></a><span class="lineno"> 382</span> </div> |
| <div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <span class="keywordflow">return</span> tensor;</div> |
| <div class="line"><a name="l00384"></a><span class="lineno"> 384</span> }</div> |
| <div class="line"><a name="l00385"></a><span class="lineno"> 385</span> </div> |
| <div class="line"><a name="l00395"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac7324cc960068b65c558b7d25dfe2914"> 395</a></span> <span class="keyword">inline</span> std::vector<ROI> <a class="code" href="namespacearm__compute_1_1test.xhtml#ac7324cc960068b65c558b7d25dfe2914">generate_random_rois</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &shape, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml">ROIPoolingLayerInfo</a> &pool_info, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_rois, std::random_device::result_type seed)</div> |
| <div class="line"><a name="l00396"></a><span class="lineno"> 396</span> {</div> |
| <div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>((pool_info.<a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#ae889c3657ba9390ac5ecd268e8a19720">pooled_width</a>() < 4) || (pool_info.<a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#a5ef65c82efd18c18e7f23585364e3fa9">pooled_height</a>() < 4));</div> |
| <div class="line"><a name="l00398"></a><span class="lineno"> 398</span> </div> |
| <div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  std::vector<ROI> rois;</div> |
| <div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  std::mt19937 gen(seed);</div> |
| <div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> pool_width = pool_info.<a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#ae889c3657ba9390ac5ecd268e8a19720">pooled_width</a>();</div> |
| <div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> pool_height = pool_info.<a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#a5ef65c82efd18c18e7f23585364e3fa9">pooled_height</a>();</div> |
| <div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> roi_scale = pool_info.<a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#a13a5239b80c3170a975b369f288cbd91">spatial_scale</a>();</div> |
| <div class="line"><a name="l00404"></a><span class="lineno"> 404</span> </div> |
| <div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="comment">// Calculate distribution bounds</span></div> |
| <div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  <span class="keyword">const</span> <span class="keyword">auto</span> scaled_width = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>((shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>() / roi_scale) / pool_width);</div> |
| <div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  <span class="keyword">const</span> <span class="keyword">auto</span> scaled_height = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>((shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>() / roi_scale) / pool_height);</div> |
| <div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keyword">const</span> <span class="keyword">auto</span> min_width = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(pool_width / roi_scale);</div> |
| <div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keyword">const</span> <span class="keyword">auto</span> min_height = <span class="keyword">static_cast<</span><span class="keywordtype">int</span><span class="keyword">></span>(pool_height / roi_scale);</div> |
| <div class="line"><a name="l00410"></a><span class="lineno"> 410</span> </div> |
| <div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <span class="comment">// Create distributions</span></div> |
| <div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  std::uniform_int_distribution<int> dist_batch(0, shape[3] - 1);</div> |
| <div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  std::uniform_int_distribution<int> dist_x(0, scaled_width);</div> |
| <div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  std::uniform_int_distribution<int> dist_y(0, scaled_height);</div> |
| <div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  std::uniform_int_distribution<int> dist_w(min_width, <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(min_width, (pool_width - 2) * scaled_width));</div> |
| <div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  std::uniform_int_distribution<int> dist_h(min_height, <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(min_height, (pool_height - 2) * scaled_height));</div> |
| <div class="line"><a name="l00417"></a><span class="lineno"> 417</span> </div> |
| <div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> r = 0; r < num_rois; ++r)</div> |
| <div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  {</div> |
| <div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  <a class="code" href="structarm__compute_1_1_r_o_i.xhtml">ROI</a> roi;</div> |
| <div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  roi.<a class="code" href="structarm__compute_1_1_r_o_i.xhtml#a2df12a0d285598144f82ecd911af30e9">batch_idx</a> = dist_batch(gen);</div> |
| <div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  roi.<a class="code" href="structarm__compute_1_1_r_o_i.xhtml#aa23d9b69995e7138751a71caf1d46429">rect</a>.<a class="code" href="structarm__compute_1_1_rectangle.xhtml#a4dde988b1b2adba65ae3efa69f65d960">x</a> = dist_x(gen);</div> |
| <div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  roi.<a class="code" href="structarm__compute_1_1_r_o_i.xhtml#aa23d9b69995e7138751a71caf1d46429">rect</a>.<a class="code" href="structarm__compute_1_1_rectangle.xhtml#ab0580f504a7428539be299fa71565f30">y</a> = dist_y(gen);</div> |
| <div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  roi.<a class="code" href="structarm__compute_1_1_r_o_i.xhtml#aa23d9b69995e7138751a71caf1d46429">rect</a>.<a class="code" href="structarm__compute_1_1_rectangle.xhtml#ad0eab1042455a2067c812ab8071d5376">width</a> = dist_w(gen);</div> |
| <div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  roi.<a class="code" href="structarm__compute_1_1_r_o_i.xhtml#aa23d9b69995e7138751a71caf1d46429">rect</a>.<a class="code" href="structarm__compute_1_1_rectangle.xhtml#a81c9f8d0b8c3b49d770be14dbe9f0d37">height</a> = dist_h(gen);</div> |
| <div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  rois.push_back(roi);</div> |
| <div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  }</div> |
| <div class="line"><a name="l00428"></a><span class="lineno"> 428</span> </div> |
| <div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keywordflow">return</span> rois;</div> |
| <div class="line"><a name="l00430"></a><span class="lineno"> 430</span> }</div> |
| <div class="line"><a name="l00431"></a><span class="lineno"> 431</span> </div> |
| <div class="line"><a name="l00432"></a><span class="lineno"> 432</span> <span class="keyword">template</span> <<span class="keyword">typename</span> T, <span class="keyword">typename</span> ArrayAccessor_T></div> |
| <div class="line"><a name="l00433"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac35e7a1ad467f5fe8620cbbc5793d53b"> 433</a></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#ac35e7a1ad467f5fe8620cbbc5793d53b">fill_array</a>(ArrayAccessor_T &&array, <span class="keyword">const</span> std::vector<T> &v)</div> |
| <div class="line"><a name="l00434"></a><span class="lineno"> 434</span> {</div> |
| <div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  array.resize(v.size());</div> |
| <div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  std::memcpy(array.buffer(), v.data(), v.size() * <span class="keyword">sizeof</span>(T));</div> |
| <div class="line"><a name="l00437"></a><span class="lineno"> 437</span> }</div> |
| <div class="line"><a name="l00438"></a><span class="lineno"> 438</span> </div> |
| <div class="line"><a name="l00445"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ae47155d6186155ec4da9295764b3c05a"> 445</a></span> <span class="keyword">inline</span> std::string <a class="code" href="namespacearm__compute_1_1test.xhtml#ae47155d6186155ec4da9295764b3c05a">get_typestring</a>(<a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">data_type</a>)</div> |
| <div class="line"><a name="l00446"></a><span class="lineno"> 446</span> {</div> |
| <div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="comment">// Check endianness</span></div> |
| <div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 1;</div> |
| <div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> *c = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">char</span> *<span class="keyword">></span>(&i);</div> |
| <div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  std::string endianness;</div> |
| <div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="keywordflow">if</span>(*c == 1)</div> |
| <div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  {</div> |
| <div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  endianness = std::string(<span class="stringliteral">"<"</span>);</div> |
| <div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  }</div> |
| <div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <span class="keywordflow">else</span></div> |
| <div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  {</div> |
| <div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  endianness = std::string(<span class="stringliteral">">"</span>);</div> |
| <div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  }</div> |
| <div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="keyword">const</span> std::string no_endianness(<span class="stringliteral">"|"</span>);</div> |
| <div class="line"><a name="l00460"></a><span class="lineno"> 460</span> </div> |
| <div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keywordflow">switch</span>(data_type)</div> |
| <div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  {</div> |
| <div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>:</div> |
| <div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="keywordflow">return</span> no_endianness + <span class="stringliteral">"u"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(uint8_t));</div> |
| <div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">DataType::S8</a>:</div> |
| <div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <span class="keywordflow">return</span> no_endianness + <span class="stringliteral">"i"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(int8_t));</div> |
| <div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">DataType::U16</a>:</div> |
| <div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"u"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(uint16_t));</div> |
| <div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>:</div> |
| <div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"i"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(int16_t));</div> |
| <div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>:</div> |
| <div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"u"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(uint32_t));</div> |
| <div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">DataType::S32</a>:</div> |
| <div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"i"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(int32_t));</div> |
| <div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">DataType::U64</a>:</div> |
| <div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"u"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(uint64_t));</div> |
| <div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">DataType::S64</a>:</div> |
| <div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"i"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(int64_t));</div> |
| <div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div> |
| <div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"f"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">float</span>));</div> |
| <div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">DataType::F64</a>:</div> |
| <div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"f"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">double</span>));</div> |
| <div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">DataType::SIZET</a>:</div> |
| <div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <span class="keywordflow">return</span> endianness + <span class="stringliteral">"u"</span> + <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">support::cpp11::to_string</a>(<span class="keyword">sizeof</span>(<span class="keywordtype">size_t</span>));</div> |
| <div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="keywordflow">default</span>:</div> |
| <div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">"NOT SUPPORTED!"</span>);</div> |
| <div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  }</div> |
| <div class="line"><a name="l00488"></a><span class="lineno"> 488</span> }</div> |
| <div class="line"><a name="l00489"></a><span class="lineno"> 489</span> } <span class="comment">// namespace test</span></div> |
| <div class="line"><a name="l00490"></a><span class="lineno"> 490</span> } <span class="comment">// namespace arm_compute</span></div> |
| <div class="line"><a name="l00491"></a><span class="lineno"> 491</span> <span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_TEST_UTILS_H__ */</span><span class="preprocessor"></span></div> |
| <div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00031">Error.h:31</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">arm_compute::DataType::QS16</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a45cde9abb508c62d67c3bb2b9bf566a5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">arm_compute::test::validation::shape</a></div><div class="ttdeci">shape</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_min_max_location_8cpp_source.xhtml#l00089">MinMaxLocation.cpp:89</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01int8__t_01_4_xhtml_a8812bf779dca54354aa6ad00cef14a73"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73">arm_compute::test::traits::promote< int8_t >::type</a></div><div class="ttdeci">int16_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00095">Utils.h:95</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml">arm_compute::TensorShape</a></div><div class="ttdoc">Shape of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00038">TensorShape.h:38</a></div></div> |
| <div class="ttc" id="_toolchain_support_8h_xhtml"><div class="ttname"><a href="_toolchain_support_8h.xhtml">ToolchainSupport.h</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4c9ad143c34306817986409ffb1dbd40"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4c9ad143c34306817986409ffb1dbd40">arm_compute::test::shape_to_valid_region</a></div><div class="ttdeci">ValidRegion shape_to_valid_region(TensorShape shape, bool border_undefined=false, BorderSize border_size=BorderSize(0))</div><div class="ttdoc">Create a valid region based on tensor shape, border mode and border size. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00193">Utils.h:193</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::DataType::QS8</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a1ebbb23b0094d47c51226d58e17e6447"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">arm_compute::test::foldl</a></div><div class="ttdeci">T foldl(F &&, const T &value)</div><div class="ttdoc">Base case of foldl. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00156">Utils.h:156</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01int16__t_01_4_xhtml_a4f14ffc6d6f6ca92afb1baf996fc9305"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305">arm_compute::test::traits::promote< int16_t >::type</a></div><div class="ttdeci">int32_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00097">Utils.h:97</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_border_size_xhtml"><div class="ttname"><a href="structarm__compute_1_1_border_size.xhtml">arm_compute::BorderSize</a></div><div class="ttdoc">Container for 2D border size. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00136">Types.h:136</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_aa337ab76176f3c4193642ac6de3a61cf"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf">arm_compute::test::get_format_for_channel</a></div><div class="ttdeci">Format get_format_for_channel(Channel channel)</div><div class="ttdoc">Look up the format corresponding to a channel. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00119">Utils.h:119</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a28096f8372c0ad762864c790917375e2"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a28096f8372c0ad762864c790917375e2">arm_compute::support::cpp11::copysign</a></div><div class="ttdeci">T copysign(T x, T y)</div><div class="ttdoc">Composes a floating point value with the magnitude of x and the sign of y. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00259">ToolchainSupport.h:259</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">arm_compute::Channel::B</a></div><div class="ttdoc">Blue channel. </div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">arm_compute::Format::U8</a></div><div class="ttdoc">Unknown image format. </div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1traits_xhtml_ac20ca549fa27b2eed44367745055a233"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233">arm_compute::test::traits::promote_t</a></div><div class="ttdeci">typename promote< T >::type promote_t</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00105">Utils.h:105</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_r_o_i_xhtml_aa23d9b69995e7138751a71caf1d46429"><div class="ttname"><a href="structarm__compute_1_1_r_o_i.xhtml#aa23d9b69995e7138751a71caf1d46429">arm_compute::ROI::rect</a></div><div class="ttdeci">Rectangle rect</div><div class="ttdoc">Rectangle specifying the region of interest. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00311">Types.h:311</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_r_o_i_pooling_layer_info_xhtml_a13a5239b80c3170a975b369f288cbd91"><div class="ttname"><a href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#a13a5239b80c3170a975b369f288cbd91">arm_compute::ROIPoolingLayerInfo::spatial_scale</a></div><div class="ttdeci">float spatial_scale() const </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00499">Types.h:499</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_acc5dddee1cbe93a4eaf0a9f74ee96bb7"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#acc5dddee1cbe93a4eaf0a9f74ee96bb7">arm_compute::support::cpp11::to_string</a></div><div class="ttdeci">std::string to_string(T &&value)</div><div class="ttdoc">Convert integer and float values to string. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00168">ToolchainSupport.h:168</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_r_o_i_pooling_layer_info_xhtml_ae889c3657ba9390ac5ecd268e8a19720"><div class="ttname"><a href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#ae889c3657ba9390ac5ecd268e8a19720">arm_compute::ROIPoolingLayerInfo::pooled_width</a></div><div class="ttdeci">unsigned int pooled_width() const </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00491">Types.h:491</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a73e2825fd61d349c5ca2f5313e3c8ea1"><div class="ttname"><a href="namespacearm__compute.xhtml#a73e2825fd61d349c5ca2f5313e3c8ea1">arm_compute::half</a></div><div class="ttdeci">half_float::half half</div><div class="ttdoc">16-bit floating point type </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00039">Types.h:39</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F16 per channel </div></div> |
| <div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00124">Error.h:124</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">arm_compute::Format::U16</a></div><div class="ttdoc">1 channel, 1 S16 per channel </div></div> |
| <div class="ttc" id="_tensor_info_8h_xhtml"><div class="ttname"><a href="_tensor_info_8h.xhtml">TensorInfo.h</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a982730e6f0da5f9490f59bc5f6bb3f27"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">arm_compute::Dimensions::set</a></div><div class="ttdeci">void set(size_t dimension, T value)</div><div class="ttdoc">Accessor to set the value of one of the dimensions. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00074">Dimensions.h:74</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aae1e1d3d40573127e9ee0480caf1283d6"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aae1e1d3d40573127e9ee0480caf1283d6">arm_compute::Channel::R</a></div><div class="ttdoc">Red channel. </div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_ac7324cc960068b65c558b7d25dfe2914"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ac7324cc960068b65c558b7d25dfe2914">arm_compute::test::generate_random_rois</a></div><div class="ttdeci">std::vector< ROI > generate_random_rois(const TensorShape &shape, const ROIPoolingLayerInfo &pool_info, unsigned int num_rois, std::random_device::result_type seed)</div><div class="ttdoc">Create a vector of random ROIs. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00395">Utils.h:395</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_valid_region_xhtml_adc8388028db66f138de6b1aca27ad620"><div class="ttname"><a href="structarm__compute_1_1_valid_region.xhtml#adc8388028db66f138de6b1aca27ad620">arm_compute::ValidRegion::end</a></div><div class="ttdeci">int end(unsigned int d) const </div><div class="ttdoc">Return the end of the valid region for the given dimension d. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00118">Types.h:118</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a9be4cb7e6ee20063a4a10bc3abb750b9"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a9be4cb7e6ee20063a4a10bc3abb750b9">arm_compute::test::coord2index</a></div><div class="ttdeci">int coord2index(const TensorShape &shape, const Coordinates &coord)</div><div class="ttdoc">Linearise the given coordinate. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00337">Utils.h:337</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">arm_compute::Format::F16</a></div><div class="ttdoc">1 channel, 1 U32 per channel </div></div> |
| <div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_afb5cd37bb08f1029691590372e6330f0"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">arm_compute::Dimensions::x</a></div><div class="ttdeci">T x() const </div><div class="ttdoc">Alias to access the size of the first dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00081">Dimensions.h:81</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">arm_compute::Format::S32</a></div><div class="ttdoc">1 channel, 1 U16 per channel </div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_ad93bb148a873f19ad7692756e59617f4"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ad93bb148a873f19ad7692756e59617f4">arm_compute::test::round_half_even</a></div><div class="ttdeci">T round_half_even(T value, T epsilon=std::numeric_limits< T >::epsilon())</div><div class="ttdoc">Round floating-point value with half value rounding to nearest even. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00069">Utils.h:69</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1traits_xhtml_a381020121bcfd7b20c6bc4ecb807caa1"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1traits.xhtml#a381020121bcfd7b20c6bc4ecb807caa1">arm_compute::test::traits::make_signed_conditional_t</a></div><div class="ttdeci">typename std::conditional< std::is_integral< T >::value, std::make_signed< T >, std::common_type< T >>::type make_signed_conditional_t</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00108">Utils.h:108</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_r_o_i_xhtml"><div class="ttname"><a href="structarm__compute_1_1_r_o_i.xhtml">arm_compute::ROI</a></div><div class="ttdoc">Region of interest. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00309">Types.h:309</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">arm_compute::DataType::S64</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">arm_compute::Format::RGB888</a></div><div class="ttdoc">2 channel, 1 U8 per channel </div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ac2ad7f431e3446fddcd9b6b9f93c4c14"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ac2ad7f431e3446fddcd9b6b9f93c4c14">arm_compute::test::validation::data_type</a></div><div class="ttdeci">data_type</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_min_max_location_8cpp_source.xhtml#l00090">MinMaxLocation.cpp:90</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_valid_region_xhtml_aec54a7ff1ca347fdda25821cfb8fd0ed"><div class="ttname"><a href="structarm__compute_1_1_valid_region.xhtml#aec54a7ff1ca347fdda25821cfb8fd0ed">arm_compute::ValidRegion::start</a></div><div class="ttdeci">int start(unsigned int d) const </div><div class="ttdoc">Return the start of the valid region for the given dimension d. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00112">Types.h:112</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_ac7dbe33793790fc37a5eda11ed6b0273"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ac7dbe33793790fc37a5eda11ed6b0273">arm_compute::test::get_channel_format</a></div><div class="ttdeci">Format get_channel_format(Channel channel)</div><div class="ttdoc">Return the format of a channel. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00138">Utils.h:138</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a1e6934e95738573214c2ce1d6648d116"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116">arm_compute::test::store_value_with_data_type</a></div><div class="ttdeci">void store_value_with_data_type(void *ptr, T value, DataType data_type)</div><div class="ttdoc">Write the value after casting the pointer according to data_type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00224">Utils.h:224</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">arm_compute::DataType::SIZET</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a856b55fc20ddcbdbeb84c35ae27bedac"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a856b55fc20ddcbdbeb84c35ae27bedac">arm_compute::test::is_in_valid_region</a></div><div class="ttdeci">bool is_in_valid_region(const ValidRegion &valid_region, Coordinates coord)</div><div class="ttdoc">Check if a coordinate is within a valid region. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00355">Utils.h:355</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint32__t_01_4_xhtml_a9659bbcc7fc016eda242219021c7980b"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b">arm_compute::test::traits::promote< uint32_t >::type</a></div><div class="ttdeci">uint64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00098">Utils.h:98</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">arm_compute::Format::U32</a></div><div class="ttdoc">1 channel, 1 S32 per channel </div></div> |
| <div class="ttc" id="arm__compute_2core_2_fixed_point_8h_xhtml"><div class="ttname"><a href="arm__compute_2core_2_fixed_point_8h.xhtml">FixedPoint.h</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455a"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455a">arm_compute::Channel</a></div><div class="ttdeci">Channel</div><div class="ttdoc">Available channels. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00316">Types.h:316</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">arm_compute::Format</a></div><div class="ttdeci">Format</div><div class="ttdoc">Image colour formats. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00042">Types.h:42</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__signed__type_xhtml"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml">arm_compute::test::common_promoted_signed_type</a></div><div class="ttdoc">Find the signed promoted common type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00294">Utils.h:294</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_coordinates_xhtml"><div class="ttname"><a href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a></div><div class="ttdoc">Coordinates of an item. </div><div class="ttdef"><b>Definition:</b> <a href="_coordinates_8h_source.xhtml#l00037">Coordinates.h:37</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_r_o_i_xhtml_a2df12a0d285598144f82ecd911af30e9"><div class="ttname"><a href="structarm__compute_1_1_r_o_i.xhtml#a2df12a0d285598144f82ecd911af30e9">arm_compute::ROI::batch_idx</a></div><div class="ttdeci">uint16_t batch_idx</div><div class="ttdoc">The batch index of the region of interest. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00312">Types.h:312</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_ac35e7a1ad467f5fe8620cbbc5793d53b"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ac35e7a1ad467f5fe8620cbbc5793d53b">arm_compute::test::fill_array</a></div><div class="ttdeci">void fill_array(ArrayAccessor_T &&array, const std::vector< T > &v)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00433">Utils.h:433</a></div></div> |
| <div class="ttc" id="_error_8h_xhtml"><div class="ttname"><a href="_error_8h.xhtml">Error.h</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a24d8c0391cfa38e78969b6ad97c0ff09"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09">arm_compute::test::index2coord</a></div><div class="ttdeci">Coordinates index2coord(const TensorShape &shape, int index)</div><div class="ttdoc">Convert a linear index into n-dimensional coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00308">Utils.h:308</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml_a0cb0e1f5da2e1cc2e0ea5690450f53e8"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml#a0cb0e1f5da2e1cc2e0ea5690450f53e8">arm_compute::TensorShape::set</a></div><div class="ttdeci">void set(size_t dimension, size_t value)</div><div class="ttdoc">Accessor to set the value of one of the dimensions. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00074">TensorShape.h:74</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">arm_compute::Format::S16</a></div><div class="ttdoc">1 channel, 1 U8 per channel </div></div> |
| <div class="ttc" id="classarm__compute_1_1_r_o_i_pooling_layer_info_xhtml_a5ef65c82efd18c18e7f23585364e3fa9"><div class="ttname"><a href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#a5ef65c82efd18c18e7f23585364e3fa9">arm_compute::ROIPoolingLayerInfo::pooled_height</a></div><div class="ttdeci">unsigned int pooled_height() const </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00495">Types.h:495</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_ae47155d6186155ec4da9295764b3c05a"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ae47155d6186155ec4da9295764b3c05a">arm_compute::test::get_typestring</a></div><div class="ttdeci">std::string get_typestring(DataType data_type)</div><div class="ttdoc">Obtain numpy type string from DataType. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00445">Utils.h:445</a></div></div> |
| <div class="ttc" id="hwc_8hpp_xhtml_a0f61d63b009d0880a89c843bd50d8d76"><div class="ttname"><a href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a></div><div class="ttdeci">void * value</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00269">hwc.hpp:269</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01half_01_4_xhtml_a871173f31fa2a65afb444d262bc1aadb"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01half_01_4.xhtml#a871173f31fa2a65afb444d262bc1aadb">arm_compute::test::traits::promote< half >::type</a></div><div class="ttdeci">half type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00101">Utils.h:101</a></div></div> |
| <div class="ttc" id="namespacemali__userspace_xhtml_ad44b615021ed3ccb734fcaf583ef4a03"><div class="ttname"><a href="namespacemali__userspace.xhtml#ad44b615021ed3ccb734fcaf583ef4a03">mali_userspace::type</a></div><div class="ttdeci">uint32_t type</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00204">hwc.hpp:204</a></div></div> |
| <div class="ttc" id="_coordinates_8h_xhtml"><div class="ttname"><a href="_coordinates_8h.xhtml">Coordinates.h</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a691c9cb93365c2e33f3429de43244098"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">arm_compute::Dimensions::y</a></div><div class="ttdeci">T y() const </div><div class="ttdoc">Alias to access the size of the second dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00086">Dimensions.h:86</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01int32__t_01_4_xhtml_a70ca3d636283d6713220cd8af5fc07b3"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3">arm_compute::test::traits::promote< int32_t >::type</a></div><div class="ttdeci">int64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00099">Utils.h:99</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a0f59f175e7682c7ed5f4ea30ef687834"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">arm_compute::Dimensions::num_dimensions</a></div><div class="ttdeci">unsigned int num_dimensions() const </div><div class="ttdoc">Returns the effective dimensionality of the tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00109">Dimensions.h:109</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01float_01_4_xhtml_a05cacf975133703fccd67d8b60ed9ae0"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01float_01_4.xhtml#a05cacf975133703fccd67d8b60ed9ae0">arm_compute::test::traits::promote< float >::type</a></div><div class="ttdeci">float type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00100">Utils.h:100</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_r_o_i_pooling_layer_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml">arm_compute::ROIPoolingLayerInfo</a></div><div class="ttdoc">ROI Pooling Layer Information class. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00478">Types.h:478</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__signed__type_xhtml_aeab553c4422f2a498954db0b4eb15789"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#aeab553c4422f2a498954db0b4eb15789">arm_compute::test::common_promoted_signed_type::promoted_type</a></div><div class="ttdeci">traits::promote_t< common_type > promoted_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00297">Utils.h:297</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_ab71c35ca207b916a9f8b0336ab88484e"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ab71c35ca207b916a9f8b0336ab88484e">arm_compute::support::cpp11::round</a></div><div class="ttdeci">T round(T value)</div><div class="ttdoc">Round floating-point value with half value rounding away from zero. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00228">ToolchainSupport.h:228</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_rectangle_xhtml_ad0eab1042455a2067c812ab8071d5376"><div class="ttname"><a href="structarm__compute_1_1_rectangle.xhtml#ad0eab1042455a2067c812ab8071d5376">arm_compute::Rectangle::width</a></div><div class="ttdeci">uint16_t width</div><div class="ttdoc">Width of the rectangle. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00289">Types.h:289</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__signed__type_xhtml_a6d8309776a9cb10567df1735666919ff"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a6d8309776a9cb10567df1735666919ff">arm_compute::test::common_promoted_signed_type::intermediate_type</a></div><div class="ttdeci">typename traits::make_signed_conditional_t< promoted_type >::type intermediate_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00298">Utils.h:298</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a4965b2f6821e0cf0afee738158bd8377"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377">arm_compute::test::saturate_cast</a></div><div class="ttdeci">T saturate_cast(T val)</div><div class="ttdoc">Saturate a value of type T against the numeric limits of type U. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00278">Utils.h:278</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_rectangle_xhtml_ab0580f504a7428539be299fa71565f30"><div class="ttname"><a href="structarm__compute_1_1_rectangle.xhtml#ab0580f504a7428539be299fa71565f30">arm_compute::Rectangle::y</a></div><div class="ttdeci">uint16_t y</div><div class="ttdoc">Top-left y coordinate. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00288">Types.h:288</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aadfcf28d0734569a6a693bc8194de62bf"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aadfcf28d0734569a6a693bc8194de62bf">arm_compute::Channel::G</a></div><div class="ttdoc">Green channel. </div></div> |
| <div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml_a4eaec01ba2c12093db609d1034ad0bc1"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml#a4eaec01ba2c12093db609d1034ad0bc1">arm_compute::TensorShape::total_size</a></div><div class="ttdeci">size_t total_size() const </div><div class="ttdoc">Collapses all dimensions to a single linear total size. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00135">TensorShape.h:135</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint8__t_01_4_xhtml_a3085ed9ad7c9b1c88dcec24108730e54"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54">arm_compute::test::traits::promote< uint8_t >::type</a></div><div class="ttdeci">uint16_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00094">Utils.h:94</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a></div><div class="ttdoc">Store the tensor's metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00042">TensorInfo.h:42</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_rectangle_xhtml_a4dde988b1b2adba65ae3efa69f65d960"><div class="ttname"><a href="structarm__compute_1_1_rectangle.xhtml#a4dde988b1b2adba65ae3efa69f65d960">arm_compute::Rectangle::x</a></div><div class="ttdeci">uint16_t x</div><div class="ttdoc">Top-left x coordinate. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00287">Types.h:287</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point< T > max(fixed_point< T > x, fixed_point< T > y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a810a78f0b7cc0270f38d4136e023ea3b"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a810a78f0b7cc0270f38d4136e023ea3b">arm_compute::Dimensions::set_num_dimensions</a></div><div class="ttdeci">void set_num_dimensions(size_t num_dimensions)</div><div class="ttdoc">Set number of dimensions. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00115">Dimensions.h:115</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">arm_compute::DataType::F64</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_af4bcf30f8c56f547f66d61c7c5ae01db"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#af4bcf30f8c56f547f66d61c7c5ae01db">arm_compute::test::round_half_up</a></div><div class="ttdeci">T round_half_up(T value)</div><div class="ttdoc">Round floating-point value with half value rounding to positive infinity. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00056">Utils.h:56</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ae115fc750a92fb6a5e094998b56fcc56"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">arm_compute::test::fixed_point_arithmetic::detail::abs</a></div><div class="ttdeci">fixed_point< T > abs(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">FixedPoint.h:914</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a2ce249581879425cc66db8d364c838f3"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a2ce249581879425cc66db8d364c838f3">arm_compute::test::create_tensor</a></div><div class="ttdeci">T create_tensor(const TensorShape &shape, DataType data_type, int num_channels=1, int fixed_point_position=0)</div><div class="ttdoc">Create and initialize a tensor of the given type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00378">Utils.h:378</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_valid_region_xhtml"><div class="ttname"><a href="structarm__compute_1_1_valid_region.xhtml">arm_compute::ValidRegion</a></div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00093">Types.h:93</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1_rectangle_xhtml_a81c9f8d0b8c3b49d770be14dbe9f0d37"><div class="ttname"><a href="structarm__compute_1_1_rectangle.xhtml#a81c9f8d0b8c3b49d770be14dbe9f0d37">arm_compute::Rectangle::height</a></div><div class="ttdeci">uint16_t height</div><div class="ttdoc">Height of the rectangle. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00290">Types.h:290</a></div></div> |
| <div class="ttc" id="classarm__compute_1_1_dimensions_xhtml_a1b67d5b720119d50faa286c774579ecc"><div class="ttname"><a href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">arm_compute::Dimensions< int >::num_max_dimensions</a></div><div class="ttdeci">static constexpr size_t num_max_dimensions</div><div class="ttdoc">Number of dimensions the tensor has. </div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00045">Dimensions.h:45</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">arm_compute::DataType::U64</a></div></div> |
| <div class="ttc" id="arm__compute_2core_2_types_8h_xhtml"><div class="ttname"><a href="arm__compute_2core_2_types_8h.xhtml">Types.h</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">arm_compute::DataType</a></div><div class="ttdeci">DataType</div><div class="ttdoc">Available data types. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00064">Types.h:64</a></div></div> |
| <div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">arm_compute::DataType::S8</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_xhtml"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">arm_compute::test::traits::promote</a></div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00093">Utils.h:93</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint16__t_01_4_xhtml_a43022da9f622deba3284b748a6885e23"><div class="ttname"><a href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23">arm_compute::test::traits::promote< uint16_t >::type</a></div><div class="ttdeci">uint32_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00096">Utils.h:96</a></div></div> |
| <div class="ttc" id="_tensor_shape_8h_xhtml"><div class="ttname"><a href="_tensor_shape_8h.xhtml">TensorShape.h</a></div></div> |
| <div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__signed__type_xhtml_a5dc4a681965ff1118a0491b07867c032"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a5dc4a681965ff1118a0491b07867c032">arm_compute::test::common_promoted_signed_type::common_type</a></div><div class="ttdeci">typename std::common_type< T...>::type common_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00296">Utils.h:296</a></div></div> |
| <div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00115">Error.h:115</a></div></div> |
| </div><!-- fragment --></div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <li class="navelem"><a class="el" href="dir_3b4cc335dce0408d77b688e575522aa5.xhtml">tests</a></li><li class="navelem"><a class="el" href="tests_2_utils_8h.xhtml">Utils.h</a></li> |
| <li class="footer">Generated on Thu Oct 12 2017 14:26:33 for Compute Library by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |