blob: 0dce9873909d87d6c5ee230b88ab2c7d726133dd [file] [log] [blame]
Kaizen8938bd32017-09-28 14:38:23 +01001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00007<meta name="generator" content="Doxygen 1.8.13"/>
Kaizen8938bd32017-09-28 14:38:23 +01008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: src/core/CL/cl_kernels/roi_pooling_layer.cl File Reference</title>
10<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Kaizen8938bd32017-09-28 14:38:23 +010019</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000021<script type="text/javascript" src="search/searchdata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010022<script type="text/javascript" src="search/search.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010023<script type="text/x-mathjax-config">
24 MathJax.Hub.Config({
25 extensions: ["tex2jax.js"],
26 jax: ["input/TeX","output/HTML-CSS"],
27});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000028</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010029<link href="doxygen.css" rel="stylesheet" type="text/css" />
30</head>
31<body>
32<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33<div id="titlearea">
34<table cellspacing="0" cellpadding="0">
35 <tbody>
36 <tr style="height: 56px;">
37 <td style="padding-left: 0.5em;">
38 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Kaizen8938bd32017-09-28 14:38:23 +010040 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
Jenkinsb9abeae2018-11-22 11:58:08 +000047<!-- Generated by Doxygen 1.8.13 -->
Kaizen8938bd32017-09-28 14:38:23 +010048<script type="text/javascript">
49var searchBox = new SearchBox("searchBox", "search",false,'Search');
50</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000051<script type="text/javascript" src="menudata.js"></script>
52<script type="text/javascript" src="menu.js"></script>
53<script type="text/javascript">
54$(function() {
55 initMenu('',true,false,'search.php','Search');
56 $(document).ready(function() { init_search(); });
57});
58</script>
59<div id="main-nav"></div>
Kaizen8938bd32017-09-28 14:38:23 +010060</div><!-- top -->
61<div id="side-nav" class="ui-resizable side-nav-resizable">
62 <div id="nav-tree">
63 <div id="nav-tree-contents">
64 <div id="nav-sync" class="sync"></div>
65 </div>
66 </div>
67 <div id="splitbar" style="-moz-user-select:none;"
68 class="ui-resizable-handle">
69 </div>
70</div>
71<script type="text/javascript">
72$(document).ready(function(){initNavTree('roi__pooling__layer_8cl.xhtml','');});
73</script>
74<div id="doc-content">
75<!-- window showing the filter options -->
76<div id="MSearchSelectWindow"
77 onmouseover="return searchBox.OnSearchSelectShow()"
78 onmouseout="return searchBox.OnSearchSelectHide()"
79 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000080</div>
Kaizen8938bd32017-09-28 14:38:23 +010081
82<!-- iframe showing the search results (closed by default) -->
83<div id="MSearchResultsWindow">
84<iframe src="javascript:void(0)" frameborder="0"
85 name="MSearchResults" id="MSearchResults">
86</iframe>
87</div>
88
89<div class="header">
90 <div class="summary">
91<a href="#func-members">Functions</a> </div>
92 <div class="headertitle">
93<div class="title">roi_pooling_layer.cl File Reference</div> </div>
94</div><!--header-->
95<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +000096<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 +010097</div>
98<p><a href="roi__pooling__layer_8cl_source.xhtml">Go to the source code of this file.</a></p>
99<table class="memberdecls">
100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
101Functions</h2></td></tr>
102<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>
103<tr class="separator:aa841846d3e0f01df176038026eab8e25"><td class="memSeparator" colspan="2">&#160;</td></tr>
104<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>
105<tr class="separator:a03ae72789bf65b85136cb5356b4c189b"><td class="memSeparator" colspan="2">&#160;</td></tr>
106<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 +0000107<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 +0100108<tr class="separator:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
109<tr class="memitem:a635f6123e4bdfef756e8959061a743b5"><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#a635f6123e4bdfef756e8959061a743b5">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_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>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000110<tr class="memdesc:a635f6123e4bdfef756e8959061a743b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a roi pooling function. <a href="#a635f6123e4bdfef756e8959061a743b5">More...</a><br /></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100111<tr class="separator:a635f6123e4bdfef756e8959061a743b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
112</table>
113<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000114<a id="aa23d7bc09d4a60b853c5b3ba5425c2ec"></a>
115<h2 class="memtitle"><span class="permalink"><a href="#aa23d7bc09d4a60b853c5b3ba5425c2ec">&#9670;&nbsp;</a></span>roi_pool_1x1()</h2>
116
Kaizen8938bd32017-09-28 14:38:23 +0100117<div class="memitem">
118<div class="memproto">
119<table class="mlabels">
120 <tr>
121 <td class="mlabels-left">
122 <table class="memname">
123 <tr>
124 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> roi_pool_1x1 </td>
125 <td>(</td>
126 <td class="paramtype">const <a class="el" href="struct_tensor3_d.xhtml">Tensor3D</a> *&#160;</td>
127 <td class="paramname"><em>input</em>, </td>
128 </tr>
129 <tr>
130 <td class="paramkey"></td>
131 <td></td>
132 <td class="paramtype">int&#160;</td>
133 <td class="paramname"><em>region_start_x</em>, </td>
134 </tr>
135 <tr>
136 <td class="paramkey"></td>
137 <td></td>
138 <td class="paramtype">int&#160;</td>
139 <td class="paramname"><em>region_end_x</em>, </td>
140 </tr>
141 <tr>
142 <td class="paramkey"></td>
143 <td></td>
144 <td class="paramtype">int&#160;</td>
145 <td class="paramname"><em>region_start_y</em>, </td>
146 </tr>
147 <tr>
148 <td class="paramkey"></td>
149 <td></td>
150 <td class="paramtype">int&#160;</td>
151 <td class="paramname"><em>region_end_y</em>, </td>
152 </tr>
153 <tr>
154 <td class="paramkey"></td>
155 <td></td>
156 <td class="paramtype">int&#160;</td>
157 <td class="paramname"><em>pz</em>&#160;</td>
158 </tr>
159 <tr>
160 <td></td>
161 <td>)</td>
162 <td></td><td></td>
163 </tr>
164 </table>
165 </td>
166 <td class="mlabels-right">
167<span class="mlabels"><span class="mlabel">inline</span></span> </td>
168 </tr>
169</table>
170</div><div class="memdoc">
171
172<p>Performs a roi pooling on a single output pixel. </p>
173<dl class="params"><dt>Parameters</dt><dd>
174 <table class="params">
175 <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>
176 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_x</td><td>Start x index projected onto the input tensor. </td></tr>
177 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_x</td><td>End x index projected onto the input tensor. </td></tr>
178 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_y</td><td>Start y index projected onto the input tensor. </td></tr>
179 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_y</td><td>End y index projected onto the input tensor. </td></tr>
180 <tr><td class="paramdir">[in]</td><td class="paramname">pz</td><td>z index of the input tensor.</td></tr>
181 </table>
182 </dd>
183</dl>
184<dl class="section return"><dt>Returns</dt><dd>A max pooled value from the region specified in the input tensor. </dd></dl>
185
Jenkinsb9abeae2018-11-22 11:58:08 +0000186<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>
Kaizen8938bd32017-09-28 14:38:23 +0100187
Jenkinsb9abeae2018-11-22 11:58:08 +0000188<p class="reference">References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">tensor3D_offset()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00048">VLOAD</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100189
Jenkinsb9abeae2018-11-22 11:58:08 +0000190<p class="reference">Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00123">roi_pooling_layer()</a>.</p>
191<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) / VEC_SIZE);</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>, VEC_SIZE)</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>, VEC_SIZE))(-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 * VEC_SIZE; i += VEC_SIZE)</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>, VEC_SIZE)</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>(VEC_SIZE)(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>(input, 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>(input, 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="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>
192<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#l00048">helpers.h:48</a></div></div>
193<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#l00321">helpers.h:321</a></div></div>
194<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#l00054">helpers.h:54</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100195</div><!-- fragment -->
196</div>
197</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000198<a id="a635f6123e4bdfef756e8959061a743b5"></a>
199<h2 class="memtitle"><span class="permalink"><a href="#a635f6123e4bdfef756e8959061a743b5">&#9670;&nbsp;</a></span>roi_pooling_layer()</h2>
200
Kaizen8938bd32017-09-28 14:38:23 +0100201<div class="memitem">
202<div class="memproto">
203 <table class="memname">
204 <tr>
205 <td class="memname">__kernel void roi_pooling_layer </td>
206 <td>(</td>
207 <td class="paramtype">__global uchar *&#160;</td>
208 <td class="paramname"><em>input_ptr</em>, </td>
209 </tr>
210 <tr>
211 <td class="paramkey"></td>
212 <td></td>
213 <td class="paramtype">uint&#160;</td>
214 <td class="paramname"><em>input_stride_x</em>, </td>
215 </tr>
216 <tr>
217 <td class="paramkey"></td>
218 <td></td>
219 <td class="paramtype">uint&#160;</td>
220 <td class="paramname"><em>input_step_x</em>, </td>
221 </tr>
222 <tr>
223 <td class="paramkey"></td>
224 <td></td>
225 <td class="paramtype">uint&#160;</td>
226 <td class="paramname"><em>input_stride_y</em>, </td>
227 </tr>
228 <tr>
229 <td class="paramkey"></td>
230 <td></td>
231 <td class="paramtype">uint&#160;</td>
232 <td class="paramname"><em>input_step_y</em>, </td>
233 </tr>
234 <tr>
235 <td class="paramkey"></td>
236 <td></td>
237 <td class="paramtype">uint&#160;</td>
238 <td class="paramname"><em>input_stride_z</em>, </td>
239 </tr>
240 <tr>
241 <td class="paramkey"></td>
242 <td></td>
243 <td class="paramtype">uint&#160;</td>
244 <td class="paramname"><em>input_step_z</em>, </td>
245 </tr>
246 <tr>
247 <td class="paramkey"></td>
248 <td></td>
249 <td class="paramtype">uint&#160;</td>
250 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
251 </tr>
252 <tr>
253 <td class="paramkey"></td>
254 <td></td>
255 <td class="paramtype">__global uchar *&#160;</td>
256 <td class="paramname"><em>rois_ptr</em>, </td>
257 </tr>
258 <tr>
259 <td class="paramkey"></td>
260 <td></td>
261 <td class="paramtype">uint&#160;</td>
262 <td class="paramname"><em>rois_stride_x</em>, </td>
263 </tr>
264 <tr>
265 <td class="paramkey"></td>
266 <td></td>
267 <td class="paramtype">uint&#160;</td>
268 <td class="paramname"><em>rois_step_x</em>, </td>
269 </tr>
270 <tr>
271 <td class="paramkey"></td>
272 <td></td>
273 <td class="paramtype">uint&#160;</td>
274 <td class="paramname"><em>rois_offset_first_element_in_bytes</em>, </td>
275 </tr>
276 <tr>
277 <td class="paramkey"></td>
278 <td></td>
279 <td class="paramtype">__global uchar *&#160;</td>
280 <td class="paramname"><em>output_ptr</em>, </td>
281 </tr>
282 <tr>
283 <td class="paramkey"></td>
284 <td></td>
285 <td class="paramtype">uint&#160;</td>
286 <td class="paramname"><em>output_stride_x</em>, </td>
287 </tr>
288 <tr>
289 <td class="paramkey"></td>
290 <td></td>
291 <td class="paramtype">uint&#160;</td>
292 <td class="paramname"><em>output_step_x</em>, </td>
293 </tr>
294 <tr>
295 <td class="paramkey"></td>
296 <td></td>
297 <td class="paramtype">uint&#160;</td>
298 <td class="paramname"><em>output_stride_y</em>, </td>
299 </tr>
300 <tr>
301 <td class="paramkey"></td>
302 <td></td>
303 <td class="paramtype">uint&#160;</td>
304 <td class="paramname"><em>output_step_y</em>, </td>
305 </tr>
306 <tr>
307 <td class="paramkey"></td>
308 <td></td>
309 <td class="paramtype">uint&#160;</td>
310 <td class="paramname"><em>output_stride_z</em>, </td>
311 </tr>
312 <tr>
313 <td class="paramkey"></td>
314 <td></td>
315 <td class="paramtype">uint&#160;</td>
316 <td class="paramname"><em>output_step_z</em>, </td>
317 </tr>
318 <tr>
319 <td class="paramkey"></td>
320 <td></td>
321 <td class="paramtype">uint&#160;</td>
322 <td class="paramname"><em>output_offset_first_element_in_bytes</em>, </td>
323 </tr>
324 <tr>
325 <td class="paramkey"></td>
326 <td></td>
327 <td class="paramtype">unsigned int&#160;</td>
328 <td class="paramname"><em>input_stride_w</em>, </td>
329 </tr>
330 <tr>
331 <td class="paramkey"></td>
332 <td></td>
333 <td class="paramtype">unsigned int&#160;</td>
334 <td class="paramname"><em>output_stride_w</em>&#160;</td>
335 </tr>
336 <tr>
337 <td></td>
338 <td>)</td>
339 <td></td><td></td>
340 </tr>
341 </table>
342</div><div class="memdoc">
343
344<p>Performs a roi pooling function. </p>
345<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>
346<dd>
347Datasize must be passed using -DDATA_SIZE e.g. -DDATA_SIZE=32; </dd>
348<dd>
349Input dimensions must be passed using -DMAX_DIM_X, -DMAX_DIM_Y and -DMAX_DIM_Z; </dd>
350<dd>
351Pooled region dimensions must be passed using -DPOOLED_DIM_X and -DPOOLED_DIM_Y; </dd>
352<dd>
353Spatial scale must be passed using -DSPATIAL_SCALE;</dd></dl>
354<dl class="params"><dt>Parameters</dt><dd>
355 <table class="params">
356 <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>
357 <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>
358 <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>
359 <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>
360 <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>
361 <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>
362 <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>
363 <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>
364 <tr><td class="paramdir">[in]</td><td class="paramname">rois_ptr</td><td>Pointer to the rois array. Layout: {x, y, width, height, batch_indx} </td></tr>
365 <tr><td class="paramdir">[in]</td><td class="paramname">rois_stride_x</td><td>Stride of the rois array in X dimension (in bytes) </td></tr>
366 <tr><td class="paramdir">[in]</td><td class="paramname">rois_step_x</td><td>rois_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
367 <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 array </td></tr>
368 <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>
369 <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>
370 <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>
371 <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>
372 <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>
373 <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>
374 <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>
375 <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>
376 <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>
377 <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>
378 </table>
379 </dd>
380</dl>
381
Jenkinsb9abeae2018-11-22 11:58:08 +0000382<p class="definition">Definition at line <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00123">123</a> of file <a class="el" href="roi__pooling__layer_8cl_source.xhtml">roi_pooling_layer.cl</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100383
Jenkinsb9abeae2018-11-22 11:58:08 +0000384<p class="reference">References <a class="el" href="_utility_8h_source.xhtml#l00084">arm_compute::utility::clamp()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00129">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00107">CONVERT_TO_VECTOR_STRUCT_NO_STEP</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">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#l00321">tensor3D_offset()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00298">vector_offset()</a>.</p>
385<div class="fragment"><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;{</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>(input);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <a class="code" href="struct_vector.xhtml">Vector</a> rois = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a64d779f80eeb923e0ab2313433f7b40b">CONVERT_TO_VECTOR_STRUCT_NO_STEP</a>(rois);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</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="l00133"></a><span class="lineno"> 133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> px = get_global_id(0);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> py = get_global_id(1);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> pw = get_global_id(2);</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="comment">// Load roi parameters</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// roi is laid out as follows:</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// { x, y, width, height, batch_index }</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keyword">const</span> ushort4 roi = vload4(0, (__global ushort *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a7e4940407322d6f0ccb8b6b86b856019">vector_offset</a>(&amp;rois, pw));</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; <span class="keyword">const</span> ushort roi_batch = *((__global ushort *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a7e4940407322d6f0ccb8b6b86b856019">vector_offset</a>(&amp;rois, pw) + 4);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="keyword">const</span> 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="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keyword">const</span> int2 roi_dims = convert_int2_sat(fmax(<a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(convert_float2(roi.s23) * (<span class="keywordtype">float</span>)SPATIAL_SCALE), 1.f));</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="comment">// Calculate pooled region start and end</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="keyword">const</span> float2 spatial_indx = (float2)(px, py);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keyword">const</span> float2 pooled_dims = (float2)(POOLED_DIM_X, POOLED_DIM_Y);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <span class="keyword">const</span> int2 max_spatial_dims = (int2)(MAX_DIM_X, MAX_DIM_Y);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</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="l00151"></a><span class="lineno"> 151</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="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; region_start = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(region_start, 0, max_spatial_dims);</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; region_end = <a class="code" href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">clamp</a>(region_end, 0, max_spatial_dims);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="comment">// Move input and output pointer across the fourth dimension</span></div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; input.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> += roi_batch * input_stride_w;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> += pw * output_stride_w;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> pz = 0; pz &lt; MAX_DIM_Z; ++pz)</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</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;input,</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; region_start.x,</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; region_end.x,</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; region_start.y,</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; region_end.y, pz);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;}</div><div class="ttc" id="struct_vector_xhtml"><div class="ttname"><a href="struct_vector.xhtml">Vector</a></div><div class="ttdoc">Structure to hold Vector information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100386<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>
Jenkinsb3a371b2018-05-23 11:36:53 +0100387<div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a12c3c62f510452805c289e180ec78bb7"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a12c3c62f510452805c289e180ec78bb7">arm_compute::utility::clamp</a></div><div class="ttdeci">T clamp(const T &amp;n, const T &amp;lower, const T &amp;upper)</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#l00084">Utility.h:84</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000388<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#l00157">helpers.h:157</a></div></div>
389<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#l00129">helpers.h:129</a></div></div>
390<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>
391<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a7e4940407322d6f0ccb8b6b86b856019"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a7e4940407322d6f0ccb8b6b86b856019">vector_offset</a></div><div class="ttdeci">__global const uchar * vector_offset(const Vector *vec, int x)</div><div class="ttdoc">Get the pointer position of a Vector. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00298">helpers.h:298</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100392<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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000393<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">helpers.h:159</a></div></div>
394<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a64d779f80eeb923e0ab2313433f7b40b"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a64d779f80eeb923e0ab2313433f7b40b">CONVERT_TO_VECTOR_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_VECTOR_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#l00107">helpers.h:107</a></div></div>
395<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#l00321">helpers.h:321</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100396</div><!-- fragment -->
397</div>
398</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000399<a id="aa841846d3e0f01df176038026eab8e25"></a>
400<h2 class="memtitle"><span class="permalink"><a href="#aa841846d3e0f01df176038026eab8e25">&#9670;&nbsp;</a></span>vec4_max()</h2>
401
Kaizen8938bd32017-09-28 14:38:23 +0100402<div class="memitem">
403<div class="memproto">
404<table class="mlabels">
405 <tr>
406 <td class="mlabels-left">
407 <table class="memname">
408 <tr>
409 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec4_max </td>
410 <td>(</td>
411 <td class="paramtype">DATA_TYPE4&#160;</td>
412 <td class="paramname"><em>vec</em></td><td>)</td>
413 <td></td>
414 </tr>
415 </table>
416 </td>
417 <td class="mlabels-right">
418<span class="mlabels"><span class="mlabel">inline</span></span> </td>
419 </tr>
420</table>
421</div><div class="memdoc">
422
Jenkinsb9abeae2018-11-22 11:58:08 +0000423<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>
Kaizen8938bd32017-09-28 14:38:23 +0100424
Jenkinsb9abeae2018-11-22 11:58:08 +0000425<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#l00054">VEC_DATA_TYPE</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100426
Jenkinsb9abeae2018-11-22 11:58:08 +0000427<p class="reference">Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">vec8_max()</a>.</p>
428<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>
429<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#l00054">helpers.h:54</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100430</div><!-- fragment -->
431</div>
432</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000433<a id="a03ae72789bf65b85136cb5356b4c189b"></a>
434<h2 class="memtitle"><span class="permalink"><a href="#a03ae72789bf65b85136cb5356b4c189b">&#9670;&nbsp;</a></span>vec8_max()</h2>
435
Kaizen8938bd32017-09-28 14:38:23 +0100436<div class="memitem">
437<div class="memproto">
438<table class="mlabels">
439 <tr>
440 <td class="mlabels-left">
441 <table class="memname">
442 <tr>
443 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec8_max </td>
444 <td>(</td>
445 <td class="paramtype">DATA_TYPE8&#160;</td>
446 <td class="paramname"><em>vec</em></td><td>)</td>
447 <td></td>
448 </tr>
449 </table>
450 </td>
451 <td class="mlabels-right">
452<span class="mlabels"><span class="mlabel">inline</span></span> </td>
453 </tr>
454</table>
455</div><div class="memdoc">
456
Jenkinsb9abeae2018-11-22 11:58:08 +0000457<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>
Kaizen8938bd32017-09-28 14:38:23 +0100458
Jenkinsb9abeae2018-11-22 11:58:08 +0000459<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#l00054">VEC_DATA_TYPE</a>.</p>
460<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 +0100461<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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000462<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#l00054">helpers.h:54</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100463</div><!-- fragment -->
464</div>
465</div>
466</div><!-- contents -->
467</div><!-- doc-content -->
468<!-- start footer part -->
469<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
470 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000471 <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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000472 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Kaizen8938bd32017-09-28 14:38:23 +0100473 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000474 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Kaizen8938bd32017-09-28 14:38:23 +0100475 </ul>
476</div>
477</body>
478</html>