blob: cfd282cb13f9df239c22927333c4275bbbe2f2b0 [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"/>
7<meta name="generator" content="Doxygen 1.8.6"/>
8<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>
15<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17 $(document).ready(initResizable);
18 $(window).load(resizeHeight);
19</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
21<script type="text/javascript" src="search/search.js"></script>
22<script type="text/javascript">
23 $(document).ready(function() { searchBox.OnSelectItem(0); });
24</script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
30</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
31<link href="doxygen.css" rel="stylesheet" type="text/css" />
32</head>
33<body>
34<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35<div id="titlearea">
36<table cellspacing="0" cellpadding="0">
37 <tbody>
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
40 <div id="projectname">Compute Library
41 &#160;<span id="projectnumber">17.09</span>
42 </div>
43 </td>
44 </tr>
45 </tbody>
46</table>
47</div>
48<!-- end header part -->
49<!-- Generated by Doxygen 1.8.6 -->
50<script type="text/javascript">
51var searchBox = new SearchBox("searchBox", "search",false,'Search');
52</script>
53 <div id="navrow1" class="tabs">
54 <ul class="tablist">
55 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
56 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
57 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
59 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
60 <li>
61 <div id="MSearchBox" class="MSearchBoxInactive">
62 <span class="left">
63 <img id="MSearchSelect" src="search/mag_sel.png"
64 onmouseover="return searchBox.OnSearchSelectShow()"
65 onmouseout="return searchBox.OnSearchSelectHide()"
66 alt=""/>
67 <input type="text" id="MSearchField" value="Search" accesskey="S"
68 onfocus="searchBox.OnSearchFieldFocus(true)"
69 onblur="searchBox.OnSearchFieldFocus(false)"
70 onkeyup="searchBox.OnSearchFieldChange(event)"/>
71 </span><span class="right">
72 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
73 </span>
74 </div>
75 </li>
76 </ul>
77 </div>
78 <div id="navrow2" class="tabs2">
79 <ul class="tablist">
80 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
81 <li><a href="globals.xhtml"><span>Globals</span></a></li>
82 </ul>
83 </div>
84</div><!-- top -->
85<div id="side-nav" class="ui-resizable side-nav-resizable">
86 <div id="nav-tree">
87 <div id="nav-tree-contents">
88 <div id="nav-sync" class="sync"></div>
89 </div>
90 </div>
91 <div id="splitbar" style="-moz-user-select:none;"
92 class="ui-resizable-handle">
93 </div>
94</div>
95<script type="text/javascript">
96$(document).ready(function(){initNavTree('roi__pooling__layer_8cl.xhtml','');});
97</script>
98<div id="doc-content">
99<!-- window showing the filter options -->
100<div id="MSearchSelectWindow"
101 onmouseover="return searchBox.OnSearchSelectShow()"
102 onmouseout="return searchBox.OnSearchSelectHide()"
103 onkeydown="return searchBox.OnSearchSelectKey(event)">
104<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
105
106<!-- iframe showing the search results (closed by default) -->
107<div id="MSearchResultsWindow">
108<iframe src="javascript:void(0)" frameborder="0"
109 name="MSearchResults" id="MSearchResults">
110</iframe>
111</div>
112
113<div class="header">
114 <div class="summary">
115<a href="#func-members">Functions</a> </div>
116 <div class="headertitle">
117<div class="title">roi_pooling_layer.cl File Reference</div> </div>
118</div><!--header-->
119<div class="contents">
120<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br/>
121</div>
122<p><a href="roi__pooling__layer_8cl_source.xhtml">Go to the source code of this file.</a></p>
123<table class="memberdecls">
124<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
125Functions</h2></td></tr>
126<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>
127<tr class="separator:aa841846d3e0f01df176038026eab8e25"><td class="memSeparator" colspan="2">&#160;</td></tr>
128<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>
129<tr class="separator:a03ae72789bf65b85136cb5356b4c189b"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<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>
131<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>
132<tr class="separator:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
133<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>
134<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>
135<tr class="separator:a635f6123e4bdfef756e8959061a743b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
136</table>
137<h2 class="groupheader">Function Documentation</h2>
138<a class="anchor" id="aa23d7bc09d4a60b853c5b3ba5425c2ec"></a>
139<div class="memitem">
140<div class="memproto">
141<table class="mlabels">
142 <tr>
143 <td class="mlabels-left">
144 <table class="memname">
145 <tr>
146 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> roi_pool_1x1 </td>
147 <td>(</td>
148 <td class="paramtype">const <a class="el" href="struct_tensor3_d.xhtml">Tensor3D</a> *&#160;</td>
149 <td class="paramname"><em>input</em>, </td>
150 </tr>
151 <tr>
152 <td class="paramkey"></td>
153 <td></td>
154 <td class="paramtype">int&#160;</td>
155 <td class="paramname"><em>region_start_x</em>, </td>
156 </tr>
157 <tr>
158 <td class="paramkey"></td>
159 <td></td>
160 <td class="paramtype">int&#160;</td>
161 <td class="paramname"><em>region_end_x</em>, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype">int&#160;</td>
167 <td class="paramname"><em>region_start_y</em>, </td>
168 </tr>
169 <tr>
170 <td class="paramkey"></td>
171 <td></td>
172 <td class="paramtype">int&#160;</td>
173 <td class="paramname"><em>region_end_y</em>, </td>
174 </tr>
175 <tr>
176 <td class="paramkey"></td>
177 <td></td>
178 <td class="paramtype">int&#160;</td>
179 <td class="paramname"><em>pz</em>&#160;</td>
180 </tr>
181 <tr>
182 <td></td>
183 <td>)</td>
184 <td></td><td></td>
185 </tr>
186 </table>
187 </td>
188 <td class="mlabels-right">
189<span class="mlabels"><span class="mlabel">inline</span></span> </td>
190 </tr>
191</table>
192</div><div class="memdoc">
193
194<p>Performs a roi pooling on a single output pixel. </p>
195<dl class="params"><dt>Parameters</dt><dd>
196 <table class="params">
197 <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>
198 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_x</td><td>Start x index projected onto the input tensor. </td></tr>
199 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_x</td><td>End x index projected onto the input tensor. </td></tr>
200 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_y</td><td>Start y index projected onto the input tensor. </td></tr>
201 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_y</td><td>End y index projected onto the input tensor. </td></tr>
202 <tr><td class="paramdir">[in]</td><td class="paramname">pz</td><td>z index of the input tensor.</td></tr>
203 </table>
204 </dd>
205</dl>
206<dl class="section return"><dt>Returns</dt><dd>A max pooled value from the region specified in the input tensor. </dd></dl>
207
208<p>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>
209
210<p>References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00304">tensor3D_offset()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>, and <a class="el" href="helpers_8h_source.xhtml#l00034">VLOAD</a>.</p>
211
212<p>Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00123">roi_pooling_layer()</a>.</p>
213<div class="fragment"><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;{</div>
214<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; <span class="comment">// Iterate through the pooling region</span></div>
215<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>
216<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; {</div>
217<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>
218<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; }</div>
219<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keywordflow">else</span></div>
220<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; {</div>
221<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>
222<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, VEC_SIZE)</div>
223<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; curr_max = (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, VEC_SIZE))(-FLT_MAX);</div>
224<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; for(<span class="keywordtype">int</span> j = region_start_y; j &lt; region_end_y; ++j)</div>
225<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; {</div>
226<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="keywordtype">int</span> i = region_start_x;</div>
227<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>
228<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div>
229<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE)</div>
230<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; val = <a class="code" href="helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a>(VEC_SIZE)(0, (__global DATA_TYPE *)<a class="code" href="helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(input, i, j, pz));</div>
231<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; curr_max = fmax(val, curr_max);</div>
232<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; }</div>
233<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; for(; i &lt; region_end_x; ++i)</div>
234<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; {</div>
235<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; DATA_TYPE val = *(__global DATA_TYPE *)<a class="code" href="helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(input, i, j, pz);</div>
236<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; curr_max = fmax(curr_max, val);</div>
237<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div>
238<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; }</div>
239<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordflow">return</span> (DATA_TYPE)VEC_MAX(curr_max);</div>
240<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; }</div>
241<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;}</div>
242<div class="ttc" id="helpers_8h_xhtml_a287e2fc366c312b468382c95bb90f91f"><div class="ttname"><a href="helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a></div><div class="ttdeci">#define VLOAD(size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00034">helpers.h:34</a></div></div>
243<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>
244<div class="ttc" id="helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00304">helpers.h:304</a></div></div>
245<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_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="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
246</div><!-- fragment -->
247</div>
248</div>
249<a class="anchor" id="a635f6123e4bdfef756e8959061a743b5"></a>
250<div class="memitem">
251<div class="memproto">
252 <table class="memname">
253 <tr>
254 <td class="memname">__kernel void roi_pooling_layer </td>
255 <td>(</td>
256 <td class="paramtype">__global uchar *&#160;</td>
257 <td class="paramname"><em>input_ptr</em>, </td>
258 </tr>
259 <tr>
260 <td class="paramkey"></td>
261 <td></td>
262 <td class="paramtype">uint&#160;</td>
263 <td class="paramname"><em>input_stride_x</em>, </td>
264 </tr>
265 <tr>
266 <td class="paramkey"></td>
267 <td></td>
268 <td class="paramtype">uint&#160;</td>
269 <td class="paramname"><em>input_step_x</em>, </td>
270 </tr>
271 <tr>
272 <td class="paramkey"></td>
273 <td></td>
274 <td class="paramtype">uint&#160;</td>
275 <td class="paramname"><em>input_stride_y</em>, </td>
276 </tr>
277 <tr>
278 <td class="paramkey"></td>
279 <td></td>
280 <td class="paramtype">uint&#160;</td>
281 <td class="paramname"><em>input_step_y</em>, </td>
282 </tr>
283 <tr>
284 <td class="paramkey"></td>
285 <td></td>
286 <td class="paramtype">uint&#160;</td>
287 <td class="paramname"><em>input_stride_z</em>, </td>
288 </tr>
289 <tr>
290 <td class="paramkey"></td>
291 <td></td>
292 <td class="paramtype">uint&#160;</td>
293 <td class="paramname"><em>input_step_z</em>, </td>
294 </tr>
295 <tr>
296 <td class="paramkey"></td>
297 <td></td>
298 <td class="paramtype">uint&#160;</td>
299 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
300 </tr>
301 <tr>
302 <td class="paramkey"></td>
303 <td></td>
304 <td class="paramtype">__global uchar *&#160;</td>
305 <td class="paramname"><em>rois_ptr</em>, </td>
306 </tr>
307 <tr>
308 <td class="paramkey"></td>
309 <td></td>
310 <td class="paramtype">uint&#160;</td>
311 <td class="paramname"><em>rois_stride_x</em>, </td>
312 </tr>
313 <tr>
314 <td class="paramkey"></td>
315 <td></td>
316 <td class="paramtype">uint&#160;</td>
317 <td class="paramname"><em>rois_step_x</em>, </td>
318 </tr>
319 <tr>
320 <td class="paramkey"></td>
321 <td></td>
322 <td class="paramtype">uint&#160;</td>
323 <td class="paramname"><em>rois_offset_first_element_in_bytes</em>, </td>
324 </tr>
325 <tr>
326 <td class="paramkey"></td>
327 <td></td>
328 <td class="paramtype">__global uchar *&#160;</td>
329 <td class="paramname"><em>output_ptr</em>, </td>
330 </tr>
331 <tr>
332 <td class="paramkey"></td>
333 <td></td>
334 <td class="paramtype">uint&#160;</td>
335 <td class="paramname"><em>output_stride_x</em>, </td>
336 </tr>
337 <tr>
338 <td class="paramkey"></td>
339 <td></td>
340 <td class="paramtype">uint&#160;</td>
341 <td class="paramname"><em>output_step_x</em>, </td>
342 </tr>
343 <tr>
344 <td class="paramkey"></td>
345 <td></td>
346 <td class="paramtype">uint&#160;</td>
347 <td class="paramname"><em>output_stride_y</em>, </td>
348 </tr>
349 <tr>
350 <td class="paramkey"></td>
351 <td></td>
352 <td class="paramtype">uint&#160;</td>
353 <td class="paramname"><em>output_step_y</em>, </td>
354 </tr>
355 <tr>
356 <td class="paramkey"></td>
357 <td></td>
358 <td class="paramtype">uint&#160;</td>
359 <td class="paramname"><em>output_stride_z</em>, </td>
360 </tr>
361 <tr>
362 <td class="paramkey"></td>
363 <td></td>
364 <td class="paramtype">uint&#160;</td>
365 <td class="paramname"><em>output_step_z</em>, </td>
366 </tr>
367 <tr>
368 <td class="paramkey"></td>
369 <td></td>
370 <td class="paramtype">uint&#160;</td>
371 <td class="paramname"><em>output_offset_first_element_in_bytes</em>, </td>
372 </tr>
373 <tr>
374 <td class="paramkey"></td>
375 <td></td>
376 <td class="paramtype">unsigned int&#160;</td>
377 <td class="paramname"><em>input_stride_w</em>, </td>
378 </tr>
379 <tr>
380 <td class="paramkey"></td>
381 <td></td>
382 <td class="paramtype">unsigned int&#160;</td>
383 <td class="paramname"><em>output_stride_w</em>&#160;</td>
384 </tr>
385 <tr>
386 <td></td>
387 <td>)</td>
388 <td></td><td></td>
389 </tr>
390 </table>
391</div><div class="memdoc">
392
393<p>Performs a roi pooling function. </p>
394<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>
395<dd>
396Datasize must be passed using -DDATA_SIZE e.g. -DDATA_SIZE=32; </dd>
397<dd>
398Input dimensions must be passed using -DMAX_DIM_X, -DMAX_DIM_Y and -DMAX_DIM_Z; </dd>
399<dd>
400Pooled region dimensions must be passed using -DPOOLED_DIM_X and -DPOOLED_DIM_Y; </dd>
401<dd>
402Spatial scale must be passed using -DSPATIAL_SCALE;</dd></dl>
403<dl class="params"><dt>Parameters</dt><dd>
404 <table class="params">
405 <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>
406 <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>
407 <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>
408 <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>
409 <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>
410 <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>
411 <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>
412 <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>
413 <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>
414 <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>
415 <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>
416 <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>
417 <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>
418 <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>
419 <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>
420 <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>
421 <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>
422 <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>
423 <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>
424 <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>
425 <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>
426 <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>
427 </table>
428 </dd>
429</dl>
430
431<p>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>
432
433<p>References <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00201">arm_compute::clamp()</a>, <a class="el" href="helpers_8h_source.xhtml#l00112">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>, <a class="el" href="helpers_8h_source.xhtml#l00090">CONVERT_TO_VECTOR_STRUCT_NO_STEP</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Tensor3D::ptr</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00061">roi_pool_1x1()</a>, <a class="el" href="_toolchain_support_8h_source.xhtml#l00228">arm_compute::support::cpp11::round()</a>, <a class="el" href="helpers_8h_source.xhtml#l00304">tensor3D_offset()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00281">vector_offset()</a>.</p>
434<div class="fragment"><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;{</div>
435<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; <span class="comment">// Get pixels pointer</span></div>
436<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="helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>(input);</div>
437<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="helpers_8h.xhtml#a64d779f80eeb923e0ab2313433f7b40b">CONVERT_TO_VECTOR_STRUCT_NO_STEP</a>(rois);</div>
438<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="helpers_8h.xhtml#a79e8e562daa6599317d2d1cd86ef1bf2">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>(output);</div>
439<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div>
440<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>
441<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>
442<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>
443<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
444<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; <span class="comment">// Load roi parameters</span></div>
445<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// roi is laid out as follows:</span></div>
446<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="comment">// { x, y, width, height, batch_index }</span></div>
447<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="helpers_8h.xhtml#a7e4940407322d6f0ccb8b6b86b856019">vector_offset</a>(&amp;rois, pw));</div>
448<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="helpers_8h.xhtml#a7e4940407322d6f0ccb8b6b86b856019">vector_offset</a>(&amp;rois, pw) + 4);</div>
449<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_1_1support_1_1cpp11.xhtml#ab71c35ca207b916a9f8b0336ab88484e">round</a>(convert_float2(roi.s01) * (<span class="keywordtype">float</span>)SPATIAL_SCALE));</div>
450<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_1_1support_1_1cpp11.xhtml#ab71c35ca207b916a9f8b0336ab88484e">round</a>(convert_float2(roi.s23) * (<span class="keywordtype">float</span>)SPATIAL_SCALE), 1.f));</div>
451<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;</div>
452<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <span class="comment">// Calculate pooled region start and end</span></div>
453<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>
454<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>
455<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>
456<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>
457<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>
458<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div>
459<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; region_start = <a class="code" href="namespacearm__compute.xhtml#a1c0b9414fe3a6ef6a7a23bd324ae9e67">clamp</a>(region_start, 0, max_spatial_dims);</div>
460<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; region_end = <a class="code" href="namespacearm__compute.xhtml#a1c0b9414fe3a6ef6a7a23bd324ae9e67">clamp</a>(region_end, 0, max_spatial_dims);</div>
461<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div>
462<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>
463<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>
464<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>
465<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;</div>
466<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>
467<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; {</div>
468<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="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>
469<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; region_start.x,</div>
470<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; region_end.x,</div>
471<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; region_start.y,</div>
472<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; region_end.y, pz);</div>
473<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; }</div>
474<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;}</div>
475<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="helpers_8h_source.xhtml#l00123">helpers.h:123</a></div></div>
476<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>
477<div class="ttc" id="namespacearm__compute_xhtml_a1c0b9414fe3a6ef6a7a23bd324ae9e67"><div class="ttname"><a href="namespacearm__compute.xhtml#a1c0b9414fe3a6ef6a7a23bd324ae9e67">arm_compute::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="arm__compute_2core_2_helpers_8h_source.xhtml#l00201">Helpers.h:201</a></div></div>
478<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="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
479<div class="ttc" id="helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00304">helpers.h:304</a></div></div>
480<div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_ab71c35ca207b916a9f8b0336ab88484e"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#ab71c35ca207b916a9f8b0336ab88484e">arm_compute::support::cpp11::round</a></div><div class="ttdeci">T round(T value)</div><div class="ttdoc">Round floating-point value with half value rounding away from zero. </div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00228">ToolchainSupport.h:228</a></div></div>
481<div class="ttc" id="helpers_8h_xhtml_a79e8e562daa6599317d2d1cd86ef1bf2"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00112">helpers.h:112</a></div></div>
482<div class="ttc" id="helpers_8h_xhtml_a64d779f80eeb923e0ab2313433f7b40b"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00090">helpers.h:90</a></div></div>
483<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>
484<div class="ttc" id="helpers_8h_xhtml_a7e4940407322d6f0ccb8b6b86b856019"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00281">helpers.h:281</a></div></div>
485<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="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
486</div><!-- fragment -->
487</div>
488</div>
489<a class="anchor" id="aa841846d3e0f01df176038026eab8e25"></a>
490<div class="memitem">
491<div class="memproto">
492<table class="mlabels">
493 <tr>
494 <td class="mlabels-left">
495 <table class="memname">
496 <tr>
497 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec4_max </td>
498 <td>(</td>
499 <td class="paramtype">DATA_TYPE4&#160;</td>
500 <td class="paramname"><em>vec</em></td><td>)</td>
501 <td></td>
502 </tr>
503 </table>
504 </td>
505 <td class="mlabels-right">
506<span class="mlabels"><span class="mlabel">inline</span></span> </td>
507 </tr>
508</table>
509</div><div class="memdoc">
510
511<p>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>
512
513<p>References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
514
515<p>Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">vec8_max()</a>.</p>
516<div class="fragment"><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;{</div>
517<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 2)</div>
518<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; temp = fmax(vec.lo, vec.hi);</div>
519<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; return fmax(temp.x, temp.y);</div>
520<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;}</div>
521<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>
522<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_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="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
523</div><!-- fragment -->
524</div>
525</div>
526<a class="anchor" id="a03ae72789bf65b85136cb5356b4c189b"></a>
527<div class="memitem">
528<div class="memproto">
529<table class="mlabels">
530 <tr>
531 <td class="mlabels-left">
532 <table class="memname">
533 <tr>
534 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec8_max </td>
535 <td>(</td>
536 <td class="paramtype">DATA_TYPE8&#160;</td>
537 <td class="paramname"><em>vec</em></td><td>)</td>
538 <td></td>
539 </tr>
540 </table>
541 </td>
542 <td class="mlabels-right">
543<span class="mlabels"><span class="mlabel">inline</span></span> </td>
544 </tr>
545</table>
546</div><div class="memdoc">
547
548<p>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>
549
550<p>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="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
551<div class="fragment"><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;{</div>
552<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 4)</div>
553<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; temp = fmax(vec.lo, vec.hi);</div>
554<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>
555<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;}</div>
556<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>
557<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_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="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
558<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>
559</div><!-- fragment -->
560</div>
561</div>
562</div><!-- contents -->
563</div><!-- doc-content -->
564<!-- start footer part -->
565<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
566 <ul>
567 <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="roi__pooling__layer_8cl.xhtml">roi_pooling_layer.cl</a></li>
568 <li class="footer">Generated on Thu Sep 28 2017 14:37:54 for Compute Library by
569 <a href="http://www.doxygen.org/index.html">
570 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
571 </ul>
572</div>
573</body>
574</html>