blob: 0a066a166940512a16dd9f9d9b7d064dd88f55cd [file] [log] [blame]
Jenkins514be652019-02-28 12:25:18 +00001<!-- HTML header for doxygen 1.8.15-->
2<!-- Remember to use version doxygen 1.8.15 +-->
Kaizen8938bd32017-09-28 14:38:23 +01003<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml">
5<head>
6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkins514be652019-02-28 12:25:18 +00008<meta name="generator" content="Doxygen 1.8.15"/>
Kaizen8938bd32017-09-28 14:38:23 +01009<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
10<title>Compute Library: src/core/CL/cl_kernels/roi_pooling_layer.cl File Reference</title>
11<link href="tabs.css" rel="stylesheet" type="text/css"/>
12<script type="text/javascript" src="jquery.js"></script>
13<script type="text/javascript" src="dynsections.js"></script>
14<link href="navtree.css" rel="stylesheet" type="text/css"/>
15<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000016<script type="text/javascript" src="navtreedata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010017<script type="text/javascript" src="navtree.js"></script>
18<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000019/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Kaizen8938bd32017-09-28 14:38:23 +010020 $(document).ready(initResizable);
Jenkins514be652019-02-28 12:25:18 +000021/* @license-end */</script>
Kaizen8938bd32017-09-28 14:38:23 +010022<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000023<script type="text/javascript" src="search/searchdata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010024<script type="text/javascript" src="search/search.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010025<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Jenkins514be652019-02-28 12:25:18 +000030</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010031<link href="doxygen.css" rel="stylesheet" type="text/css" />
Jenkins514be652019-02-28 12:25:18 +000032<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
Kaizen8938bd32017-09-28 14:38:23 +010033</head>
34<body>
35<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
36<div id="titlearea">
37<table cellspacing="0" cellpadding="0">
38 <tbody>
39 <tr style="height: 56px;">
Jenkins514be652019-02-28 12:25:18 +000040 <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"/>
Kaizen8938bd32017-09-28 14:38:23 +010041 <td style="padding-left: 0.5em;">
Jenkins514be652019-02-28 12:25:18 +000042 <div id="projectname">
Jenkins7f09cf72020-01-22 18:08:16 +000043 &#160;<span id="projectnumber">19.11.1</span>
Kaizen8938bd32017-09-28 14:38:23 +010044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Jenkins514be652019-02-28 12:25:18 +000051<!-- Generated by Doxygen 1.8.15 -->
Kaizen8938bd32017-09-28 14:38:23 +010052<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000053/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Kaizen8938bd32017-09-28 14:38:23 +010054var searchBox = new SearchBox("searchBox", "search",false,'Search');
Jenkins514be652019-02-28 12:25:18 +000055/* @license-end */
Kaizen8938bd32017-09-28 14:38:23 +010056</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000057<script type="text/javascript" src="menudata.js"></script>
58<script type="text/javascript" src="menu.js"></script>
59<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000060/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Jenkinsb9abeae2018-11-22 11:58:08 +000061$(function() {
62 initMenu('',true,false,'search.php','Search');
63 $(document).ready(function() { init_search(); });
64});
Jenkins514be652019-02-28 12:25:18 +000065/* @license-end */</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000066<div id="main-nav"></div>
Kaizen8938bd32017-09-28 14:38:23 +010067</div><!-- top -->
68<div id="side-nav" class="ui-resizable side-nav-resizable">
69 <div id="nav-tree">
70 <div id="nav-tree-contents">
71 <div id="nav-sync" class="sync"></div>
72 </div>
73 </div>
74 <div id="splitbar" style="-moz-user-select:none;"
75 class="ui-resizable-handle">
76 </div>
77</div>
78<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000079/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Kaizen8938bd32017-09-28 14:38:23 +010080$(document).ready(function(){initNavTree('roi__pooling__layer_8cl.xhtml','');});
Jenkins514be652019-02-28 12:25:18 +000081/* @license-end */
Kaizen8938bd32017-09-28 14:38:23 +010082</script>
83<div id="doc-content">
84<!-- window showing the filter options -->
85<div id="MSearchSelectWindow"
86 onmouseover="return searchBox.OnSearchSelectShow()"
87 onmouseout="return searchBox.OnSearchSelectHide()"
88 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000089</div>
Kaizen8938bd32017-09-28 14:38:23 +010090
91<!-- iframe showing the search results (closed by default) -->
92<div id="MSearchResultsWindow">
93<iframe src="javascript:void(0)" frameborder="0"
94 name="MSearchResults" id="MSearchResults">
95</iframe>
96</div>
97
98<div class="header">
99 <div class="summary">
100<a href="#func-members">Functions</a> </div>
101 <div class="headertitle">
102<div class="title">roi_pooling_layer.cl File Reference</div> </div>
103</div><!--header-->
104<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +0000105<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 />
Kaizen8938bd32017-09-28 14:38:23 +0100106</div>
107<p><a href="roi__pooling__layer_8cl_source.xhtml">Go to the source code of this file.</a></p>
108<table class="memberdecls">
109<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
110Functions</h2></td></tr>
111<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>
112<tr class="separator:aa841846d3e0f01df176038026eab8e25"><td class="memSeparator" colspan="2">&#160;</td></tr>
113<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>
114<tr class="separator:a03ae72789bf65b85136cb5356b4c189b"><td class="memSeparator" colspan="2">&#160;</td></tr>
115<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>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000116<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>
Kaizen8938bd32017-09-28 14:38:23 +0100117<tr class="separator:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
Jenkins514be652019-02-28 12:25:18 +0000118<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>
119<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>
120<tr class="separator:a2225a0fdbe433c31126daa25249acd8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100121</table>
122<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000123<a id="aa23d7bc09d4a60b853c5b3ba5425c2ec"></a>
124<h2 class="memtitle"><span class="permalink"><a href="#aa23d7bc09d4a60b853c5b3ba5425c2ec">&#9670;&nbsp;</a></span>roi_pool_1x1()</h2>
125
Kaizen8938bd32017-09-28 14:38:23 +0100126<div class="memitem">
127<div class="memproto">
128<table class="mlabels">
129 <tr>
130 <td class="mlabels-left">
131 <table class="memname">
132 <tr>
133 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> roi_pool_1x1 </td>
134 <td>(</td>
135 <td class="paramtype">const <a class="el" href="struct_tensor3_d.xhtml">Tensor3D</a> *&#160;</td>
136 <td class="paramname"><em>input</em>, </td>
137 </tr>
138 <tr>
139 <td class="paramkey"></td>
140 <td></td>
141 <td class="paramtype">int&#160;</td>
142 <td class="paramname"><em>region_start_x</em>, </td>
143 </tr>
144 <tr>
145 <td class="paramkey"></td>
146 <td></td>
147 <td class="paramtype">int&#160;</td>
148 <td class="paramname"><em>region_end_x</em>, </td>
149 </tr>
150 <tr>
151 <td class="paramkey"></td>
152 <td></td>
153 <td class="paramtype">int&#160;</td>
154 <td class="paramname"><em>region_start_y</em>, </td>
155 </tr>
156 <tr>
157 <td class="paramkey"></td>
158 <td></td>
159 <td class="paramtype">int&#160;</td>
160 <td class="paramname"><em>region_end_y</em>, </td>
161 </tr>
162 <tr>
163 <td class="paramkey"></td>
164 <td></td>
165 <td class="paramtype">int&#160;</td>
166 <td class="paramname"><em>pz</em>&#160;</td>
167 </tr>
168 <tr>
169 <td></td>
170 <td>)</td>
171 <td></td><td></td>
172 </tr>
173 </table>
174 </td>
175 <td class="mlabels-right">
176<span class="mlabels"><span class="mlabel">inline</span></span> </td>
177 </tr>
178</table>
179</div><div class="memdoc">
180
181<p>Performs a roi pooling on a single output pixel. </p>
182<dl class="params"><dt>Parameters</dt><dd>
183 <table class="params">
Jenkins514be652019-02-28 12:25:18 +0000184 <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>
Kaizen8938bd32017-09-28 14:38:23 +0100185 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_x</td><td>Start x index projected onto the input tensor. </td></tr>
186 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_x</td><td>End x index projected onto the input tensor. </td></tr>
187 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_y</td><td>Start y index projected onto the input tensor. </td></tr>
188 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_y</td><td>End y index projected onto the input tensor. </td></tr>
189 <tr><td class="paramdir">[in]</td><td class="paramname">pz</td><td>z index of the input tensor.</td></tr>
190 </table>
191 </dd>
192</dl>
193<dl class="section return"><dt>Returns</dt><dd>A max pooled value from the region specified in the input tensor. </dd></dl>
194
Jenkinsb9abeae2018-11-22 11:58:08 +0000195<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>
Jenkins0e205f72019-11-28 16:53:35 +0000196<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>
197<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>
198<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>
199<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>
200<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>
201<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>
Kaizen8938bd32017-09-28 14:38:23 +0100202</div><!-- fragment -->
Jenkins0e205f72019-11-28 16:53:35 +0000203<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>
Jenkins514be652019-02-28 12:25:18 +0000204
205<p class="reference">Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00125">roi_pooling_layer()</a>.</p>
206
Kaizen8938bd32017-09-28 14:38:23 +0100207</div>
208</div>
Jenkins514be652019-02-28 12:25:18 +0000209<a id="a2225a0fdbe433c31126daa25249acd8b"></a>
210<h2 class="memtitle"><span class="permalink"><a href="#a2225a0fdbe433c31126daa25249acd8b">&#9670;&nbsp;</a></span>roi_pooling_layer()</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000211
Kaizen8938bd32017-09-28 14:38:23 +0100212<div class="memitem">
213<div class="memproto">
214 <table class="memname">
215 <tr>
216 <td class="memname">__kernel void roi_pooling_layer </td>
217 <td>(</td>
218 <td class="paramtype">__global uchar *&#160;</td>
219 <td class="paramname"><em>input_ptr</em>, </td>
220 </tr>
221 <tr>
222 <td class="paramkey"></td>
223 <td></td>
224 <td class="paramtype">uint&#160;</td>
225 <td class="paramname"><em>input_stride_x</em>, </td>
226 </tr>
227 <tr>
228 <td class="paramkey"></td>
229 <td></td>
230 <td class="paramtype">uint&#160;</td>
231 <td class="paramname"><em>input_step_x</em>, </td>
232 </tr>
233 <tr>
234 <td class="paramkey"></td>
235 <td></td>
236 <td class="paramtype">uint&#160;</td>
237 <td class="paramname"><em>input_stride_y</em>, </td>
238 </tr>
239 <tr>
240 <td class="paramkey"></td>
241 <td></td>
242 <td class="paramtype">uint&#160;</td>
243 <td class="paramname"><em>input_step_y</em>, </td>
244 </tr>
245 <tr>
246 <td class="paramkey"></td>
247 <td></td>
248 <td class="paramtype">uint&#160;</td>
249 <td class="paramname"><em>input_stride_z</em>, </td>
250 </tr>
251 <tr>
252 <td class="paramkey"></td>
253 <td></td>
254 <td class="paramtype">uint&#160;</td>
255 <td class="paramname"><em>input_step_z</em>, </td>
256 </tr>
257 <tr>
258 <td class="paramkey"></td>
259 <td></td>
260 <td class="paramtype">uint&#160;</td>
261 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
262 </tr>
263 <tr>
264 <td class="paramkey"></td>
265 <td></td>
266 <td class="paramtype">__global uchar *&#160;</td>
267 <td class="paramname"><em>rois_ptr</em>, </td>
268 </tr>
269 <tr>
270 <td class="paramkey"></td>
271 <td></td>
272 <td class="paramtype">uint&#160;</td>
273 <td class="paramname"><em>rois_stride_x</em>, </td>
274 </tr>
275 <tr>
276 <td class="paramkey"></td>
277 <td></td>
278 <td class="paramtype">uint&#160;</td>
279 <td class="paramname"><em>rois_step_x</em>, </td>
280 </tr>
281 <tr>
282 <td class="paramkey"></td>
283 <td></td>
284 <td class="paramtype">uint&#160;</td>
Jenkins514be652019-02-28 12:25:18 +0000285 <td class="paramname"><em>rois_stride_y</em>, </td>
286 </tr>
287 <tr>
288 <td class="paramkey"></td>
289 <td></td>
290 <td class="paramtype">uint&#160;</td>
291 <td class="paramname"><em>rois_step_y</em>, </td>
292 </tr>
293 <tr>
294 <td class="paramkey"></td>
295 <td></td>
296 <td class="paramtype">uint&#160;</td>
Kaizen8938bd32017-09-28 14:38:23 +0100297 <td class="paramname"><em>rois_offset_first_element_in_bytes</em>, </td>
298 </tr>
299 <tr>
300 <td class="paramkey"></td>
301 <td></td>
302 <td class="paramtype">__global uchar *&#160;</td>
303 <td class="paramname"><em>output_ptr</em>, </td>
304 </tr>
305 <tr>
306 <td class="paramkey"></td>
307 <td></td>
308 <td class="paramtype">uint&#160;</td>
309 <td class="paramname"><em>output_stride_x</em>, </td>
310 </tr>
311 <tr>
312 <td class="paramkey"></td>
313 <td></td>
314 <td class="paramtype">uint&#160;</td>
315 <td class="paramname"><em>output_step_x</em>, </td>
316 </tr>
317 <tr>
318 <td class="paramkey"></td>
319 <td></td>
320 <td class="paramtype">uint&#160;</td>
321 <td class="paramname"><em>output_stride_y</em>, </td>
322 </tr>
323 <tr>
324 <td class="paramkey"></td>
325 <td></td>
326 <td class="paramtype">uint&#160;</td>
327 <td class="paramname"><em>output_step_y</em>, </td>
328 </tr>
329 <tr>
330 <td class="paramkey"></td>
331 <td></td>
332 <td class="paramtype">uint&#160;</td>
333 <td class="paramname"><em>output_stride_z</em>, </td>
334 </tr>
335 <tr>
336 <td class="paramkey"></td>
337 <td></td>
338 <td class="paramtype">uint&#160;</td>
339 <td class="paramname"><em>output_step_z</em>, </td>
340 </tr>
341 <tr>
342 <td class="paramkey"></td>
343 <td></td>
344 <td class="paramtype">uint&#160;</td>
345 <td class="paramname"><em>output_offset_first_element_in_bytes</em>, </td>
346 </tr>
347 <tr>
348 <td class="paramkey"></td>
349 <td></td>
350 <td class="paramtype">unsigned int&#160;</td>
351 <td class="paramname"><em>input_stride_w</em>, </td>
352 </tr>
353 <tr>
354 <td class="paramkey"></td>
355 <td></td>
356 <td class="paramtype">unsigned int&#160;</td>
357 <td class="paramname"><em>output_stride_w</em>&#160;</td>
358 </tr>
359 <tr>
360 <td></td>
361 <td>)</td>
362 <td></td><td></td>
363 </tr>
364 </table>
365</div><div class="memdoc">
366
367<p>Performs a roi pooling function. </p>
368<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>
369<dd>
370Datasize must be passed using -DDATA_SIZE e.g. -DDATA_SIZE=32; </dd>
371<dd>
372Input dimensions must be passed using -DMAX_DIM_X, -DMAX_DIM_Y and -DMAX_DIM_Z; </dd>
373<dd>
374Pooled region dimensions must be passed using -DPOOLED_DIM_X and -DPOOLED_DIM_Y; </dd>
375<dd>
376Spatial scale must be passed using -DSPATIAL_SCALE;</dd></dl>
377<dl class="params"><dt>Parameters</dt><dd>
378 <table class="params">
379 <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>
380 <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>
381 <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>
382 <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>
383 <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>
384 <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>
385 <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>
386 <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>
Jenkins514be652019-02-28 12:25:18 +0000387 <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>
388 <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>
389 <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>
390 <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>
391 <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>
392 <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>
Kaizen8938bd32017-09-28 14:38:23 +0100393 <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>
394 <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>
395 <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>
396 <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>
397 <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>
398 <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>
399 <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>
400 <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>
401 <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>
402 <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>
403 </table>
404 </dd>
405</dl>
406
Jenkins514be652019-02-28 12:25:18 +0000407<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>
Jenkins0e205f72019-11-28 16:53:35 +0000408<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>
Kaizen8938bd32017-09-28 14:38:23 +0100409<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>
Jenkins514be652019-02-28 12:25:18 +0000410<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>
Jenkins0e205f72019-11-28 16:53:35 +0000411<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>
412<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>
413<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>
414<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>
415<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>
416<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>
Jenkins514be652019-02-28 12:25:18 +0000417<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>
418<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>
Jenkins0e205f72019-11-28 16:53:35 +0000419<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>
420<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>
Kaizen8938bd32017-09-28 14:38:23 +0100421</div><!-- fragment -->
Jenkins0e205f72019-11-28 16:53:35 +0000422<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>
Jenkins514be652019-02-28 12:25:18 +0000423
Kaizen8938bd32017-09-28 14:38:23 +0100424</div>
425</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000426<a id="aa841846d3e0f01df176038026eab8e25"></a>
427<h2 class="memtitle"><span class="permalink"><a href="#aa841846d3e0f01df176038026eab8e25">&#9670;&nbsp;</a></span>vec4_max()</h2>
428
Kaizen8938bd32017-09-28 14:38:23 +0100429<div class="memitem">
430<div class="memproto">
431<table class="mlabels">
432 <tr>
433 <td class="mlabels-left">
434 <table class="memname">
435 <tr>
436 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec4_max </td>
437 <td>(</td>
438 <td class="paramtype">DATA_TYPE4&#160;</td>
439 <td class="paramname"><em>vec</em></td><td>)</td>
440 <td></td>
441 </tr>
442 </table>
443 </td>
444 <td class="mlabels-right">
445<span class="mlabels"><span class="mlabel">inline</span></span> </td>
446 </tr>
447</table>
448</div><div class="memdoc">
449
Jenkinsb9abeae2018-11-22 11:58:08 +0000450<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>
Jenkins514be652019-02-28 12:25:18 +0000451<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>
Jenkins0e205f72019-11-28 16:53:35 +0000452<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>
Jenkins514be652019-02-28 12:25:18 +0000453</div><!-- fragment -->
Jenkins0e205f72019-11-28 16:53:35 +0000454<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>
Kaizen8938bd32017-09-28 14:38:23 +0100455
Jenkinsb9abeae2018-11-22 11:58:08 +0000456<p class="reference">Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">vec8_max()</a>.</p>
Jenkins514be652019-02-28 12:25:18 +0000457
Kaizen8938bd32017-09-28 14:38:23 +0100458</div>
459</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000460<a id="a03ae72789bf65b85136cb5356b4c189b"></a>
461<h2 class="memtitle"><span class="permalink"><a href="#a03ae72789bf65b85136cb5356b4c189b">&#9670;&nbsp;</a></span>vec8_max()</h2>
462
Kaizen8938bd32017-09-28 14:38:23 +0100463<div class="memitem">
464<div class="memproto">
465<table class="mlabels">
466 <tr>
467 <td class="mlabels-left">
468 <table class="memname">
469 <tr>
470 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec8_max </td>
471 <td>(</td>
472 <td class="paramtype">DATA_TYPE8&#160;</td>
473 <td class="paramname"><em>vec</em></td><td>)</td>
474 <td></td>
475 </tr>
476 </table>
477 </td>
478 <td class="mlabels-right">
479<span class="mlabels"><span class="mlabel">inline</span></span> </td>
480 </tr>
481</table>
482</div><div class="memdoc">
483
Jenkinsb9abeae2018-11-22 11:58:08 +0000484<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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000485<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>
Kaizen8938bd32017-09-28 14:38:23 +0100486<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>
Jenkins0e205f72019-11-28 16:53:35 +0000487<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>
Kaizen8938bd32017-09-28 14:38:23 +0100488</div><!-- fragment -->
Jenkins0e205f72019-11-28 16:53:35 +0000489<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>
Jenkins514be652019-02-28 12:25:18 +0000490
Kaizen8938bd32017-09-28 14:38:23 +0100491</div>
492</div>
493</div><!-- contents -->
494</div><!-- doc-content -->
495<!-- start footer part -->
496<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
497 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000498 <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>
Jenkins7f09cf72020-01-22 18:08:16 +0000499 <li class="footer">Generated on Wed Jan 22 2020 18:07:48 for Compute Library by
Kaizen8938bd32017-09-28 14:38:23 +0100500 <a href="http://www.doxygen.org/index.html">
Jenkins514be652019-02-28 12:25:18 +0000501 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
Kaizen8938bd32017-09-28 14:38:23 +0100502 </ul>
503</div>
504</body>
505</html>