blob: c4c6e72ebaefbe01fcb7f8826613f468a2232287 [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_pooling_layer.cl File Reference</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__pooling__layer_8cl.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="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">roi_pooling_layer.cl File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
</div>
<p><a href="roi__pooling__layer_8cl_source.xhtml">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa841846d3e0f01df176038026eab8e25"><td class="memItemLeft" align="right" valign="top"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="roi__pooling__layer_8cl.xhtml#aa841846d3e0f01df176038026eab8e25">vec4_max</a> (DATA_TYPE4 vec)</td></tr>
<tr class="separator:aa841846d3e0f01df176038026eab8e25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03ae72789bf65b85136cb5356b4c189b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="roi__pooling__layer_8cl.xhtml#a03ae72789bf65b85136cb5356b4c189b">vec8_max</a> (DATA_TYPE8 vec)</td></tr>
<tr class="separator:a03ae72789bf65b85136cb5356b4c189b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="roi__pooling__layer_8cl.xhtml#aa23d7bc09d4a60b853c5b3ba5425c2ec">roi_pool_1x1</a> (const <a class="el" href="struct_tensor3_d.xhtml">Tensor3D</a> *input, int region_start_x, int region_end_x, int region_start_y, int region_end_y, int pz)</td></tr>
<tr class="memdesc:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a roi pooling on a single output pixel. <a href="#aa23d7bc09d4a60b853c5b3ba5425c2ec">More...</a><br /></td></tr>
<tr class="separator:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2225a0fdbe433c31126daa25249acd8b"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="roi__pooling__layer_8cl.xhtml#a2225a0fdbe433c31126daa25249acd8b">roi_pooling_layer</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_stride_z, uint input_step_z, uint input_offset_first_element_in_bytes, __global uchar *rois_ptr, uint rois_stride_x, uint rois_step_x, uint rois_stride_y, uint rois_step_y, uint rois_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_stride_z, uint output_step_z, uint output_offset_first_element_in_bytes, unsigned int input_stride_w, unsigned int output_stride_w)</td></tr>
<tr class="memdesc:a2225a0fdbe433c31126daa25249acd8b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a roi pooling function. <a href="#a2225a0fdbe433c31126daa25249acd8b">More...</a><br /></td></tr>
<tr class="separator:a2225a0fdbe433c31126daa25249acd8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="aa23d7bc09d4a60b853c5b3ba5425c2ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa23d7bc09d4a60b853c5b3ba5425c2ec">&#9670;&nbsp;</a></span>roi_pool_1x1()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> roi_pool_1x1 </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="struct_tensor3_d.xhtml">Tensor3D</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>region_start_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>region_end_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>region_start_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>region_end_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>pz</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs a roi pooling on a single output pixel. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Pointer to input <a class="el" href="struct_tensor3_d.xhtml" title="Structure to hold 3D tensor information.">Tensor3D</a> struct. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">region_start_x</td><td>Start x index projected onto the input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">region_end_x</td><td>End x index projected onto the input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">region_start_y</td><td>Start y index projected onto the input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">region_end_y</td><td>End y index projected onto the input tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pz</td><td>z index of the input tensor.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A max pooled value from the region specified in the input tensor. </dd></dl>
<p class="definition">Definition at line <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00061">61</a> of file <a class="el" href="roi__pooling__layer_8cl_source.xhtml">roi_pooling_layer.cl</a>.</p>
<div class="fragment"><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">// Iterate through the pooling region</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordflow">if</span>((region_end_x &lt;= region_start_x) || (region_end_y &lt;= region_start_y))</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordflow">return</span> (<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>)0;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; }</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordtype">int</span> num_iter = (int)((region_end_x - region_start_x) / <a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, <a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>)</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; curr_max = (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, <a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>))(-FLT_MAX);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = region_start_y; j &lt; region_end_y; ++j)</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; <span class="keywordtype">int</span> i = region_start_x;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">for</span>(; i &lt; region_start_x + num_iter * <a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>; i += <a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, <a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; val = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a>(<a class="code" href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a>)(0, (__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>, i, j, pz));</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; curr_max = fmax(val, curr_max);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">for</span>(; i &lt; region_end_x; ++i)</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; {</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> val = *(__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>, i, j, pz);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; curr_max = fmax(curr_max, val);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; }</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordflow">return</span> (<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>)VEC_MAX(curr_max);</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;}</div><div class="ttc" id="depthwise__convolution__quantized_8cl_xhtml_a3fffea119c04c7680f2e9cf3fadf63b4"><div class="ttname"><a href="depthwise__convolution__quantized_8cl.xhtml#a3fffea119c04c7680f2e9cf3fadf63b4">VEC_SIZE</a></div><div class="ttdeci">#define VEC_SIZE</div><div class="ttdef"><b>Definition:</b> <a href="depthwise__convolution__quantized_8cl_source.xhtml#l00031">depthwise_convolution_quantized.cl:31</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="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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a287e2fc366c312b468382c95bb90f91f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a></div><div class="ttdeci">#define VLOAD(size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00195">helpers.h:195</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 class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">helpers.h:255</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00487">arm_compute::test::validation::input</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00522">tensor3D_offset()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">VEC_DATA_TYPE</a>, <a class="el" href="depthwise__convolution__quantized_8cl_source.xhtml#l00031">VEC_SIZE</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00195">VLOAD</a>.</p>
<p class="reference">Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00125">roi_pooling_layer()</a>.</p>
</div>
</div>
<a id="a2225a0fdbe433c31126daa25249acd8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2225a0fdbe433c31126daa25249acd8b">&#9670;&nbsp;</a></span>roi_pooling_layer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">__kernel void roi_pooling_layer </td>
<td>(</td>
<td class="paramtype">__global uchar *&#160;</td>
<td class="paramname"><em>input_ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_stride_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_step_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_stride_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_step_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_stride_z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_step_z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">__global uchar *&#160;</td>
<td class="paramname"><em>rois_ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>rois_stride_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>rois_step_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>rois_stride_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>rois_step_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>rois_offset_first_element_in_bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">__global uchar *&#160;</td>
<td class="paramname"><em>output_ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_stride_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_step_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_stride_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_step_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_stride_z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_step_z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint&#160;</td>
<td class="paramname"><em>output_offset_first_element_in_bytes</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>input_stride_w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>output_stride_w</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Performs a roi pooling function. </p>
<dl class="section note"><dt>Note</dt><dd>Datatype must be passed using -DDATA_TYPE e.g. -DDATA_TYPE=float. Supported data types are F16, F32; </dd>
<dd>
Datasize must be passed using -DDATA_SIZE e.g. -DDATA_SIZE=32; </dd>
<dd>
Input dimensions must be passed using -DMAX_DIM_X, -DMAX_DIM_Y and -DMAX_DIM_Z; </dd>
<dd>
Pooled region dimensions must be passed using -DPOOLED_DIM_X and -DPOOLED_DIM_Y; </dd>
<dd>
Spatial scale must be passed using -DSPATIAL_SCALE;</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported data types: F16, F32 </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_step_z</td><td>input_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the pooled region of the source image as specifed by ROI </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois_ptr</td><td>Pointer to the ROIs tensor. Layout: { batch_index, x1, y1, x2, y2 }. Supported data types: same as <code>input_ptr</code> </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois_stride_x</td><td>Stride of the ROIs tensor in X dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois_step_x</td><td>Step of the ROIs tensor in X dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois_stride_y</td><td>Stride of the ROIs tensor in Y dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois_step_y</td><td>Step of the ROIs tensor in Y dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois_offset_first_element_in_bytes</td><td>The offset of the first element in the ROIs tensor </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported data types: F16, F32 </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_stride_z</td><td>Stride of the destination tensor in Z dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_step_z</td><td>output_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input_stride_w</td><td>Stride of the source image in W dimension (in bytes) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">output_stride_w</td><td>Stride of the destination image in W dimension (in bytes) </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00125">125</a> of file <a class="el" href="roi__pooling__layer_8cl_source.xhtml">roi_pooling_layer.cl</a>.</p>
<div class="fragment"><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; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</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="l00133"></a><span class="lineno"> 133</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="l00134"></a><span class="lineno"> 134</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="l00135"></a><span class="lineno"> 135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> px = get_global_id(0);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> py = get_global_id(1);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> pw = get_global_id(2);</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="comment">// Load roi parameters</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="comment">// roi is laid out as follows { batch_index, x1, y1, x2, y2 }</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keyword">const</span> ushort roi_batch = (ushort) * ((__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#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;rois, 0, pw));</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">const</span> <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 4)</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; roi = vload4(0, (__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#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;rois, 1, pw));</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; const int2 roi_anchor = convert_int2_sat(<a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(convert_float2(roi.s01) * (<span class="keywordtype">float</span>)SPATIAL_SCALE));</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; const int2 roi_dims = convert_int2_sat(fmax(<a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(convert_float2(roi.s23 - roi.s01) * (<span class="keywordtype">float</span>)SPATIAL_SCALE), 1.f));</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// Calculate pooled region start and end</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; const float2 spatial_indx = (float2)(px, py);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; const float2 pooled_dims = (float2)(POOLED_DIM_X, POOLED_DIM_Y);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; const int2 max_spatial_dims = (int2)(MAX_DIM_X, MAX_DIM_Y);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; int2 region_start = convert_int2_sat(floor(spatial_indx / pooled_dims * convert_float2(roi_dims))) + roi_anchor;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; int2 region_end = convert_int2_sat(floor((spatial_indx + 1) / pooled_dims * convert_float2(roi_dims))) + roi_anchor;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</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="l00156"></a><span class="lineno"> 156</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="l00157"></a><span class="lineno"> 157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">// Move input and output pointer across the fourth dimension</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</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="l00160"></a><span class="lineno"> 160</span>&#160; output.ptr += pw * output_stride_w;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a0886942393a3ba0dfefaa7516b159784">for</a>(<span class="keywordtype">int</span> pz = 0; pz &lt; MAX_DIM_Z; ++pz)</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; {</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; *(__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) = (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>)<a class="code" href="roi__pooling__layer_8cl.xhtml#aa23d7bc09d4a60b853c5b3ba5425c2ec">roi_pool_1x1</a>(&amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a8fcf2ddd9a1d58b1b280f5c0aed71845">input</a>,</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; region_start.x,</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; region_end.x,</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; region_start.y,</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; region_end.y, pz);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; }</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;}</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="namespacearm__compute_1_1test_1_1validation_xhtml_a0886942393a3ba0dfefaa7516b159784"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a0886942393a3ba0dfefaa7516b159784">arm_compute::test::validation::for</a></div><div class="ttdeci">for(size_t k=0;k&lt; _target.size();++k)</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_unstack_8cpp_source.xhtml#l00091">Unstack.cpp:91</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="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="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="namespacearm__compute_xhtml_aaae2b6b1c3f4404121346a4c27b22647"><div class="ttname"><a href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">arm_compute::round</a></div><div class="ttdeci">int round(float x, RoundingPolicy rounding_policy)</div><div class="ttdoc">Return a rounded value of x.</div><div class="ttdef"><b>Definition:</b> <a href="_rounding_8cpp_source.xhtml#l00035">Rounding.cpp:35</a></div></div>
<div class="ttc" id="roi__pooling__layer_8cl_xhtml_aa23d7bc09d4a60b853c5b3ba5425c2ec"><div class="ttname"><a href="roi__pooling__layer_8cl.xhtml#aa23d7bc09d4a60b853c5b3ba5425c2ec">roi_pool_1x1</a></div><div class="ttdeci">DATA_TYPE roi_pool_1x1(const Tensor3D *input, int region_start_x, int region_end_x, int region_start_y, int region_end_y, int pz)</div><div class="ttdoc">Performs a roi pooling on a single output pixel.</div><div class="ttdef"><b>Definition:</b> <a href="roi__pooling__layer_8cl_source.xhtml#l00061">roi_pooling_layer.cl:61</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 class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">helpers.h:255</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_utility_8h_source.xhtml#l00099">arm_compute::utility::clamp()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00314">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00330">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00487">arm_compute::test::validation::input</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00510">offset()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00360">Tensor3D::ptr</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00061">roi_pool_1x1()</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00522">tensor3D_offset()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">VEC_DATA_TYPE</a>.</p>
</div>
</div>
<a id="aa841846d3e0f01df176038026eab8e25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa841846d3e0f01df176038026eab8e25">&#9670;&nbsp;</a></span>vec4_max()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec4_max </td>
<td>(</td>
<td class="paramtype">DATA_TYPE4&#160;</td>
<td class="paramname"><em>vec</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00036">36</a> of file <a class="el" href="roi__pooling__layer_8cl_source.xhtml">roi_pooling_layer.cl</a>.</p>
<div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;{</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 2)</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; temp = fmax(vec.lo, vec.hi);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; return fmax(temp.x, temp.y);</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;}</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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">helpers.h:255</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">VEC_DATA_TYPE</a>.</p>
<p class="reference">Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">vec8_max()</a>.</p>
</div>
</div>
<a id="a03ae72789bf65b85136cb5356b4c189b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03ae72789bf65b85136cb5356b4c189b">&#9670;&nbsp;</a></span>vec8_max()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec8_max </td>
<td>(</td>
<td class="paramtype">DATA_TYPE8&#160;</td>
<td class="paramname"><em>vec</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">43</a> of file <a class="el" href="roi__pooling__layer_8cl_source.xhtml">roi_pooling_layer.cl</a>.</p>
<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;{</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 4)</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; temp = fmax(vec.lo, vec.hi);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; return <a class="code" href="roi__pooling__layer_8cl.xhtml#aa841846d3e0f01df176038026eab8e25">vec4_max</a>(temp);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;}</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="roi__pooling__layer_8cl_xhtml_aa841846d3e0f01df176038026eab8e25"><div class="ttname"><a href="roi__pooling__layer_8cl.xhtml#aa841846d3e0f01df176038026eab8e25">vec4_max</a></div><div class="ttdeci">DATA_TYPE vec4_max(DATA_TYPE4 vec)</div><div class="ttdef"><b>Definition:</b> <a href="roi__pooling__layer_8cl_source.xhtml#l00036">roi_pooling_layer.cl:36</a></div></div>
<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">helpers.h:255</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00036">vec4_max()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00255">VEC_DATA_TYPE</a>.</p>
</div>
</div>
</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__pooling__layer_8cl.xhtml">roi_pooling_layer.cl</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:07:07 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>