blob: 7a18a698e09bb27110102b0ba516c783c5e0cc9d [file] [log] [blame]
<!-- HTML header for doxygen 1.8.15-->
<!-- Remember to use version doxygen 1.8.15 +-->
<!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.15"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: src/core/CL/cl_kernels/roi_align_layer_quantized.cl 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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.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;">
<img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
&#160;<span id="projectnumber">20.02.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('roi__align__layer__quantized_8cl_source.xhtml','');});
/* @license-end */
</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">roi_align_layer_quantized.cl</div> </div>
</div><!--header-->
<div class="contents">
<a href="roi__align__layer__quantized_8cl.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) 2019-2020 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">#include &quot;<a class="code" href="helpers__asymm_8h.xhtml">helpers_asymm.h</a>&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="comment">// This specifies the value to shift the result of roi_dims / pooled_dims before ceiling.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="comment">// It is close to the epsilon machine (for a floating point system, x and x+EPS are the same number).</span></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="roi__align__layer__quantized_8cl.xhtml#adb4f942cbd5a43867c692b026c975faa"> 28</a></span>&#160;<span class="preprocessor">#define EPS_GRID 0.00001f</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#if defined(DATA_TYPE) &amp;&amp; defined(POOLED_DIM_X) &amp;&amp; defined(POOLED_DIM_Y) &amp;&amp; defined(MAX_DIM_X) &amp;&amp; defined(MAX_DIM_Y) &amp;&amp; defined(MAX_DIM_Z) &amp;&amp; defined(SPATIAL_SCALE) &amp;&amp; defined(OFFSET_IN) &amp;&amp; defined(OFFSET_OUT) &amp;&amp; defined(SCALE_IN) &amp;&amp; defined(SCALE_OUT) &amp;&amp; defined(OFFSET_ROIS) &amp;&amp; defined(SCALE_ROIS) // Check for compile time constants</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="comment">/** Performs a roi align on a single output pixel.</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="comment"> * @param[in] input Pointer to input Tensor3D struct.</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="comment"> * @param[in] region_start_x Start x index projected onto the input tensor.</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="comment"> * @param[in] region_end_x End x index projected onto the input tensor.</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="comment"> * @param[in] region_start_y Start y index projected onto the input tensor.</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;<span class="comment"> * @param[in] region_end_y End y index projected onto the input tensor.</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment"> * @param[in] pz z index of the input tensor.</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="comment"> * @return An average pooled value from the region specified in the input tensor.</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="keyword">inline</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> <a class="code" href="namespacearm__compute.xhtml#ad04c9c3a53fde2e48e97bbec5dcacd9c">roi_align_1x1</a>(<span class="keyword">const</span> <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, <span class="keywordtype">float</span> region_start_x,</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordtype">float</span> bin_size_x,</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordtype">float</span> grid_size_x,</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordtype">float</span> region_end_x,</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keywordtype">float</span> region_start_y,</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordtype">float</span> bin_size_y,</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <span class="keywordtype">float</span> grid_size_y,</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordtype">float</span> region_end_y,</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keywordtype">int</span> pz)</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="comment">// Iterate through the pooling region</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordtype">float</span> <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> = 0;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> iy = 0; iy &lt; grid_size_y; ++iy)</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="keywordflow">for</span>(<span class="keywordtype">int</span> ix = 0; ix &lt; grid_size_x; ++ix)</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="comment">// Align the window in the middle of every bin</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> y = region_start_y + (iy + 0.5f) * bin_size_y / (<span class="keywordtype">float</span>)grid_size_y;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> x = region_start_x + (ix + 0.5f) * bin_size_x / (<span class="keywordtype">float</span>)grid_size_x;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="comment">// Interpolation in the unit square</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> y_low = (int)y;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> x_low = (int)x;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> y_high = y_low + 1;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> x_high = x_low + 1;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> ly = y - y_low;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> lx = x - x_low;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> hy = 1.f - ly;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> hx = 1.f - lx;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> w1 = hy * hx;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> w2 = hy * lx;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> w3 = ly * hx;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> w4 = ly * lx;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="preprocessor">#if defined(NHWC)</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data1 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, pz, x_low, y_low);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data2 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, pz, x_high, y_low);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data3 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, pz, x_low, y_high);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data4 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, pz, x_high, y_high);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;<span class="preprocessor">#else // !defined(NHWC)</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data1 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, x_low, y_low, pz);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data2 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, x_high, y_low, pz);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data3 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, x_low, y_high, pz);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">const</span> <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> data4 = *(__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>, x_high, y_high, pz);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="preprocessor">#endif // defined(NHWC)</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> data1_f32 = <a class="code" href="helpers__asymm_8h.xhtml#a4f0a8fe9e57d31f7ca26a697ca140029">DEQUANTIZE</a>(data1, OFFSET_IN, SCALE_IN, <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 1);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> data2_f32 = <a class="code" href="helpers__asymm_8h.xhtml#a4f0a8fe9e57d31f7ca26a697ca140029">DEQUANTIZE</a>(data2, OFFSET_IN, SCALE_IN, <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 1);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> data3_f32 = <a class="code" href="helpers__asymm_8h.xhtml#a4f0a8fe9e57d31f7ca26a697ca140029">DEQUANTIZE</a>(data3, OFFSET_IN, SCALE_IN, <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 1);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> data4_f32 = <a class="code" href="helpers__asymm_8h.xhtml#a4f0a8fe9e57d31f7ca26a697ca140029">DEQUANTIZE</a>(data4, OFFSET_IN, SCALE_IN, <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 1);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> += w1 * data1_f32 + w2 * data2_f32 + w3 * data3_f32 + w4 * data4_f32;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; }</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;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> res_f32 = <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> / (grid_size_x * grid_size_y);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">return</span> <a class="code" href="helpers__asymm_8h.xhtml#a85ca50207e80cca8c76b5d3da85e4a9f">QUANTIZE</a>(res_f32, OFFSET_OUT, SCALE_OUT, <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 1);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160;}</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;<span class="comment">/** Performs a roi align function.</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;<span class="comment"> * @note Datatype must be passed using -DDATA_TYPE e.g. -DDATA_TYPE=uchar</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="comment"> * @note Datasize must be passed using -DDATA_SIZE e.g. -DDATA_SIZE=32;</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;<span class="comment"> * @note Input dimensions must be passed using -DMAX_DIM_X, -DMAX_DIM_Y and -DMAX_DIM_Z;</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;<span class="comment"> * @note Pooled region dimensions must be passed using -DPOOLED_DIM_X and -DPOOLED_DIM_Y;</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="comment"> * @note Spatial scale must be passed using -DSPATIAL_SCALE;</span></div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;<span class="comment"> * @note Sampling ratio (i.e., the number of samples in each bin) may be passed using -DSAMPLING_RATIO. If not defined each roi</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;<span class="comment"> * will have a default sampling ratio of roi_dims/pooling_dims</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;<span class="comment"> * @param[in] input_ptr Pointer to the source tensor. Supported data types: QASYMM8</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="comment"> * @param[in] input_stride_x Stride of the source tensor in X dimension (in bytes)</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;<span class="comment"> * @param[in] input_step_x input_stride_x * number of elements along X processed per workitem(in bytes)</span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160;<span class="comment"> * @param[in] input_stride_y Stride of the source tensor in Y dimension (in bytes)</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;<span class="comment"> * @param[in] input_step_y input_stride_y * number of elements along Y processed per workitem(in bytes)</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="comment"> * @param[in] input_stride_z Stride of the source tensor in Z dimension (in bytes)</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="comment"> * @param[in] input_step_z input_stride_z * number of elements along Z processed per workitem(in bytes)</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="comment"> * @param[in] input_offset_first_element_in_bytes The offset of the first element in the pooled region of the source tensor as specifed by ROI</span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;<span class="comment"> * @param[in] rois_ptr Pointer to the ROIs tensor. Layout: { batch_index, x1, y1, x2, y2 }.</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;<span class="comment"> * Supported data types: QASYMM16 with 0.125f scale and 0 offset</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;<span class="comment"> * @param[in] rois_stride_x Stride of the ROIs tensor in X dimension (in bytes)</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;<span class="comment"> * @param[in] rois_step_x Step of the ROIs tensor in X dimension (in bytes)</span></div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;<span class="comment"> * @param[in] rois_stride_y Stride of the ROIs tensor in Y dimension (in bytes)</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;<span class="comment"> * @param[in] rois_step_y Step of the ROIs tensor in Y dimension (in bytes)</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="comment"> * @param[in] rois_offset_first_element_in_bytes The offset of the first element in the ROIs tensor</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="comment"> * @param[out] output_ptr Pointer to the destination tensor. Supported data types: Supported data types: same as @p input_ptr</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="comment"> * @param[in] output_stride_x Stride of the destination tensor in X dimension (in bytes)</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="comment"> * @param[in] output_step_x output_stride_x * number of elements along X processed per workitem(in bytes)</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="comment"> * @param[in] output_stride_y Stride of the destination tensor in Y dimension (in bytes)</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="comment"> * @param[in] output_step_y output_stride_y * number of elements along Y processed per workitem(in bytes)</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="comment"> * @param[in] output_stride_z Stride of the destination tensor in Z dimension (in bytes)</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="comment"> * @param[in] output_step_z output_stride_z * number of elements along Z processed per workitem(in bytes)</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="comment"> * @param[in] output_offset_first_element_in_bytes The offset of the first element in the destination tensor</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="comment"> * @param[in] input_stride_w Stride of the source tensor in W dimension (in bytes)</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="comment"> * @param[in] output_stride_w Stride of the destination tensor in W dimension (in bytes)</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;__kernel <span class="keywordtype">void</span> roi_align_layer_quantized(</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a6b83038822d1ae7ab619b684ed3b7fc0">TENSOR3D_DECLARATION</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>),</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a22f42fcf2077d951271df83b55c1a71a">IMAGE_DECLARATION</a>(rois),</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a6b83038822d1ae7ab619b684ed3b7fc0">TENSOR3D_DECLARATION</a>(output),</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_stride_w, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_stride_w)</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> rois = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(rois);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>(output);</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;<span class="preprocessor">#if defined(NHWC)</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> px = get_global_id(1);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> py = get_global_id(2);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> pw = get_global_id(0);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;<span class="preprocessor">#else // !defined(NHWC)</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> px = get_global_id(0);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> py = get_global_id(1);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> pw = get_global_id(2);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor">#endif // defined(NHWC)</span></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="comment">// Load roi parameters</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="comment">// roi is laid out as follows { batch_index, x1, y1, x2, y2 }</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keyword">const</span> ushort roi_batch = *((__global ushort *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;rois, 0, pw));</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; float4 roi = <a class="code" href="helpers__asymm_8h.xhtml#a4f0a8fe9e57d31f7ca26a697ca140029">DEQUANTIZE</a>(vload4(0, (__global ushort *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;rois, 1, pw)), OFFSET_ROIS, SCALE_ROIS, ushort, 4);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; float2 roi_anchor = roi.s01 * convert_float(SPATIAL_SCALE);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; float2 roi_dims = fmax((roi.s23 - roi.s01) * convert_float(SPATIAL_SCALE), 1.f);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="comment">// Calculate pooled region start and end</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; float2 spatial_indx = (float2)(px, py);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; float2 pooled_dims = (float2)(POOLED_DIM_X, POOLED_DIM_Y);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; float2 max_spatial_dims = (float2)(MAX_DIM_X, MAX_DIM_Y);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; float2 bin_size = (float2)((roi_dims.s0 / (<span class="keywordtype">float</span>)POOLED_DIM_X), (roi_dims.s1 / (<span class="keywordtype">float</span>)POOLED_DIM_Y));</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; float2 region_start = spatial_indx * bin_size + roi_anchor;</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; float2 region_end = (spatial_indx + 1) * bin_size + roi_anchor;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; region_start = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a96efecf997f13a914609ddf1eb67f624">clamp</a>(region_start, 0, max_spatial_dims);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; region_end = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a96efecf997f13a914609ddf1eb67f624">clamp</a>(region_end, 0, max_spatial_dims);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160;<span class="preprocessor">#if defined(SAMPLING_RATIO)</span></div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; float2 roi_bin_grid = SAMPLING_RATIO;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;<span class="preprocessor">#else // !defined(SAMPLING_RATIO)</span></div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// Note that we subtract EPS_GRID before ceiling. This is to avoid situations where 1.000001 gets ceiled to 2.</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; float2 roi_bin_grid = ceil(bin_size - <a class="code" href="roi__align__layer__quantized_8cl.xhtml#adb4f942cbd5a43867c692b026c975faa">EPS_GRID</a>);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;<span class="preprocessor">#endif // defined(SAMPLING_RATIO)</span></div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="comment">// Move input and output pointer across the fourth dimension</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>.ptr += roi_batch * input_stride_w;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> += pw * output_stride_w;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> pz = 0; pz &lt; MAX_DIM_Z; ++pz)</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; {</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="preprocessor">#if defined(NHWC)</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; __global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *_output_ptr = (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;output, pz, px, py);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;<span class="preprocessor">#else // !defined(NHWC)</span></div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; __global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *_output_ptr = (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;output, px, py, pz);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;<span class="preprocessor">#endif // defined(NHWC)</span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; *_output_ptr = (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>)<a class="code" href="namespacearm__compute.xhtml#ad04c9c3a53fde2e48e97bbec5dcacd9c">roi_align_1x1</a>(&amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>,</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; region_start.x,</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; bin_size.x,</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; roi_bin_grid.x,</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; region_end.x,</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; region_start.y,</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; bin_size.y,</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; roi_bin_grid.y,</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; region_end.y, pz);</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; }</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;}</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="preprocessor">#endif // Check for compile time constants</span></div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00510">helpers.h:510</a></div></div>
<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
<div class="ttc" id="reduction__operation_8cl_xhtml_ab0df00f5333da51860deb93deb44a782"><div class="ttname"><a href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a></div><div class="ttdeci">DATA_TYPE sum(__global const DATA_TYPE *input)</div><div class="ttdoc">Calculate sum of a vector.</div><div class="ttdef"><b>Definition:</b> <a href="reduction__operation_8cl_source.xhtml#l00066">reduction_operation.cl:66</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a22f42fcf2077d951271df83b55c1a71a"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a22f42fcf2077d951271df83b55c1a71a">IMAGE_DECLARATION</a></div><div class="ttdeci">#define IMAGE_DECLARATION(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00275">helpers.h:275</a></div></div>
<div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00358">helpers.h:358</a></div></div>
<div class="ttc" id="roi__align__layer__quantized_8cl_xhtml_adb4f942cbd5a43867c692b026c975faa"><div class="ttname"><a href="roi__align__layer__quantized_8cl.xhtml#adb4f942cbd5a43867c692b026c975faa">EPS_GRID</a></div><div class="ttdeci">#define EPS_GRID</div><div class="ttdef"><b>Definition:</b> <a href="roi__align__layer__quantized_8cl_source.xhtml#l00028">roi_align_layer_quantized.cl:28</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a8fcf2ddd9a1d58b1b280f5c0aed71845"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">arm_compute::test::validation::input</a></div><div class="ttdeci">auto input</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00487">LSTMLayerQuantized.cpp:487</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a96efecf997f13a914609ddf1eb67f624"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a96efecf997f13a914609ddf1eb67f624">arm_compute::utility::clamp</a></div><div class="ttdeci">DataType clamp(const DataType &amp;n, const DataType &amp;lower=std::numeric_limits&lt; RangeType &gt;::lowest(), const DataType &amp;upper=std::numeric_limits&lt; RangeType &gt;::max())</div><div class="ttdoc">Performs clamping among a lower and upper value.</div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00099">Utility.h:99</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00314">helpers.h:314</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a79e8e562daa6599317d2d1cd86ef1bf2"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00330">helpers.h:330</a></div></div>
<div class="ttc" id="helpers__asymm_8h_xhtml_a4f0a8fe9e57d31f7ca26a697ca140029"><div class="ttname"><a href="helpers__asymm_8h.xhtml#a4f0a8fe9e57d31f7ca26a697ca140029">DEQUANTIZE</a></div><div class="ttdeci">#define DEQUANTIZE(input, offset, scale, type, size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers__asymm_8h_source.xhtml#l00381">helpers_asymm.h:381</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad04c9c3a53fde2e48e97bbec5dcacd9c"><div class="ttname"><a href="namespacearm__compute.xhtml#ad04c9c3a53fde2e48e97bbec5dcacd9c">arm_compute::roi_align_1x1</a></div><div class="ttdeci">input_data_type roi_align_1x1(const ITensor *input, unsigned int roi_batch, float region_start_x, float bin_size_x, int grid_size_x, float region_end_x, float region_start_y, float bin_size_y, int grid_size_y, float region_end_y, int pz)</div><div class="ttdoc">Average pooling over an aligned window.</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_r_o_i_align_layer_kernel_8cpp_source.xhtml#l00135">NEROIAlignLayerKernel.cpp:135</a></div></div>
<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div>
<div class="ttc" id="helpers__asymm_8h_xhtml"><div class="ttname"><a href="helpers__asymm_8h.xhtml">helpers_asymm.h</a></div></div>
<div class="ttc" id="helpers__asymm_8h_xhtml_a85ca50207e80cca8c76b5d3da85e4a9f"><div class="ttname"><a href="helpers__asymm_8h.xhtml#a85ca50207e80cca8c76b5d3da85e4a9f">QUANTIZE</a></div><div class="ttdeci">#define QUANTIZE(input, offset, scale, type, size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers__asymm_8h_source.xhtml#l00379">helpers_asymm.h:379</a></div></div>
<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00360">helpers.h:360</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a6b83038822d1ae7ab619b684ed3b7fc0"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a6b83038822d1ae7ab619b684ed3b7fc0">TENSOR3D_DECLARATION</a></div><div class="ttdeci">#define TENSOR3D_DECLARATION(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00283">helpers.h:283</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a></div><div class="ttdeci">__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)</div><div class="ttdoc">Get the pointer position of a Tensor3D.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00522">helpers.h:522</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_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="roi__align__layer__quantized_8cl.xhtml">roi_align_layer_quantized.cl</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:06:58 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>