blob: b89b5b09c5ee85a6555409edee3923a96a2748f5 [file] [log] [blame]
<!-- 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.11"/>
<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="navtreedata.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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" 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
&#160;<span id="projectnumber">18.03</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<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&#160;Page</span></a></li>
<li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
<li><a href="annotated.xhtml"><span>Data&#160;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&#160;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)">
</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>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<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>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<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>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<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>&#160;<span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#ifndef __ARM_COMPUTE_TEST_UTILS_H__</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#define __ARM_COMPUTE_TEST_UTILS_H__</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_coordinates_8h.xhtml">arm_compute/core/Coordinates.h</a>&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="core_2_error_8h.xhtml">arm_compute/core/Error.h</a>&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="arm__compute_2core_2_fixed_point_8h.xhtml">arm_compute/core/FixedPoint.h</a>&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_h_o_g_info_8h.xhtml">arm_compute/core/HOGInfo.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_size2_d_8h.xhtml">arm_compute/core/Size2D.h</a>&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tensor_info_8h.xhtml">arm_compute/core/TensorInfo.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_tensor_shape_8h.xhtml">arm_compute/core/TensorShape.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="arm__compute_2core_2_types_8h.xhtml">arm_compute/core/Types.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_toolchain_support_8h.xhtml">support/ToolchainSupport.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#ifdef ARM_COMPUTE_CL</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_open_c_l_8h.xhtml">arm_compute/core/CL/OpenCL.h</a>&quot;</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_c_l_scheduler_8h.xhtml">arm_compute/runtime/CL/CLScheduler.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_CL */</span><span class="preprocessor"></span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="preprocessor">#ifdef ARM_COMPUTE_GC</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_open_g_l_e_s_8h.xhtml">arm_compute/core/GLES_COMPUTE/OpenGLES.h</a>&quot;</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_g_c_tensor_8h.xhtml">arm_compute/runtime/GLES_COMPUTE/GCTensor.h</a>&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_GC */</span><span class="preprocessor"></span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="preprocessor">#include &lt;cstddef&gt;</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="preprocessor">#include &lt;limits&gt;</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="preprocessor">#include &lt;random&gt;</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="preprocessor">#include &lt;sstream&gt;</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="preprocessor">#include &lt;type_traits&gt;</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;{</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="preprocessor">#ifdef ARM_COMPUTE_CL</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="keyword">class </span>CLTensor;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_CL */</span><span class="preprocessor"></span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="keyword">namespace </span>test</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;{</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">template &lt;typename T, typename = typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value</a>&gt;<a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">::type</a>&gt;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#af4bcf30f8c56f547f66d61c7c5ae01db"> 71</a></span>&#160;<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="l00072"></a><span class="lineno"> 72</span>&#160;{</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordflow">return</span> std::floor(value + 0.5f);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;}</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">template &lt;typename T, typename = typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value</a>&gt;<a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">::type</a>&gt;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ad93bb148a873f19ad7692756e59617f4"> 84</a></span>&#160;<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&lt;T&gt;::epsilon())</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;{</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; 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="l00087"></a><span class="lineno"> 87</span>&#160; T ipart = 0;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; std::modf(positive_value, &amp;ipart);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// If &#39;value&#39; is exactly halfway between two integers</span></div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <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)) &lt; epsilon)</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; {</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// If &#39;ipart&#39; is even then return &#39;ipart&#39;</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keywordflow">if</span>(std::fmod(ipart, 2.f) &lt; epsilon)</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <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="l00096"></a><span class="lineno"> 96</span>&#160; }</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="comment">// Else return the nearest even integer</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <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="l00099"></a><span class="lineno"> 99</span>&#160; }</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">// Otherwise use the usual round to closest</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <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="l00102"></a><span class="lineno"> 102</span>&#160;}</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml"> 104</a></span>&#160;<span class="keyword">namespace </span>traits</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;{</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="comment">// *INDENT-OFF*</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="comment">// clang-format off</span></div><div class="line"><a name="l00108"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml"> 108</a></span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt; <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="l00109"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint8__t_01_4.xhtml#a3085ed9ad7c9b1c88dcec24108730e54"> 109</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;uint8_t&gt; { <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="l00110"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int8__t_01_4.xhtml#a8812bf779dca54354aa6ad00cef14a73"> 110</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;int8_t&gt; { <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="l00111"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint16__t_01_4.xhtml#a43022da9f622deba3284b748a6885e23"> 111</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;uint16_t&gt; { <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="l00112"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int16__t_01_4.xhtml#a4f14ffc6d6f6ca92afb1baf996fc9305"> 112</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;int16_t&gt; { <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="l00113"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01uint32__t_01_4.xhtml#a9659bbcc7fc016eda242219021c7980b"> 113</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;uint32_t&gt; { <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="l00114"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01int32__t_01_4.xhtml#a70ca3d636283d6713220cd8af5fc07b3"> 114</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;int32_t&gt; { <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="l00115"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01float_01_4.xhtml#a05cacf975133703fccd67d8b60ed9ae0"> 115</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;float&gt; { <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="l00116"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1traits_1_1promote_3_01half_01_4.xhtml#a871173f31fa2a65afb444d262bc1aadb"> 116</a></span>&#160;<span class="keyword">template</span> &lt;&gt; <span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1traits_1_1promote.xhtml">promote</a>&lt;<a class="code" href="namespacearm__compute.xhtml#a73e2825fd61d349c5ca2f5313e3c8ea1">half</a>&gt; { <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="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233"> 120</a></span>&#160;<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&lt;T&gt;::type</a>;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml#a381020121bcfd7b20c6bc4ecb807caa1"> 123</a></span>&#160;<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&lt;std::is_integral&lt;T&gt;::value</a>, std::make_signed&lt;T&gt;, std::common_type&lt;T&gt;&gt;<a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">::type</a>;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1traits.xhtml#a020cbca88ae935289ad3cbacbf963905"> 126</a></span>&#160;<span class="keyword">using</span> <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#a020cbca88ae935289ad3cbacbf963905">make_unsigned_conditional_t</a> = <span class="keyword">typename</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">std::conditional&lt;std::is_integral&lt;T&gt;::value</a>, std::make_unsigned&lt;T&gt;, std::common_type&lt;T&gt;&gt;<a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">::type</a>;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment">// clang-format on</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="comment">// *INDENT-ON*</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;}</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#aa337ab76176f3c4193642ac6de3a61cf"> 138</a></span>&#160;<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="l00139"></a><span class="lineno"> 139</span>&#160;{</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keywordflow">switch</span>(channel)</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; {</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <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>&#160; <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>&#160; <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>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a30ff380a3be74628024063a99fba10f0">Format::RGB888</a>;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;Unsupported channel&quot;</span>);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; }</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;}</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac7dbe33793790fc37a5eda11ed6b0273"> 157</a></span>&#160;<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="l00158"></a><span class="lineno"> 158</span>&#160;{</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keywordflow">switch</span>(channel)</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; {</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aae1e1d3d40573127e9ee0480caf1283d6">Channel::R</a>:</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aadfcf28d0734569a6a693bc8194de62bf">Channel::G</a>:</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">Channel::B</a>:</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">Format::U8</a>;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordflow">throw</span> std::runtime_error(<span class="stringliteral">&quot;Unsupported channel&quot;</span>);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;}</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> F, <span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447"> 175</a></span>&#160;<span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(F &amp;&amp;, <span class="keyword">const</span> T &amp;value)</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;{</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <span class="keywordflow">return</span> <a class="code" href="hwc_8hpp.xhtml#a0f61d63b009d0880a89c843bd50d8d76">value</a>;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;}</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> F, <span class="keyword">typename</span> T, <span class="keyword">typename</span> U&gt;</div><div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ad933f996ccb22854ae56dd86de8cbbfe"> 185</a></span>&#160;<span class="keyword">inline</span> <span class="keyword">auto</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(F &amp;&amp;func, T &amp;&amp;value1, U &amp;&amp;value2) -&gt; decltype(func(value1, value2))</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;{</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <span class="keywordflow">return</span> func(value1, value2);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;}</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> F, <span class="keyword">typename</span> I, <span class="keyword">typename</span> T, <span class="keyword">typename</span>... Vs&gt;</div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a89322cccde5e0a27d3a41085d3fd366c"> 198</a></span>&#160;<span class="keyword">inline</span> I <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(F &amp;&amp;func, I &amp;&amp;initial, T &amp;&amp;value, Vs &amp;&amp;... values)</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;{</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a1ebbb23b0094d47c51226d58e17e6447">foldl</a>(std::forward&lt;F&gt;(func), func(std::forward&lt;I&gt;(initial), std::forward&lt;T&gt;(value)), std::forward&lt;Vs&gt;(values)...);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;}</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a8103df0e6c416f55f40106aa49072b42"> 212</a></span>&#160;<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#a8103df0e6c416f55f40106aa49072b42">shape_to_valid_region</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;a_shape, <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="l00213"></a><span class="lineno"> 213</span>&#160;{</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; <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>(), a_shape };</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;anchor = valid_region.anchor;</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a> = valid_region.shape;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; <span class="keywordflow">if</span>(border_undefined)</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; {</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>() &lt; 2);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">set</a>(0, border_size.left);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">set</a>(1, border_size.top);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <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&lt;int&gt;(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>()) - static_cast&lt;int&gt;(border_size.left) - <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(border_size.right));</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <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&lt;int&gt;(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>()) - static_cast&lt;int&gt;(border_size.top) - <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(border_size.bottom));</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(0, valid_shape_x);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(1, valid_shape_y);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; }</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="keywordflow">return</span> valid_region;</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;}</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a1177ef8061a8b46b5d79c1af93c12de1"> 246</a></span>&#160;<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#a1177ef8061a8b46b5d79c1af93c12de1">shape_to_valid_region_gaussian_pyramid_half</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;a_shape, <span class="keyword">const</span> <a class="code" href="structarm__compute_1_1_valid_region.xhtml">ValidRegion</a> &amp;a_valid_region, <span class="keywordtype">bool</span> border_undefined = <span class="keyword">false</span>)</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;{</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; constexpr <span class="keywordtype">int</span> border_size = 2;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; <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>(), a_shape };</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;anchor = valid_region.anchor;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a> = valid_region.shape;</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="comment">// Compute tensor shape for level &quot;i&quot; of Gaussian Pyramid Half</span></div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; <span class="comment">// dst_width = (src_width + 1) * 0.5f</span></div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="comment">// dst_height = (src_height + 1) * 0.5f</span></div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(0, (shape[0] + 1) * 0.5f);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160; shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(1, (shape[1] + 1) * 0.5f);</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="keywordflow">if</span>(border_undefined)</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; {</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <a class="code" href="core_2_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>() &lt; 2);</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="comment">// Compute the left and top invalid borders</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keywordtype">float</span> invalid_border_left = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(a_valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#a55a69b397082accd94221dd10b722cf7">anchor</a>.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>() + border_size) / 2.0f;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keywordtype">float</span> invalid_border_top = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(a_valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#a55a69b397082accd94221dd10b722cf7">anchor</a>.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>() + border_size) / 2.0f;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="comment">// For the new anchor point we can have 2 cases:</span></div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="comment">// 1) If the width/height of the tensor shape is odd, we have to take the ceil value of (a_valid_region.anchor.x() + border_size) / 2.0f or (a_valid_region.anchor.y() + border_size / 2.0f</span></div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <span class="comment">// 2) If the width/height of the tensor shape is even, we have to take the floor value of (a_valid_region.anchor.x() + border_size) / 2.0f or (a_valid_region.anchor.y() + border_size) / 2.0f</span></div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; <span class="comment">// In this manner we should be able to propagate correctly the valid region along all levels of the pyramid</span></div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; invalid_border_left = (shape[0] % 2) ? std::ceil(invalid_border_left) : std::floor(invalid_border_left);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; invalid_border_top = (shape[1] % 2) ? std::ceil(invalid_border_top) : std::floor(invalid_border_top);</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; <span class="comment">// Set the anchor point</span></div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">set</a>(0, static_cast&lt;int&gt;(invalid_border_left));</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; anchor.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a982730e6f0da5f9490f59bc5f6bb3f27">set</a>(1, static_cast&lt;int&gt;(invalid_border_top));</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160; <span class="comment">// Compute shape</span></div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; <span class="comment">// Calculate the right and bottom invalid borders at the previous level of the pyramid</span></div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> prev_invalid_border_right = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(shape[0] - (a_valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#a55a69b397082accd94221dd10b722cf7">anchor</a>.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>() + a_valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#a1fcd64682b37ed3c2098d0094ce788d8">shape</a>[0]));</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> prev_invalid_border_bottom = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(shape[1] - (a_valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#a55a69b397082accd94221dd10b722cf7">anchor</a>.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>() + a_valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#a1fcd64682b37ed3c2098d0094ce788d8">shape</a>[1]));</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="comment">// Calculate the right and bottom invalid borders at the current level of the pyramid</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> invalid_border_right = std::ceil((prev_invalid_border_right + static_cast&lt;float&gt;(border_size)) / 2.0f);</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> invalid_border_bottom = std::ceil((prev_invalid_border_bottom + static_cast&lt;float&gt;(border_size)) / 2.0f);</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; <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&lt;int&gt;(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>()) - static_cast&lt;int&gt;(invalid_border_left) - <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(invalid_border_right));</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; <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&lt;int&gt;(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>()) - static_cast&lt;int&gt;(invalid_border_top) - <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(invalid_border_bottom));</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160; shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(0, valid_shape_x);</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(1, valid_shape_y);</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; }</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordflow">return</span> valid_region;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;}</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160;</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00308"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a1e6934e95738573214c2ce1d6648d116"> 308</a></span>&#160;<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="l00309"></a><span class="lineno"> 309</span>&#160;{</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="keywordflow">switch</span>(data_type)</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; {</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>:</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6af14462d71aa842202c3e4b272c7ec924">DataType::QASYMM8</a>:</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>uint8_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">DataType::S8</a>:</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">DataType::QS8</a>:</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>int8_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">DataType::U16</a>:</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>uint16_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>:</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a48d877702a2957f5a932c43a357866f9">DataType::QS16</a>:</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>int16_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>:</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>uint32_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">DataType::S32</a>:</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>int32_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">DataType::U64</a>:</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>uint64_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">DataType::S64</a>:</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span>int64_t *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a56d8353718e6fdc78b8d69078a2cdb94">DataType::F16</a>:</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="namespacearm__compute.xhtml#a73e2825fd61d349c5ca2f5313e3c8ea1">half</a> *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">float</span> *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">DataType::F64</a>:</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">double</span> *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">DataType::SIZET</a>:</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160; *<span class="keyword">reinterpret_cast&lt;</span><span class="keywordtype">size_t</span> *<span class="keyword">&gt;</span>(ptr) = value;</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;NOT SUPPORTED!&quot;</span>);</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; }</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;}</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> U, <span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00363"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377"> 363</a></span>&#160;T <a class="code" href="namespacearm__compute_1_1test.xhtml#a4965b2f6821e0cf0afee738158bd8377">saturate_cast</a>(T val)</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160;{</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="keywordflow">if</span>(val &gt; static_cast&lt;T&gt;(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;U&gt;::max</a>()))</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; {</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; val = <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::numeric_limits&lt;U&gt;::max</a>());</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; }</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160; <span class="keywordflow">if</span>(val &lt; static_cast&lt;T&gt;(std::numeric_limits&lt;U&gt;::lowest()))</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; {</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; val = <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(std::numeric_limits&lt;U&gt;::lowest());</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; }</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; <span class="keywordflow">return</span> val;</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160;}</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span>... T&gt;</div><div class="line"><a name="l00379"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml"> 379</a></span>&#160;<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="l00380"></a><span class="lineno"> 380</span>&#160;{</div><div class="line"><a name="l00381"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a5dc4a681965ff1118a0491b07867c032"> 381</a></span>&#160; <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&lt;T...&gt;<a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">::type</a>;</div><div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#aeab553c4422f2a498954db0b4eb15789"> 382</a></span>&#160; <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&lt;common_type&gt;</a>;</div><div class="line"><a name="l00383"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__signed__type.xhtml#a6d8309776a9cb10567df1735666919ff"> 383</a></span>&#160; <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&lt;promoted_type&gt;::type</a>;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160;};</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160;</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span>... T&gt;</div><div class="line"><a name="l00389"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml"> 389</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml">common_promoted_unsigned_type</a></div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>&#160;{</div><div class="line"><a name="l00391"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#a5dc4a681965ff1118a0491b07867c032"> 391</a></span>&#160; <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#a5dc4a681965ff1118a0491b07867c032">common_type</a> = <span class="keyword">typename</span> std::common_type&lt;T...&gt;<a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">::type</a>;</div><div class="line"><a name="l00392"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#aeab553c4422f2a498954db0b4eb15789"> 392</a></span>&#160; <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#aeab553c4422f2a498954db0b4eb15789">promoted_type</a> = <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#ac20ca549fa27b2eed44367745055a233">traits::promote_t&lt;common_type&gt;</a>;</div><div class="line"><a name="l00393"></a><span class="lineno"><a class="line" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#a2d90fb6b02a4ec5df8c995eb66b5d724"> 393</a></span>&#160; <span class="keyword">using</span> <a class="code" href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#a2d90fb6b02a4ec5df8c995eb66b5d724">intermediate_type</a> = <span class="keyword">typename</span> <a class="code" href="namespacearm__compute_1_1test_1_1traits.xhtml#a020cbca88ae935289ad3cbacbf963905">traits::make_unsigned_conditional_t&lt;promoted_type&gt;::type</a>;</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160;};</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160;</div><div class="line"><a name="l00403"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a24d8c0391cfa38e78969b6ad97c0ff09"> 403</a></span>&#160;<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> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a>, <span class="keywordtype">int</span> index)</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>&#160;{</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>&#160; <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="l00406"></a><span class="lineno"> 406</span>&#160;</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>&#160; <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(index &lt; 0 || index &gt;= num_elements, <span class="stringliteral">&quot;Index has to be in [0, num_elements]&quot;</span>);</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>&#160; <a class="code" href="core_2_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(num_elements == 0, <span class="stringliteral">&quot;Cannot create coordinate from empty shape&quot;</span>);</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>&#160; <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> coord{ 0 };</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>&#160;</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; <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 &gt;= 0; --d)</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160; {</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; num_elements /= shape[d];</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; coord.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">set</a>(d, index / num_elements);</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160; index %= num_elements;</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160; }</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160;</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>&#160; <span class="keywordflow">return</span> coord;</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160;}</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160;</div><div class="line"><a name="l00432"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a9be4cb7e6ee20063a4a10bc3abb750b9"> 432</a></span>&#160;<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> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a>, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;coord)</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160;{</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160; <a class="code" href="core_2_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">&quot;Cannot get index from empty shape&quot;</span>);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160; <a class="code" href="core_2_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">&quot;Cannot get index of empty coordinate&quot;</span>);</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160; <span class="keywordtype">int</span> index = 0;</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160; <span class="keywordtype">int</span> dim_size = 1;</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160;</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; coord.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a0f59f175e7682c7ed5f4ea30ef687834">num_dimensions</a>(); ++i)</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160; {</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>&#160; index += coord[i] * dim_size;</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160; dim_size *= shape[i];</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160; }</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160;</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160; <span class="keywordflow">return</span> index;</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160;}</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>&#160;</div><div class="line"><a name="l00450"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a856b55fc20ddcbdbeb84c35ae27bedac"> 450</a></span>&#160;<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> &amp;valid_region, <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> coord)</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160;{</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> d = 0; d &lt; <a class="code" href="classarm__compute_1_1_dimensions.xhtml#a1b67d5b720119d50faa286c774579ecc">Coordinates::num_max_dimensions</a>; ++d)</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160; {</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160; <span class="keywordflow">if</span>(coord[d] &lt; valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#aec54a7ff1ca347fdda25821cfb8fd0ed">start</a>(d) || coord[d] &gt;= valid_region.<a class="code" href="structarm__compute_1_1_valid_region.xhtml#adc8388028db66f138de6b1aca27ad620">end</a>(d))</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160; {</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160; <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160; }</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; }</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;}</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00474"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a316948014329b50b11a302305a6ab3ab"> 474</a></span>&#160;<span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a316948014329b50b11a302305a6ab3ab">create_tensor</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</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>, <span class="keywordtype">int</span> num_channels = 1,</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; <span class="keywordtype">int</span> fixed_point_position = 0, <a class="code" href="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a> quantization_info = <a class="code" href="structarm__compute_1_1_quantization_info.xhtml">QuantizationInfo</a>())</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160;{</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; T tensor;</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">info</a>(shape, num_channels, data_type, fixed_point_position);</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#acda9036ad24c455f67f2fea388a0ae13">set_quantization_info</a>(quantization_info);</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160; tensor.allocator()-&gt;init(info);</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; <span class="keywordflow">return</span> tensor;</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160;}</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160;</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00493"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a1a1319867418814820134ec77cf09eed"> 493</a></span>&#160;<span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a316948014329b50b11a302305a6ab3ab">create_tensor</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format)</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160;{</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160; <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">info</a>(shape, format);</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160;</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160; T tensor;</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160; tensor.allocator()-&gt;init(info);</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160;</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160; <span class="keywordflow">return</span> tensor;</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160;}</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160;</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a764bac61748afaf8fd0468b2a4cb09be"> 511</a></span>&#160;<span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#a764bac61748afaf8fd0468b2a4cb09be">create_multi_image</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;shape, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58">Format</a> format)</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160;{</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; T multi_image;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; multi_image.init(shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#afb5cd37bb08f1029691590372e6330f0">x</a>(), shape.<a class="code" href="classarm__compute_1_1_dimensions.xhtml#a691c9cb93365c2e33f3429de43244098">y</a>(), format);</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160;</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; <span class="keywordflow">return</span> multi_image;</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160;}</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>&#160;</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00533"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac0cf6098a0e58cdfb4483dfa9347bfc0"> 533</a></span>&#160;<span class="keyword">inline</span> T <a class="code" href="namespacearm__compute_1_1test.xhtml#ac0cf6098a0e58cdfb4483dfa9347bfc0">create_HOG</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;cell_size, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;block_size, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;detection_window_size, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;block_stride, <span class="keywordtype">size_t</span> num_bins,</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; <a class="code" href="namespacearm__compute.xhtml#a673665b4587a2956fcbad5f0e9ba89d3">HOGNormType</a> normalization_type = <a class="code" href="namespacearm__compute.xhtml#a673665b4587a2956fcbad5f0e9ba89d3ac9e68c0594494ec85805b225a7acb9c2">HOGNormType::L2HYS_NORM</a>, <span class="keywordtype">float</span> l2_hyst_threshold = 0.2f, <a class="code" href="namespacearm__compute.xhtml#af00a42ecad444bbda75cde1b64bd7e72">PhaseType</a> phase_type = <a class="code" href="namespacearm__compute.xhtml#af00a42ecad444bbda75cde1b64bd7e72aaf36b47f395cd01f48b8fc1013665054">PhaseType::UNSIGNED</a>)</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160;{</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; T hog;</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; <a class="code" href="classarm__compute_1_1_h_o_g_info.xhtml">HOGInfo</a> hog_info(cell_size, block_size, block_size, block_stride, num_bins, normalization_type, l2_hyst_threshold, phase_type);</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; hog.init(hog_info);</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160; <span class="keywordflow">return</span> hog;</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160;}</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160;</div><div class="line"><a name="l00552"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac7324cc960068b65c558b7d25dfe2914"> 552</a></span>&#160;<span class="keyword">inline</span> std::vector&lt;ROI&gt; <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> &amp;shape, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml">ROIPoolingLayerInfo</a> &amp;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="l00553"></a><span class="lineno"> 553</span>&#160;{</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160; <a class="code" href="core_2_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>() &lt; 4) || (pool_info.<a class="code" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml#a5ef65c82efd18c18e7f23585364e3fa9">pooled_height</a>() &lt; 4));</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160; std::vector&lt;ROI&gt; rois;</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; std::mt19937 gen(seed);</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; <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="l00559"></a><span class="lineno"> 559</span>&#160; <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="l00560"></a><span class="lineno"> 560</span>&#160; <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="l00561"></a><span class="lineno"> 561</span>&#160;</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160; <span class="comment">// Calculate distribution bounds</span></div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> scaled_width = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</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="l00564"></a><span class="lineno"> 564</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> scaled_height = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</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="l00565"></a><span class="lineno"> 565</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> min_width = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(pool_width / roi_scale);</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> min_height = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span>(pool_height / roi_scale);</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160;</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160; <span class="comment">// Create distributions</span></div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160; std::uniform_int_distribution&lt;int&gt; dist_batch(0, shape[3] - 1);</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160; std::uniform_int_distribution&lt;int&gt; dist_x(0, scaled_width);</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; std::uniform_int_distribution&lt;int&gt; dist_y(0, scaled_height);</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160; std::uniform_int_distribution&lt;int&gt; 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="l00573"></a><span class="lineno"> 573</span>&#160; std::uniform_int_distribution&lt;int&gt; 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="l00574"></a><span class="lineno"> 574</span>&#160;</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> r = 0; r &lt; num_rois; ++r)</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160; {</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160; <a class="code" href="structarm__compute_1_1_r_o_i.xhtml">ROI</a> roi;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160; 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="l00579"></a><span class="lineno"> 579</span>&#160; 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="l00580"></a><span class="lineno"> 580</span>&#160; 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="l00581"></a><span class="lineno"> 581</span>&#160; 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="l00582"></a><span class="lineno"> 582</span>&#160; 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="l00583"></a><span class="lineno"> 583</span>&#160; rois.push_back(roi);</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; }</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160;</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160; <span class="keywordflow">return</span> rois;</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160;}</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160;</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> ArrayAccessor_T&gt;</div><div class="line"><a name="l00590"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ac35e7a1ad467f5fe8620cbbc5793d53b"> 590</a></span>&#160;<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 &amp;&amp;array, <span class="keyword">const</span> std::vector&lt;T&gt; &amp;v)</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160;{</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160; array.resize(v.size());</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160; std::memcpy(array.buffer(), v.data(), v.size() * <span class="keyword">sizeof</span>(T));</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160;}</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160;</div><div class="line"><a name="l00602"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#ae47155d6186155ec4da9295764b3c05a"> 602</a></span>&#160;<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> data_type)</div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>&#160;{</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>&#160; <span class="comment">// Check endianness</span></div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 1;</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160; <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a497347573faa3778743ddf277f861094">c</a> = <span class="keyword">reinterpret_cast&lt;</span><span class="keyword">const </span><span class="keywordtype">char</span> *<span class="keyword">&gt;</span>(&amp;i);</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160; std::string endianness;</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>&#160; <span class="keywordflow">if</span>(*c == 1)</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160; {</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>&#160; endianness = std::string(<span class="stringliteral">&quot;&lt;&quot;</span>);</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>&#160; }</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160; {</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; endianness = std::string(<span class="stringliteral">&quot;&gt;&quot;</span>);</div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>&#160; }</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>&#160; <span class="keyword">const</span> std::string no_endianness(<span class="stringliteral">&quot;|&quot;</span>);</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>&#160;</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160; <span class="keywordflow">switch</span>(data_type)</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160; {</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6669348b484e3008dca2bfa8e85e40b5">DataType::U8</a>:</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160; <span class="keywordflow">return</span> no_endianness + <span class="stringliteral">&quot;u&quot;</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="l00622"></a><span class="lineno"> 622</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6aafb0fced528eaac5fe170b763cda5975">DataType::S8</a>:</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>&#160; <span class="keywordflow">return</span> no_endianness + <span class="stringliteral">&quot;i&quot;</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="l00624"></a><span class="lineno"> 624</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aef9ef3ebca4d2b64b6ec83808bafa5f2">DataType::U16</a>:</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;u&quot;</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="l00626"></a><span class="lineno"> 626</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a6e0b0886efb94aec797f6b830329b72c">DataType::S16</a>:</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;i&quot;</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="l00628"></a><span class="lineno"> 628</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58ac8bd5bedff8ef192d39a962afc0e19ee">DataType::U32</a>:</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;u&quot;</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="l00630"></a><span class="lineno"> 630</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58aa1e28eee0339658d39a8b4d325b56e9c">DataType::S32</a>:</div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;i&quot;</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="l00632"></a><span class="lineno"> 632</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a31d65cccd6593e4101db93fb878abcaa">DataType::U64</a>:</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;u&quot;</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="l00634"></a><span class="lineno"> 634</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a115dca124dc6423c7a400b8a8a0270cc">DataType::S64</a>:</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;i&quot;</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="l00636"></a><span class="lineno"> 636</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>:</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;f&quot;</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="l00638"></a><span class="lineno"> 638</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a1ad5f6f3069070ec4cbbdc94d5e61e0e">DataType::F64</a>:</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;f&quot;</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="l00640"></a><span class="lineno"> 640</span>&#160; <span class="keywordflow">case</span> <a class="code" href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6abd7ef6d4f35bc7d05c559b65032f15d1">DataType::SIZET</a>:</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>&#160; <span class="keywordflow">return</span> endianness + <span class="stringliteral">&quot;u&quot;</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="l00642"></a><span class="lineno"> 642</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160; <a class="code" href="core_2_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;NOT SUPPORTED!&quot;</span>);</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>&#160; }</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>&#160;}</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>&#160;</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TensorType&gt;</div><div class="line"><a name="l00650"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a5967bb62a612be6b300aa96049a2166a"> 650</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a5967bb62a612be6b300aa96049a2166a">sync_if_necessary</a>()</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160;{</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>&#160;<span class="preprocessor">#ifdef ARM_COMPUTE_CL</span></div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute.xhtml#aa4f4d7a58287017588fc338965873f14">opencl_is_available</a>() &amp;&amp; std::is_same&lt;<span class="keyword">typename</span> <a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">std::decay&lt;TensorType&gt;::type</a>, <a class="code" href="classarm__compute_1_1_c_l_tensor.xhtml">arm_compute::CLTensor</a>&gt;::value)</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160; {</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a60f9a6836b628a7171914c4afe43b4a7">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ad55f80ed3cd8b6c4f247763b747016af">sync</a>();</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>&#160; }</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_CL */</span><span class="preprocessor"></span></div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>&#160;}</div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>&#160;</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> TensorType&gt;</div><div class="line"><a name="l00667"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test.xhtml#a619736e19838c20cac8f668ab13aae37"> 667</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="namespacearm__compute_1_1test.xhtml#a619736e19838c20cac8f668ab13aae37">sync_tensor_if_necessary</a>(TensorType &amp;tensor)</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>&#160;{</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>&#160;<span class="preprocessor">#ifdef ARM_COMPUTE_GC</span></div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute.xhtml#a19c7b9bc5f36935ba40314907ffe54ce">opengles31_is_available</a>() &amp;&amp; std::is_same&lt;<span class="keyword">typename</span> <a class="code" href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">std::decay&lt;TensorType&gt;::type</a>, <a class="code" href="classarm__compute_1_1_g_c_tensor.xhtml">arm_compute::GCTensor</a>&gt;::value)</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>&#160; {</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>&#160; <span class="comment">// Force sync the tensor by calling map and unmap.</span></div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>&#160; <a class="code" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> &amp;t = <span class="keyword">dynamic_cast&lt;</span><a class="code" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> &amp;<span class="keyword">&gt;</span>(tensor);</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>&#160; t.<a class="code" href="classarm__compute_1_1_i_g_c_tensor.xhtml#a14c53d2d17be6fa8a2c9861527c7b002">map</a>();</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>&#160; t.<a class="code" href="classarm__compute_1_1_i_g_c_tensor.xhtml#a1ffeb3b5abb3d61f62b58a391816201c">unmap</a>();</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>&#160; }</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARM_COMPUTE_GC */</span><span class="preprocessor"></span></div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span>&#160;}</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>&#160;} <span class="comment">// namespace test</span></div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>&#160;} <span class="comment">// namespace arm_compute</span></div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __ARM_COMPUTE_TEST_UTILS_H__ */</span><span class="preprocessor"></span></div><div class="ttc" id="namespacearm__compute_xhtml_a673665b4587a2956fcbad5f0e9ba89d3ac9e68c0594494ec85805b225a7acb9c2"><div class="ttname"><a href="namespacearm__compute.xhtml#a673665b4587a2956fcbad5f0e9ba89d3ac9e68c0594494ec85805b225a7acb9c2">arm_compute::HOGNormType::L2HYS_NORM</a></div><div class="ttdoc">L2-norm followed by clipping. </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_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</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&lt; int8_t &gt;::type</a></div><div class="ttdeci">int16_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00110">Utils.h:110</a></div></div>
<div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__unsigned__type_xhtml_a2d90fb6b02a4ec5df8c995eb66b5d724"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#a2d90fb6b02a4ec5df8c995eb66b5d724">arm_compute::test::common_promoted_unsigned_type::intermediate_type</a></div><div class="ttdeci">typename traits::make_unsigned_conditional_t&lt; promoted_type &gt;::type intermediate_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00393">Utils.h:393</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#l00039">TensorShape.h:39</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_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a11cde4d3551db3f9498d339a67189543">arm_compute::DataType::QS8</a></div></div>
<div class="ttc" id="core_2_error_8h_xhtml"><div class="ttname"><a href="core_2_error_8h.xhtml">Error.h</a></div></div>
<div class="ttc" id="structarm__compute_1_1_valid_region_xhtml_a1fcd64682b37ed3c2098d0094ce788d8"><div class="ttname"><a href="structarm__compute_1_1_valid_region.xhtml#a1fcd64682b37ed3c2098d0094ce788d8">arm_compute::ValidRegion::shape</a></div><div class="ttdeci">TensorShape shape</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00217">Types.h:217</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 &amp;&amp;, const T &amp;value)</div><div class="ttdoc">Base case of foldl. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00175">Utils.h:175</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_af00a42ecad444bbda75cde1b64bd7e72aaf36b47f395cd01f48b8fc1013665054"><div class="ttname"><a href="namespacearm__compute.xhtml#af00a42ecad444bbda75cde1b64bd7e72aaf36b47f395cd01f48b8fc1013665054">arm_compute::PhaseType::UNSIGNED</a></div><div class="ttdoc">Angle range: [0, 180]. </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&lt; int16_t &gt;::type</a></div><div class="ttdeci">int32_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00112">Utils.h:112</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_g_c_tensor_xhtml_a14c53d2d17be6fa8a2c9861527c7b002"><div class="ttname"><a href="classarm__compute_1_1_i_g_c_tensor.xhtml#a14c53d2d17be6fa8a2c9861527c7b002">arm_compute::IGCTensor::map</a></div><div class="ttdeci">void map(bool blocking=true)</div><div class="ttdoc">Map on an allocated buffer. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a1177ef8061a8b46b5d79c1af93c12de1"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a1177ef8061a8b46b5d79c1af93c12de1">arm_compute::test::shape_to_valid_region_gaussian_pyramid_half</a></div><div class="ttdeci">ValidRegion shape_to_valid_region_gaussian_pyramid_half(const TensorShape &amp;a_shape, const ValidRegion &amp;a_valid_region, bool border_undefined=false)</div><div class="ttdoc">Create a valid region for Gaussian Pyramid Half based on tensor shape and valid region at level &quot;i - ...</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00246">Utils.h:246</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#l00229">Types.h:229</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_af00a42ecad444bbda75cde1b64bd7e72"><div class="ttname"><a href="namespacearm__compute.xhtml#af00a42ecad444bbda75cde1b64bd7e72">arm_compute::PhaseType</a></div><div class="ttdeci">PhaseType</div><div class="ttdoc">Phase calculation type. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00349">Types.h:349</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#l00138">Utils.h:138</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#l00279">ToolchainSupport.h:279</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="core_2_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00306">Error.h:306</a></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">1 channel, 1 U8 per channel </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&lt; T &gt;::type promote_t</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00120">Utils.h:120</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#l00396">Types.h:396</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#l00689">Types.h:689</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 &amp;&amp;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#l00187">ToolchainSupport.h:187</a></div></div>
<div class="ttc" id="classarm__compute_1_1_h_o_g_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_h_o_g_info.xhtml">arm_compute::HOGInfo</a></div><div class="ttdoc">Store the HOG&amp;#39;s metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_h_o_g_info_8h_source.xhtml#l00035">HOGInfo.h:35</a></div></div>
<div class="ttc" id="core_2_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00238">Error.h:238</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#l00681">Types.h:681</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#l00044">Types.h:44</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 F32 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a5967bb62a612be6b300aa96049a2166a"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a5967bb62a612be6b300aa96049a2166a">arm_compute::test::sync_if_necessary</a></div><div class="ttdeci">void sync_if_necessary()</div><div class="ttdoc">Sync if necessary. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00650">Utils.h:650</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_g_c_tensor_xhtml_a1ffeb3b5abb3d61f62b58a391816201c"><div class="ttname"><a href="classarm__compute_1_1_i_g_c_tensor.xhtml#a1ffeb3b5abb3d61f62b58a391816201c">arm_compute::IGCTensor::unmap</a></div><div class="ttdeci">void unmap()</div><div class="ttdoc">Unmap an allocated and mapped buffer. </div></div>
<div class="ttc" id="classarm__compute_1_1_i_g_c_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1_i_g_c_tensor.xhtml">arm_compute::IGCTensor</a></div><div class="ttdoc">Interface for GLES Compute tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_i_g_c_tensor_8h_source.xhtml#l00035">IGCTensor.h:35</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 U16 per channel </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_ac0cf6098a0e58cdfb4483dfa9347bfc0"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#ac0cf6098a0e58cdfb4483dfa9347bfc0">arm_compute::test::create_HOG</a></div><div class="ttdeci">T create_HOG(const Size2D &amp;cell_size, const Size2D &amp;block_size, const Size2D &amp;detection_window_size, const Size2D &amp;block_stride, size_t num_bins, HOGNormType normalization_type=HOGNormType::L2HYS_NORM, float l2_hyst_threshold=0.2f, PhaseType phase_type=PhaseType::UNSIGNED)</div><div class="ttdoc">Create and initialize a HOG (Histogram of Oriented Gradients) of the given type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00533">Utils.h:533</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_aa4f4d7a58287017588fc338965873f14"><div class="ttname"><a href="namespacearm__compute.xhtml#aa4f4d7a58287017588fc338965873f14">arm_compute::opencl_is_available</a></div><div class="ttdeci">bool opencl_is_available()</div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_acda9036ad24c455f67f2fea388a0ae13"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#acda9036ad24c455f67f2fea388a0ae13">arm_compute::TensorInfo::set_quantization_info</a></div><div class="ttdeci">ITensorInfo &amp; set_quantization_info(const QuantizationInfo &amp;quantization_info) override</div><div class="ttdoc">Set the quantization settings (scale and offset) of the tensor. </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&lt; ROI &gt; generate_random_rois(const TensorShape &amp;shape, const ROIPoolingLayerInfo &amp;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#l00552">Utils.h:552</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1_g_c_tensor.xhtml">arm_compute::GCTensor</a></div><div class="ttdoc">Interface for OpenGL ES tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_g_c_tensor_8h_source.xhtml#l00037">GCTensor.h:37</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a096668313a9a819d54a2e65ec21ff0cc"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">arm_compute::test::validation::info</a></div><div class="ttdeci">src info() -&gt; set_format(Format::S16)</div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00001">00_introduction.dox:1</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#l00196">Types.h:196</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 &amp;shape, const Coordinates &amp;coord)</div><div class="ttdoc">Linearise the given coordinate. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00432">Utils.h:432</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 F16 per channel </div></div>
<div class="ttc" id="_size2_d_8h_xhtml"><div class="ttname"><a href="_size2_d_8h.xhtml">Size2D.h</a></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 S32 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&lt; T &gt;::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#l00084">Utils.h:84</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&lt; std::is_integral&lt; T &gt;::value, std::make_signed&lt; T &gt;, std::common_type&lt; T &gt;&gt;::type make_signed_conditional_t</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00123">Utils.h:123</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#l00394">Types.h:394</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">3 channels, 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="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00116">GEMM.cpp:116</a></div></div>
<div class="ttc" id="_c_l_scheduler_8h_xhtml"><div class="ttname"><a href="_c_l_scheduler_8h.xhtml">CLScheduler.h</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#l00190">Types.h:190</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#l00157">Utils.h:157</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1traits_xhtml_a020cbca88ae935289ad3cbacbf963905"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1traits.xhtml#a020cbca88ae935289ad3cbacbf963905">arm_compute::test::traits::make_unsigned_conditional_t</a></div><div class="ttdeci">typename std::conditional&lt; std::is_integral&lt; T &gt;::value, std::make_unsigned&lt; T &gt;, std::common_type&lt; T &gt;&gt;::type make_unsigned_conditional_t</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00126">Utils.h:126</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#l00308">Utils.h:308</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 &amp;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#l00450">Utils.h:450</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a619736e19838c20cac8f668ab13aae37"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a619736e19838c20cac8f668ab13aae37">arm_compute::test::sync_tensor_if_necessary</a></div><div class="ttdeci">void sync_tensor_if_necessary(TensorType &amp;tensor)</div><div class="ttdoc">Sync tensor if necessary. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00667">Utils.h:667</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&lt; uint32_t &gt;::type</a></div><div class="ttdeci">uint64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00113">Utils.h:113</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 U32 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#l00401">Types.h:401</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#l00050">Types.h:50</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6af14462d71aa842202c3e4b272c7ec924"><div class="ttname"><a href="namespacearm__compute.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6af14462d71aa842202c3e4b272c7ec924">arm_compute::DataType::QASYMM8</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#l00379">Utils.h:379</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#l00397">Types.h:397</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_a60f9a6836b628a7171914c4afe43b4a7"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a60f9a6836b628a7171914c4afe43b4a7">arm_compute::CLScheduler::get</a></div><div class="ttdeci">static CLScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton. </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 &amp;&amp;array, const std::vector&lt; T &gt; &amp;v)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00590">Utils.h:590</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a316948014329b50b11a302305a6ab3ab"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a316948014329b50b11a302305a6ab3ab">arm_compute::test::create_tensor</a></div><div class="ttdeci">T create_tensor(const TensorShape &amp;shape, DataType data_type, int num_channels=1, int fixed_point_position=0, QuantizationInfo quantization_info=QuantizationInfo())</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#l00474">Utils.h:474</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 &amp;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#l00403">Utils.h:403</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 S16 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#l00685">Types.h:685</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#l00602">Utils.h:602</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#l00278">hwc.hpp:278</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_ad55f80ed3cd8b6c4f247763b747016af"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#ad55f80ed3cd8b6c4f247763b747016af">arm_compute::CLScheduler::sync</a></div><div class="ttdeci">void sync()</div><div class="ttdoc">Blocks until all commands in the associated command queue have finished. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8h_source.xhtml#l00180">CLScheduler.h:180</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&lt; half &gt;::type</a></div><div class="ttdeci">half type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00116">Utils.h:116</a></div></div>
<div class="ttc" id="_open_g_l_e_s_8h_xhtml"><div class="ttname"><a href="_open_g_l_e_s_8h.xhtml">OpenGLES.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml_a3095e0ccbbc39daf5b3816193edca6ad"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml#a3095e0ccbbc39daf5b3816193edca6ad">arm_compute::TensorShape::set</a></div><div class="ttdeci">TensorShape &amp; 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#l00077">TensorShape.h:77</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="namespacearm__compute_xhtml_a673665b4587a2956fcbad5f0e9ba89d3"><div class="ttname"><a href="namespacearm__compute.xhtml#a673665b4587a2956fcbad5f0e9ba89d3">arm_compute::HOGNormType</a></div><div class="ttdeci">HOGNormType</div><div class="ttdoc">Normalization type for Histogram of Oriented Gradients (HOG) </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00450">Types.h:450</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&lt; int32_t &gt;::type</a></div><div class="ttdeci">int64_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00114">Utils.h:114</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#l00122">Dimensions.h:122</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&lt; float &gt;::type</a></div><div class="ttdeci">float type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00115">Utils.h:115</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#l00668">Types.h:668</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&lt; common_type &gt; promoted_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00382">Utils.h:382</a></div></div>
<div class="ttc" id="core_2_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="core_2_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="core_2_error_8h_source.xhtml#l00297">Error.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#l00247">ToolchainSupport.h:247</a></div></div>
<div class="ttc" id="classarm__compute_1_1_size2_d_xhtml"><div class="ttname"><a href="classarm__compute_1_1_size2_d.xhtml">arm_compute::Size2D</a></div><div class="ttdoc">Class for specifying the size of an image or rectangle. </div><div class="ttdef"><b>Definition:</b> <a href="_size2_d_8h_source.xhtml#l00033">Size2D.h:33</a></div></div>
<div class="ttc" id="namespacecaffe__data__extractor_xhtml_a7aead736a07eaf25623ad7bfa1f0ee2d"><div class="ttname"><a href="namespacecaffe__data__extractor.xhtml#a7aead736a07eaf25623ad7bfa1f0ee2d">caffe_data_extractor.type</a></div><div class="ttdeci">type</div><div class="ttdef"><b>Definition:</b> <a href="caffe__data__extractor_8py_source.xhtml#l00019">caffe_data_extractor.py:19</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#l00374">Types.h:374</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&lt; promoted_type &gt;::type intermediate_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00383">Utils.h:383</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#l00363">Utils.h:363</a></div></div>
<div class="ttc" id="_h_o_g_info_8h_xhtml"><div class="ttname"><a href="_h_o_g_info_8h.xhtml">HOGInfo.h</a></div></div>
<div class="ttc" id="_open_c_l_8h_xhtml"><div class="ttname"><a href="_open_c_l_8h.xhtml">OpenCL.h</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#l00373">Types.h:373</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#l00153">TensorShape.h:153</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&lt; uint8_t &gt;::type</a></div><div class="ttdeci">uint16_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00109">Utils.h:109</a></div></div>
<div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__unsigned__type_xhtml_aeab553c4422f2a498954db0b4eb15789"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#aeab553c4422f2a498954db0b4eb15789">arm_compute::test::common_promoted_unsigned_type::promoted_type</a></div><div class="ttdeci">traits::promote_t&lt; common_type &gt; promoted_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00392">Utils.h:392</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&amp;#39;s metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00044">TensorInfo.h:44</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a497347573faa3778743ddf277f861094"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a497347573faa3778743ddf277f861094">arm_compute::test::validation::c</a></div><div class="ttdeci">CLTensor c</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00123">GEMM.cpp:123</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#l00372">Types.h:372</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&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; 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="structarm__compute_1_1_quantization_info_xhtml"><div class="ttname"><a href="structarm__compute_1_1_quantization_info.xhtml">arm_compute::QuantizationInfo</a></div><div class="ttdoc">Quantization settings (used for QASYMM8 data type) </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00117">Types.h:117</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#l00071">Utils.h:71</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&lt; T &gt; abs(fixed_point&lt; T &gt; 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="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#l00163">Types.h:163</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#l00375">Types.h:375</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&lt; int &gt;::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#l00072">Types.h:72</a></div></div>
<div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__unsigned__type_xhtml"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml">arm_compute::test::common_promoted_unsigned_type</a></div><div class="ttdoc">Find the unsigned promoted common type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00389">Utils.h:389</a></div></div>
<div class="ttc" id="_g_c_tensor_8h_xhtml"><div class="ttname"><a href="_g_c_tensor_8h.xhtml">GCTensor.h</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#l00108">Utils.h:108</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a19c7b9bc5f36935ba40314907ffe54ce"><div class="ttname"><a href="namespacearm__compute.xhtml#a19c7b9bc5f36935ba40314907ffe54ce">arm_compute::opengles31_is_available</a></div><div class="ttdeci">bool opengles31_is_available()</div><div class="ttdoc">Check if the OpenGL ES 3.1 API is available at runtime. </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&lt; uint16_t &gt;::type</a></div><div class="ttdeci">uint32_t type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00111">Utils.h:111</a></div></div>
<div class="ttc" id="structarm__compute_1_1_valid_region_xhtml_a55a69b397082accd94221dd10b722cf7"><div class="ttname"><a href="structarm__compute_1_1_valid_region.xhtml#a55a69b397082accd94221dd10b722cf7">arm_compute::ValidRegion::anchor</a></div><div class="ttdeci">Coordinates anchor</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00216">Types.h:216</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a8103df0e6c416f55f40106aa49072b42"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a8103df0e6c416f55f40106aa49072b42">arm_compute::test::shape_to_valid_region</a></div><div class="ttdeci">ValidRegion shape_to_valid_region(const TensorShape &amp;a_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#l00212">Utils.h:212</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&lt; T... &gt;::type common_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00381">Utils.h:381</a></div></div>
<div class="ttc" id="structarm__compute_1_1test_1_1common__promoted__unsigned__type_xhtml_a5dc4a681965ff1118a0491b07867c032"><div class="ttname"><a href="structarm__compute_1_1test_1_1common__promoted__unsigned__type.xhtml#a5dc4a681965ff1118a0491b07867c032">arm_compute::test::common_promoted_unsigned_type::common_type</a></div><div class="ttdeci">typename std::common_type&lt; T... &gt;::type common_type</div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00391">Utils.h:391</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_xhtml_a764bac61748afaf8fd0468b2a4cb09be"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a764bac61748afaf8fd0468b2a4cb09be">arm_compute::test::create_multi_image</a></div><div class="ttdeci">T create_multi_image(const TensorShape &amp;shape, Format format)</div><div class="ttdoc">Create and initialize a multi-image of the given type. </div><div class="ttdef"><b>Definition:</b> <a href="tests_2_utils_8h_source.xhtml#l00511">Utils.h:511</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1_c_l_tensor.xhtml">arm_compute::CLTensor</a></div><div class="ttdoc">Basic implementation of the OpenCL tensor interface. </div><div class="ttdef"><b>Definition:</b> <a href="_c_l_tensor_8h_source.xhtml#l00039">CLTensor.h:39</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_59425e443f801f1f2fd8bbe4959a3ccf.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 Fri Mar 2 2018 12:37:52 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>