blob: 750682b88b755db44086bff7f0f671f6f15b7ae3 [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"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +00007<meta name="generator" content="Doxygen 1.8.11"/>
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);
19 $(window).load(resizeHeight);
20</script>
21<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000022<script type="text/javascript" src="search/searchdata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010023<script type="text/javascript" src="search/search.js"></script>
24<script type="text/javascript">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000025 $(document).ready(function() { init_search(); });
Kaizen8938bd32017-09-28 14:38:23 +010026</script>
27<script type="text/x-mathjax-config">
28 MathJax.Hub.Config({
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
31});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000032</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010033<link href="doxygen.css" rel="stylesheet" type="text/css" />
34</head>
35<body>
36<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37<div id="titlearea">
38<table cellspacing="0" cellpadding="0">
39 <tbody>
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
42 <div id="projectname">Compute Library
Jenkinsb3a371b2018-05-23 11:36:53 +010043 &#160;<span id="projectnumber">18.05</span>
Kaizen8938bd32017-09-28 14:38:23 +010044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Anthony Barbier8140e1e2017-12-14 23:48:46 +000051<!-- Generated by Doxygen 1.8.11 -->
Kaizen8938bd32017-09-28 14:38:23 +010052<script type="text/javascript">
53var searchBox = new SearchBox("searchBox", "search",false,'Search');
54</script>
55 <div id="navrow1" class="tabs">
56 <ul class="tablist">
57 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
58 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
59 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
61 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62 <li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
64 <span class="left">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 alt=""/>
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75 </span>
76 </div>
77 </li>
78 </ul>
79 </div>
80 <div id="navrow2" class="tabs2">
81 <ul class="tablist">
82 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
83 <li><a href="globals.xhtml"><span>Globals</span></a></li>
84 </ul>
85 </div>
86</div><!-- top -->
87<div id="side-nav" class="ui-resizable side-nav-resizable">
88 <div id="nav-tree">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
91 </div>
92 </div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
95 </div>
96</div>
97<script type="text/javascript">
98$(document).ready(function(){initNavTree('roi__pooling__layer_8cl.xhtml','');});
99</script>
100<div id="doc-content">
101<!-- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000106</div>
Kaizen8938bd32017-09-28 14:38:23 +0100107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="javascript:void(0)" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<div class="header">
116 <div class="summary">
117<a href="#func-members">Functions</a> </div>
118 <div class="headertitle">
119<div class="title">roi_pooling_layer.cl File Reference</div> </div>
120</div><!--header-->
121<div class="contents">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000122<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Kaizen8938bd32017-09-28 14:38:23 +0100123</div>
124<p><a href="roi__pooling__layer_8cl_source.xhtml">Go to the source code of this file.</a></p>
125<table class="memberdecls">
126<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
127Functions</h2></td></tr>
128<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>
129<tr class="separator:aa841846d3e0f01df176038026eab8e25"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<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>
131<tr class="separator:a03ae72789bf65b85136cb5356b4c189b"><td class="memSeparator" colspan="2">&#160;</td></tr>
132<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 +0000133<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 +0100134<tr class="separator:aa23d7bc09d4a60b853c5b3ba5425c2ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
135<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 +0000136<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 +0100137<tr class="separator:a635f6123e4bdfef756e8959061a743b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
138</table>
139<h2 class="groupheader">Function Documentation</h2>
140<a class="anchor" id="aa23d7bc09d4a60b853c5b3ba5425c2ec"></a>
141<div class="memitem">
142<div class="memproto">
143<table class="mlabels">
144 <tr>
145 <td class="mlabels-left">
146 <table class="memname">
147 <tr>
148 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> roi_pool_1x1 </td>
149 <td>(</td>
150 <td class="paramtype">const <a class="el" href="struct_tensor3_d.xhtml">Tensor3D</a> *&#160;</td>
151 <td class="paramname"><em>input</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>region_start_x</em>, </td>
158 </tr>
159 <tr>
160 <td class="paramkey"></td>
161 <td></td>
162 <td class="paramtype">int&#160;</td>
163 <td class="paramname"><em>region_end_x</em>, </td>
164 </tr>
165 <tr>
166 <td class="paramkey"></td>
167 <td></td>
168 <td class="paramtype">int&#160;</td>
169 <td class="paramname"><em>region_start_y</em>, </td>
170 </tr>
171 <tr>
172 <td class="paramkey"></td>
173 <td></td>
174 <td class="paramtype">int&#160;</td>
175 <td class="paramname"><em>region_end_y</em>, </td>
176 </tr>
177 <tr>
178 <td class="paramkey"></td>
179 <td></td>
180 <td class="paramtype">int&#160;</td>
181 <td class="paramname"><em>pz</em>&#160;</td>
182 </tr>
183 <tr>
184 <td></td>
185 <td>)</td>
186 <td></td><td></td>
187 </tr>
188 </table>
189 </td>
190 <td class="mlabels-right">
191<span class="mlabels"><span class="mlabel">inline</span></span> </td>
192 </tr>
193</table>
194</div><div class="memdoc">
195
196<p>Performs a roi pooling on a single output pixel. </p>
197<dl class="params"><dt>Parameters</dt><dd>
198 <table class="params">
199 <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>
200 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_x</td><td>Start x index projected onto the input tensor. </td></tr>
201 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_x</td><td>End x index projected onto the input tensor. </td></tr>
202 <tr><td class="paramdir">[in]</td><td class="paramname">region_start_y</td><td>Start y index projected onto the input tensor. </td></tr>
203 <tr><td class="paramdir">[in]</td><td class="paramname">region_end_y</td><td>End y index projected onto the input tensor. </td></tr>
204 <tr><td class="paramdir">[in]</td><td class="paramname">pz</td><td>z index of the input tensor.</td></tr>
205 </table>
206 </dd>
207</dl>
208<dl class="section return"><dt>Returns</dt><dd>A max pooled value from the region specified in the input tensor. </dd></dl>
209
210<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>
211
Jenkinsb3a371b2018-05-23 11:36:53 +0100212<p>References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00315">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#l00042">VLOAD</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100213
214<p>Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00123">roi_pooling_layer()</a>.</p>
Jenkinsb3a371b2018-05-23 11:36:53 +0100215<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="fixed__point_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="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><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><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="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE)</div><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><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; for(; 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; DATA_TYPE val = *(__global DATA_TYPE *)<a class="code" href="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> (DATA_TYPE)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="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#l00042">helpers.h:42</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100216<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 +0100217<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#l00315">helpers.h:315</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100218<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>
219</div><!-- fragment -->
220</div>
221</div>
222<a class="anchor" id="a635f6123e4bdfef756e8959061a743b5"></a>
223<div class="memitem">
224<div class="memproto">
225 <table class="memname">
226 <tr>
227 <td class="memname">__kernel void roi_pooling_layer </td>
228 <td>(</td>
229 <td class="paramtype">__global uchar *&#160;</td>
230 <td class="paramname"><em>input_ptr</em>, </td>
231 </tr>
232 <tr>
233 <td class="paramkey"></td>
234 <td></td>
235 <td class="paramtype">uint&#160;</td>
236 <td class="paramname"><em>input_stride_x</em>, </td>
237 </tr>
238 <tr>
239 <td class="paramkey"></td>
240 <td></td>
241 <td class="paramtype">uint&#160;</td>
242 <td class="paramname"><em>input_step_x</em>, </td>
243 </tr>
244 <tr>
245 <td class="paramkey"></td>
246 <td></td>
247 <td class="paramtype">uint&#160;</td>
248 <td class="paramname"><em>input_stride_y</em>, </td>
249 </tr>
250 <tr>
251 <td class="paramkey"></td>
252 <td></td>
253 <td class="paramtype">uint&#160;</td>
254 <td class="paramname"><em>input_step_y</em>, </td>
255 </tr>
256 <tr>
257 <td class="paramkey"></td>
258 <td></td>
259 <td class="paramtype">uint&#160;</td>
260 <td class="paramname"><em>input_stride_z</em>, </td>
261 </tr>
262 <tr>
263 <td class="paramkey"></td>
264 <td></td>
265 <td class="paramtype">uint&#160;</td>
266 <td class="paramname"><em>input_step_z</em>, </td>
267 </tr>
268 <tr>
269 <td class="paramkey"></td>
270 <td></td>
271 <td class="paramtype">uint&#160;</td>
272 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
273 </tr>
274 <tr>
275 <td class="paramkey"></td>
276 <td></td>
277 <td class="paramtype">__global uchar *&#160;</td>
278 <td class="paramname"><em>rois_ptr</em>, </td>
279 </tr>
280 <tr>
281 <td class="paramkey"></td>
282 <td></td>
283 <td class="paramtype">uint&#160;</td>
284 <td class="paramname"><em>rois_stride_x</em>, </td>
285 </tr>
286 <tr>
287 <td class="paramkey"></td>
288 <td></td>
289 <td class="paramtype">uint&#160;</td>
290 <td class="paramname"><em>rois_step_x</em>, </td>
291 </tr>
292 <tr>
293 <td class="paramkey"></td>
294 <td></td>
295 <td class="paramtype">uint&#160;</td>
296 <td class="paramname"><em>rois_offset_first_element_in_bytes</em>, </td>
297 </tr>
298 <tr>
299 <td class="paramkey"></td>
300 <td></td>
301 <td class="paramtype">__global uchar *&#160;</td>
302 <td class="paramname"><em>output_ptr</em>, </td>
303 </tr>
304 <tr>
305 <td class="paramkey"></td>
306 <td></td>
307 <td class="paramtype">uint&#160;</td>
308 <td class="paramname"><em>output_stride_x</em>, </td>
309 </tr>
310 <tr>
311 <td class="paramkey"></td>
312 <td></td>
313 <td class="paramtype">uint&#160;</td>
314 <td class="paramname"><em>output_step_x</em>, </td>
315 </tr>
316 <tr>
317 <td class="paramkey"></td>
318 <td></td>
319 <td class="paramtype">uint&#160;</td>
320 <td class="paramname"><em>output_stride_y</em>, </td>
321 </tr>
322 <tr>
323 <td class="paramkey"></td>
324 <td></td>
325 <td class="paramtype">uint&#160;</td>
326 <td class="paramname"><em>output_step_y</em>, </td>
327 </tr>
328 <tr>
329 <td class="paramkey"></td>
330 <td></td>
331 <td class="paramtype">uint&#160;</td>
332 <td class="paramname"><em>output_stride_z</em>, </td>
333 </tr>
334 <tr>
335 <td class="paramkey"></td>
336 <td></td>
337 <td class="paramtype">uint&#160;</td>
338 <td class="paramname"><em>output_step_z</em>, </td>
339 </tr>
340 <tr>
341 <td class="paramkey"></td>
342 <td></td>
343 <td class="paramtype">uint&#160;</td>
344 <td class="paramname"><em>output_offset_first_element_in_bytes</em>, </td>
345 </tr>
346 <tr>
347 <td class="paramkey"></td>
348 <td></td>
349 <td class="paramtype">unsigned int&#160;</td>
350 <td class="paramname"><em>input_stride_w</em>, </td>
351 </tr>
352 <tr>
353 <td class="paramkey"></td>
354 <td></td>
355 <td class="paramtype">unsigned int&#160;</td>
356 <td class="paramname"><em>output_stride_w</em>&#160;</td>
357 </tr>
358 <tr>
359 <td></td>
360 <td>)</td>
361 <td></td><td></td>
362 </tr>
363 </table>
364</div><div class="memdoc">
365
366<p>Performs a roi pooling function. </p>
367<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>
368<dd>
369Datasize must be passed using -DDATA_SIZE e.g. -DDATA_SIZE=32; </dd>
370<dd>
371Input dimensions must be passed using -DMAX_DIM_X, -DMAX_DIM_Y and -DMAX_DIM_Z; </dd>
372<dd>
373Pooled region dimensions must be passed using -DPOOLED_DIM_X and -DPOOLED_DIM_Y; </dd>
374<dd>
375Spatial scale must be passed using -DSPATIAL_SCALE;</dd></dl>
376<dl class="params"><dt>Parameters</dt><dd>
377 <table class="params">
378 <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>
379 <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>
380 <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>
381 <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>
382 <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>
383 <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>
384 <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>
385 <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>
386 <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>
387 <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>
388 <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>
389 <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>
390 <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>
391 <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>
392 <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>
393 <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>
394 <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>
395 <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>
396 <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>
397 <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>
398 <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>
399 <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>
400 </table>
401 </dd>
402</dl>
403
404<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>
405
Jenkinsb3a371b2018-05-23 11:36:53 +0100406<p>References <a class="el" href="_utility_8h_source.xhtml#l00084">arm_compute::utility::clamp()</a>, <a class="el" href="helpers_8h_source.xhtml#l00123">CONVERT_TO_TENSOR3D_STRUCT_NO_STEP</a>, <a class="el" href="helpers_8h_source.xhtml#l00101">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#l00153">Tensor3D::ptr</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00061">roi_pool_1x1()</a>, <a class="el" href="namespacearm__compute.xhtml#a6452ac376d4adb94d93a93d678bb6757">arm_compute::round()</a>, <a class="el" href="helpers_8h_source.xhtml#l00315">tensor3D_offset()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00292">vector_offset()</a>.</p>
407<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="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="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="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="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="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#a6452ac376d4adb94d93a93d678bb6757">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#a6452ac376d4adb94d93a93d678bb6757">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="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="helpers_8h_source.xhtml#l00134">helpers.h:134</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100408<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 +0100409<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>
410<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#l00151">helpers.h:151</a></div></div>
411<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#l00315">helpers.h:315</a></div></div>
412<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#l00123">helpers.h:123</a></div></div>
413<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#l00101">helpers.h:101</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100414<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>
Jenkinsb3a371b2018-05-23 11:36:53 +0100415<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#l00292">helpers.h:292</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000416<div class="ttc" id="namespacearm__compute_xhtml_a6452ac376d4adb94d93a93d678bb6757"><div class="ttname"><a href="namespacearm__compute.xhtml#a6452ac376d4adb94d93a93d678bb6757">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>
Jenkinsb3a371b2018-05-23 11:36:53 +0100417<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#l00153">helpers.h:153</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100418</div><!-- fragment -->
419</div>
420</div>
421<a class="anchor" id="aa841846d3e0f01df176038026eab8e25"></a>
422<div class="memitem">
423<div class="memproto">
424<table class="mlabels">
425 <tr>
426 <td class="mlabels-left">
427 <table class="memname">
428 <tr>
429 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec4_max </td>
430 <td>(</td>
431 <td class="paramtype">DATA_TYPE4&#160;</td>
432 <td class="paramname"><em>vec</em></td><td>)</td>
433 <td></td>
434 </tr>
435 </table>
436 </td>
437 <td class="mlabels-right">
438<span class="mlabels"><span class="mlabel">inline</span></span> </td>
439 </tr>
440</table>
441</div><div class="memdoc">
442
443<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>
444
445<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>
446
447<p>Referenced by <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">vec8_max()</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000448<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="fixed__point_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>
Kaizen8938bd32017-09-28 14:38:23 +0100449<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>
450</div><!-- fragment -->
451</div>
452</div>
453<a class="anchor" id="a03ae72789bf65b85136cb5356b4c189b"></a>
454<div class="memitem">
455<div class="memproto">
456<table class="mlabels">
457 <tr>
458 <td class="mlabels-left">
459 <table class="memname">
460 <tr>
461 <td class="memname"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> vec8_max </td>
462 <td>(</td>
463 <td class="paramtype">DATA_TYPE8&#160;</td>
464 <td class="paramname"><em>vec</em></td><td>)</td>
465 <td></td>
466 </tr>
467 </table>
468 </td>
469 <td class="mlabels-right">
470<span class="mlabels"><span class="mlabel">inline</span></span> </td>
471 </tr>
472</table>
473</div><div class="memdoc">
474
475<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>
476
477<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>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000478<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="fixed__point_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 +0100479<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>
480<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>
481</div><!-- fragment -->
482</div>
483</div>
484</div><!-- contents -->
485</div><!-- doc-content -->
486<!-- start footer part -->
487<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
488 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000489 <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>
Jenkinsb3a371b2018-05-23 11:36:53 +0100490 <li class="footer">Generated on Wed May 23 2018 11:36:39 for Compute Library by
Kaizen8938bd32017-09-28 14:38:23 +0100491 <a href="http://www.doxygen.org/index.html">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000492 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
Kaizen8938bd32017-09-28 14:38:23 +0100493 </ul>
494</div>
495</body>
496</html>