blob: ffed4a0c3f5e94b74d1539904476bbb4a3538912 [file] [log] [blame]
Anthony Barbier8140e1e2017-12-14 23:48:46 +00001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00007<meta name="generator" content="Doxygen 1.8.13"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: src/core/CL/cl_kernels/pooling_layer_quantized.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="navtreedata.js"></script>
16<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Anthony Barbier8140e1e2017-12-14 23:48:46 +000019</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
21<script type="text/javascript" src="search/searchdata.js"></script>
22<script type="text/javascript" src="search/search.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000023<script type="text/x-mathjax-config">
24 MathJax.Hub.Config({
25 extensions: ["tex2jax.js"],
26 jax: ["input/TeX","output/HTML-CSS"],
27});
28</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
29<link href="doxygen.css" rel="stylesheet" type="text/css" />
30</head>
31<body>
32<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33<div id="titlearea">
34<table cellspacing="0" cellpadding="0">
35 <tbody>
36 <tr style="height: 56px;">
37 <td style="padding-left: 0.5em;">
38 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000040 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
Jenkinsb9abeae2018-11-22 11:58:08 +000047<!-- Generated by Doxygen 1.8.13 -->
Anthony Barbier8140e1e2017-12-14 23:48:46 +000048<script type="text/javascript">
49var searchBox = new SearchBox("searchBox", "search",false,'Search');
50</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000051<script type="text/javascript" src="menudata.js"></script>
52<script type="text/javascript" src="menu.js"></script>
53<script type="text/javascript">
54$(function() {
55 initMenu('',true,false,'search.php','Search');
56 $(document).ready(function() { init_search(); });
57});
58</script>
59<div id="main-nav"></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000060</div><!-- top -->
61<div id="side-nav" class="ui-resizable side-nav-resizable">
62 <div id="nav-tree">
63 <div id="nav-tree-contents">
64 <div id="nav-sync" class="sync"></div>
65 </div>
66 </div>
67 <div id="splitbar" style="-moz-user-select:none;"
68 class="ui-resizable-handle">
69 </div>
70</div>
71<script type="text/javascript">
72$(document).ready(function(){initNavTree('pooling__layer__quantized_8cl.xhtml','');});
73</script>
74<div id="doc-content">
75<!-- window showing the filter options -->
76<div id="MSearchSelectWindow"
77 onmouseover="return searchBox.OnSearchSelectShow()"
78 onmouseout="return searchBox.OnSearchSelectHide()"
79 onkeydown="return searchBox.OnSearchSelectKey(event)">
80</div>
81
82<!-- iframe showing the search results (closed by default) -->
83<div id="MSearchResultsWindow">
84<iframe src="javascript:void(0)" frameborder="0"
85 name="MSearchResults" id="MSearchResults">
86</iframe>
87</div>
88
89<div class="header">
90 <div class="summary">
91<a href="#define-members">Macros</a> &#124;
92<a href="#func-members">Functions</a> </div>
93 <div class="headertitle">
94<div class="title">pooling_layer_quantized.cl File Reference</div> </div>
95</div><!--header-->
96<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +000097<div class="textblock"><code>#include &quot;<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Anthony Barbier8140e1e2017-12-14 23:48:46 +000098</div>
99<p><a href="pooling__layer__quantized_8cl_source.xhtml">Go to the source code of this file.</a></p>
100<table class="memberdecls">
101<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
102Macros</h2></td></tr>
103<tr class="memitem:a482ef7d59a5f474ca126e737c7f0978a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(x, y)&#160;&#160;&#160;((x) + (y))</td></tr>
104<tr class="separator:a482ef7d59a5f474ca126e737c7f0978a"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:a5db17889d824975fefb2ce2f4690637f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a>(x, y)&#160;&#160;&#160;(x * (1.f / y))</td></tr>
106<tr class="separator:a5db17889d824975fefb2ce2f4690637f"><td class="memSeparator" colspan="2">&#160;</td></tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100107<tr class="memitem:a6c01fa98d360a9d52926dc6a5a599711"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a>(x, y)&#160;&#160;&#160;(convert_float8(x) * (float8)(1.f / y))</td></tr>
108<tr class="separator:a6c01fa98d360a9d52926dc6a5a599711"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000109</table><table class="memberdecls">
110<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
111Functions</h2></td></tr>
Anthony Barbier06ea0482018-02-22 15:45:35 +0000112<tr class="memitem:a4057c01dd49145c5e463f1cea52542df"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a> (const int pool_size_x, const int pool_size_y, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</td></tr>
113<tr class="separator:a4057c01dd49145c5e463f1cea52542df"><td class="memSeparator" colspan="2">&#160;</td></tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100114<tr class="memitem:a5c74cefcb6318451b5785dd00bd9b05f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a5c74cefcb6318451b5785dd00bd9b05f">pooling_layer_MxN_quantized_nchw</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 *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)</td></tr>
115<tr class="memdesc:a5c74cefcb6318451b5785dd00bd9b05f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a pooling function of pool size equal to N (NCHW) <a href="#a5c74cefcb6318451b5785dd00bd9b05f">More...</a><br /></td></tr>
116<tr class="separator:a5c74cefcb6318451b5785dd00bd9b05f"><td class="memSeparator" colspan="2">&#160;</td></tr>
117<tr class="memitem:a235920cb0f8577da6e104ccb03fbda25"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a> (const int pool_size_x, const int pool_size_y, int upper_bound_w, int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</td></tr>
118<tr class="separator:a235920cb0f8577da6e104ccb03fbda25"><td class="memSeparator" colspan="2">&#160;</td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000119<tr class="memitem:a1231ef5ce1d409f6bd145e971fa7e2ea"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pooling__layer__quantized_8cl.xhtml#a1231ef5ce1d409f6bd145e971fa7e2ea">pooling_layer_MxN_quantized_nhwc</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_stride_w, uint input_step_w, uint input_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_stride_w, uint output_step_w, uint output_offset_first_element_in_bytes)</td></tr>
120<tr class="memdesc:a1231ef5ce1d409f6bd145e971fa7e2ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a pooling function of pool size equal to N (NHWC) <a href="#a1231ef5ce1d409f6bd145e971fa7e2ea">More...</a><br /></td></tr>
121<tr class="separator:a1231ef5ce1d409f6bd145e971fa7e2ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000122</table>
123<h2 class="groupheader">Macro Definition Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000124<a id="a5db17889d824975fefb2ce2f4690637f"></a>
125<h2 class="memtitle"><span class="permalink"><a href="#a5db17889d824975fefb2ce2f4690637f">&#9670;&nbsp;</a></span>DIV_OP</h2>
126
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000127<div class="memitem">
128<div class="memproto">
129 <table class="memname">
130 <tr>
131 <td class="memname">#define DIV_OP</td>
132 <td>(</td>
133 <td class="paramtype">&#160;</td>
134 <td class="paramname">x, </td>
135 </tr>
136 <tr>
137 <td class="paramkey"></td>
138 <td></td>
139 <td class="paramtype">&#160;</td>
140 <td class="paramname">y&#160;</td>
141 </tr>
142 <tr>
143 <td></td>
144 <td>)</td>
145 <td></td><td>&#160;&#160;&#160;(x * (1.f / y))</td>
146 </tr>
147 </table>
148</div><div class="memdoc">
149
Jenkinsb9abeae2018-11-22 11:58:08 +0000150<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00032">32</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000151
Jenkinsb9abeae2018-11-22 11:58:08 +0000152<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00080">pooling_layer_MxN_quantized_nchw()</a>.</p>
Jenkinsb3a371b2018-05-23 11:36:53 +0100153
154</div>
155</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000156<a id="a6c01fa98d360a9d52926dc6a5a599711"></a>
157<h2 class="memtitle"><span class="permalink"><a href="#a6c01fa98d360a9d52926dc6a5a599711">&#9670;&nbsp;</a></span>DIV_OP_NHWC</h2>
158
Jenkinsb3a371b2018-05-23 11:36:53 +0100159<div class="memitem">
160<div class="memproto">
161 <table class="memname">
162 <tr>
163 <td class="memname">#define DIV_OP_NHWC</td>
164 <td>(</td>
165 <td class="paramtype">&#160;</td>
166 <td class="paramname">x, </td>
167 </tr>
168 <tr>
169 <td class="paramkey"></td>
170 <td></td>
171 <td class="paramtype">&#160;</td>
172 <td class="paramname">y&#160;</td>
173 </tr>
174 <tr>
175 <td></td>
176 <td>)</td>
177 <td></td><td>&#160;&#160;&#160;(convert_float8(x) * (float8)(1.f / y))</td>
178 </tr>
179 </table>
180</div><div class="memdoc">
181
Jenkinsb9abeae2018-11-22 11:58:08 +0000182<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00034">34</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Jenkinsb3a371b2018-05-23 11:36:53 +0100183
Jenkinsb9abeae2018-11-22 11:58:08 +0000184<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00174">pooling_layer_MxN_quantized_nhwc()</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000185
186</div>
187</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000188<a id="a482ef7d59a5f474ca126e737c7f0978a"></a>
189<h2 class="memtitle"><span class="permalink"><a href="#a482ef7d59a5f474ca126e737c7f0978a">&#9670;&nbsp;</a></span>POOL_OP</h2>
190
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000191<div class="memitem">
192<div class="memproto">
193 <table class="memname">
194 <tr>
195 <td class="memname">#define POOL_OP</td>
196 <td>(</td>
197 <td class="paramtype">&#160;</td>
198 <td class="paramname">x, </td>
199 </tr>
200 <tr>
201 <td class="paramkey"></td>
202 <td></td>
203 <td class="paramtype">&#160;</td>
204 <td class="paramname">y&#160;</td>
205 </tr>
206 <tr>
207 <td></td>
208 <td>)</td>
209 <td></td><td>&#160;&#160;&#160;((x) + (y))</td>
210 </tr>
211 </table>
212</div><div class="memdoc">
213
Jenkinsb9abeae2018-11-22 11:58:08 +0000214<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00027">27</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000215
Jenkinsb9abeae2018-11-22 11:58:08 +0000216<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00080">pooling_layer_MxN_quantized_nchw()</a>, and <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00174">pooling_layer_MxN_quantized_nhwc()</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000217
218</div>
219</div>
220<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000221<a id="a4057c01dd49145c5e463f1cea52542df"></a>
222<h2 class="memtitle"><span class="permalink"><a href="#a4057c01dd49145c5e463f1cea52542df">&#9670;&nbsp;</a></span>calculate_avg_scale()</h2>
223
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000224<div class="memitem">
225<div class="memproto">
226 <table class="memname">
227 <tr>
228 <td class="memname">int calculate_avg_scale </td>
229 <td>(</td>
230 <td class="paramtype">const int&#160;</td>
Anthony Barbier06ea0482018-02-22 15:45:35 +0000231 <td class="paramname"><em>pool_size_x</em>, </td>
232 </tr>
233 <tr>
234 <td class="paramkey"></td>
235 <td></td>
236 <td class="paramtype">const int&#160;</td>
237 <td class="paramname"><em>pool_size_y</em>, </td>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000238 </tr>
239 <tr>
240 <td class="paramkey"></td>
241 <td></td>
242 <td class="paramtype">const int&#160;</td>
243 <td class="paramname"><em>upper_bound_w</em>, </td>
244 </tr>
245 <tr>
246 <td class="paramkey"></td>
247 <td></td>
248 <td class="paramtype">const int&#160;</td>
249 <td class="paramname"><em>upper_bound_h</em>, </td>
250 </tr>
251 <tr>
252 <td class="paramkey"></td>
253 <td></td>
254 <td class="paramtype">const int&#160;</td>
255 <td class="paramname"><em>pad_x</em>, </td>
256 </tr>
257 <tr>
258 <td class="paramkey"></td>
259 <td></td>
260 <td class="paramtype">const int&#160;</td>
261 <td class="paramname"><em>pad_y</em>, </td>
262 </tr>
263 <tr>
264 <td class="paramkey"></td>
265 <td></td>
266 <td class="paramtype">const int&#160;</td>
267 <td class="paramname"><em>stride_x</em>, </td>
268 </tr>
269 <tr>
270 <td class="paramkey"></td>
271 <td></td>
272 <td class="paramtype">const int&#160;</td>
273 <td class="paramname"><em>stride_y</em>&#160;</td>
274 </tr>
275 <tr>
276 <td></td>
277 <td>)</td>
278 <td></td><td></td>
279 </tr>
280 </table>
281</div><div class="memdoc">
282
Jenkinsb9abeae2018-11-22 11:58:08 +0000283<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00040">40</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000284
Jenkinsb9abeae2018-11-22 11:58:08 +0000285<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00080">pooling_layer_MxN_quantized_nchw()</a>.</p>
Jenkins52ba29e2018-08-29 15:32:11 +0000286<div class="fragment"><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;{</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keywordtype">int</span> start_x = get_global_id(0) * stride_x - pad_x;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordtype">int</span> start_y = get_global_id(1) * stride_y - pad_y;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = min(start_x + pool_size_x, upper_bound_w);</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = min(start_y + pool_size_y, upper_bound_h);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#if defined(EXCLUDE_PADDING)</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; start_x = max(0, start_x);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; start_y = max(0, start_y);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(EXCLUDE_PADDING) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keywordflow">return</span> ((end_y - start_y) * (end_x - start_x));</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;}</div></div><!-- fragment -->
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000287</div>
288</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000289<a id="a235920cb0f8577da6e104ccb03fbda25"></a>
290<h2 class="memtitle"><span class="permalink"><a href="#a235920cb0f8577da6e104ccb03fbda25">&#9670;&nbsp;</a></span>calculate_avg_scale_nhwc()</h2>
291
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000292<div class="memitem">
293<div class="memproto">
294 <table class="memname">
295 <tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100296 <td class="memname">int calculate_avg_scale_nhwc </td>
297 <td>(</td>
298 <td class="paramtype">const int&#160;</td>
299 <td class="paramname"><em>pool_size_x</em>, </td>
300 </tr>
301 <tr>
302 <td class="paramkey"></td>
303 <td></td>
304 <td class="paramtype">const int&#160;</td>
305 <td class="paramname"><em>pool_size_y</em>, </td>
306 </tr>
307 <tr>
308 <td class="paramkey"></td>
309 <td></td>
310 <td class="paramtype">int&#160;</td>
311 <td class="paramname"><em>upper_bound_w</em>, </td>
312 </tr>
313 <tr>
314 <td class="paramkey"></td>
315 <td></td>
316 <td class="paramtype">int&#160;</td>
317 <td class="paramname"><em>upper_bound_h</em>, </td>
318 </tr>
319 <tr>
320 <td class="paramkey"></td>
321 <td></td>
322 <td class="paramtype">const int&#160;</td>
323 <td class="paramname"><em>pad_x</em>, </td>
324 </tr>
325 <tr>
326 <td class="paramkey"></td>
327 <td></td>
328 <td class="paramtype">const int&#160;</td>
329 <td class="paramname"><em>pad_y</em>, </td>
330 </tr>
331 <tr>
332 <td class="paramkey"></td>
333 <td></td>
334 <td class="paramtype">const int&#160;</td>
335 <td class="paramname"><em>stride_x</em>, </td>
336 </tr>
337 <tr>
338 <td class="paramkey"></td>
339 <td></td>
340 <td class="paramtype">const int&#160;</td>
341 <td class="paramname"><em>stride_y</em>&#160;</td>
342 </tr>
343 <tr>
344 <td></td>
345 <td>)</td>
346 <td></td><td></td>
347 </tr>
348 </table>
349</div><div class="memdoc">
350
Jenkinsb9abeae2018-11-22 11:58:08 +0000351<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00125">125</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Jenkinsb3a371b2018-05-23 11:36:53 +0100352
Jenkinsb9abeae2018-11-22 11:58:08 +0000353<p class="reference">Referenced by <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00174">pooling_layer_MxN_quantized_nhwc()</a>.</p>
354<div class="fragment"><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;{</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordtype">int</span> start_x = get_global_id(1) * stride_x - pad_x;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordtype">int</span> start_y = (get_global_id(2) % DST_DEPTH) * stride_y - pad_y;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; <span class="keywordtype">int</span> start_y = get_global_id(2) * stride_y - pad_y;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = min(start_x + pool_size_x, upper_bound_w);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = min(start_y + pool_size_y, upper_bound_h);</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; start_x = max(0, start_x);</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; start_y = max(0, start_y);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordflow">return</span> ((end_y - start_y) * (end_x - start_x));</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;}</div></div><!-- fragment -->
Jenkinsb3a371b2018-05-23 11:36:53 +0100355</div>
356</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000357<a id="a5c74cefcb6318451b5785dd00bd9b05f"></a>
358<h2 class="memtitle"><span class="permalink"><a href="#a5c74cefcb6318451b5785dd00bd9b05f">&#9670;&nbsp;</a></span>pooling_layer_MxN_quantized_nchw()</h2>
359
Jenkinsb3a371b2018-05-23 11:36:53 +0100360<div class="memitem">
361<div class="memproto">
362 <table class="memname">
363 <tr>
364 <td class="memname">__kernel void pooling_layer_MxN_quantized_nchw </td>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000365 <td>(</td>
366 <td class="paramtype">__global uchar *&#160;</td>
367 <td class="paramname"><em>input_ptr</em>, </td>
368 </tr>
369 <tr>
370 <td class="paramkey"></td>
371 <td></td>
372 <td class="paramtype">uint&#160;</td>
373 <td class="paramname"><em>input_stride_x</em>, </td>
374 </tr>
375 <tr>
376 <td class="paramkey"></td>
377 <td></td>
378 <td class="paramtype">uint&#160;</td>
379 <td class="paramname"><em>input_step_x</em>, </td>
380 </tr>
381 <tr>
382 <td class="paramkey"></td>
383 <td></td>
384 <td class="paramtype">uint&#160;</td>
385 <td class="paramname"><em>input_stride_y</em>, </td>
386 </tr>
387 <tr>
388 <td class="paramkey"></td>
389 <td></td>
390 <td class="paramtype">uint&#160;</td>
391 <td class="paramname"><em>input_step_y</em>, </td>
392 </tr>
393 <tr>
394 <td class="paramkey"></td>
395 <td></td>
396 <td class="paramtype">uint&#160;</td>
397 <td class="paramname"><em>input_stride_z</em>, </td>
398 </tr>
399 <tr>
400 <td class="paramkey"></td>
401 <td></td>
402 <td class="paramtype">uint&#160;</td>
403 <td class="paramname"><em>input_step_z</em>, </td>
404 </tr>
405 <tr>
406 <td class="paramkey"></td>
407 <td></td>
408 <td class="paramtype">uint&#160;</td>
409 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
410 </tr>
411 <tr>
412 <td class="paramkey"></td>
413 <td></td>
414 <td class="paramtype">__global uchar *&#160;</td>
415 <td class="paramname"><em>output_ptr</em>, </td>
416 </tr>
417 <tr>
418 <td class="paramkey"></td>
419 <td></td>
420 <td class="paramtype">uint&#160;</td>
421 <td class="paramname"><em>output_stride_x</em>, </td>
422 </tr>
423 <tr>
424 <td class="paramkey"></td>
425 <td></td>
426 <td class="paramtype">uint&#160;</td>
427 <td class="paramname"><em>output_step_x</em>, </td>
428 </tr>
429 <tr>
430 <td class="paramkey"></td>
431 <td></td>
432 <td class="paramtype">uint&#160;</td>
433 <td class="paramname"><em>output_stride_y</em>, </td>
434 </tr>
435 <tr>
436 <td class="paramkey"></td>
437 <td></td>
438 <td class="paramtype">uint&#160;</td>
439 <td class="paramname"><em>output_step_y</em>, </td>
440 </tr>
441 <tr>
442 <td class="paramkey"></td>
443 <td></td>
444 <td class="paramtype">uint&#160;</td>
445 <td class="paramname"><em>output_stride_z</em>, </td>
446 </tr>
447 <tr>
448 <td class="paramkey"></td>
449 <td></td>
450 <td class="paramtype">uint&#160;</td>
451 <td class="paramname"><em>output_step_z</em>, </td>
452 </tr>
453 <tr>
454 <td class="paramkey"></td>
455 <td></td>
456 <td class="paramtype">uint&#160;</td>
457 <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
458 </tr>
459 <tr>
460 <td></td>
461 <td>)</td>
462 <td></td><td></td>
463 </tr>
464 </table>
465</div><div class="memdoc">
466
Jenkinsb3a371b2018-05-23 11:36:53 +0100467<p>Performs a pooling function of pool size equal to N (NCHW) </p>
Anthony Barbier06ea0482018-02-22 15:45:35 +0000468<dl class="section note"><dt>Note</dt><dd>Pool sizes must be passed using -DPOOL_SIZE_X and -DPOOL_SIZE_Y e.g. -DPOOL_SIZE_X=13; </dd>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000469<dd>
470In case of average pooling the following information must be passed at compile time: -DPOOL_AVG must be provided otherwise max pooling will be performed. -DMAX_WIDTH and -DMAX_HEIGHT which are the maximum accessible indeces in x and y dimensions (width + pad) -DSTRIDE_X and -DSTRIDE_Y which are the steps of the window along the x and y directions -DPAD_X and -DPAD_Y which are the pooling paddings in x and y dimension</dd></dl>
471<dl class="params"><dt>Parameters</dt><dd>
472 <table class="params">
473 <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported data types: QASYMM8 </td></tr>
474 <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>
475 <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>
476 <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>
477 <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>
478 <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>
479 <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>
480 <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 source image </td></tr>
481 <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported data types: same as <code>input_ptr</code> </td></tr>
482 <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>
483 <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>
484 <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>
485 <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>
486 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr>
487 <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>
488 <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>
489 </table>
490 </dd>
491</dl>
492
Jenkinsb9abeae2018-11-22 11:58:08 +0000493<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00080">80</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000494
Jenkinsb9abeae2018-11-22 11:58:08 +0000495<p class="reference">References <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00040">calculate_avg_scale()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00125">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00032">DIV_OP</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00027">POOL_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">Tensor3D::ptr</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">tensor3D_offset()</a>.</p>
496<div class="fragment"><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; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</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; int8 vdata = 0;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordtype">int</span> sdata = 0;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="comment">// Load data</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y &lt; POOL_SIZE_Y; y++)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keywordtype">int</span> x = 0;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordflow">for</span>(; x &lt;= ((int)POOL_SIZE_X - 8); x += 8)</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; {</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;input, x, y, 0));</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; int8 data0 = convert_int8(data);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; vdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata, data0);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; }</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="comment">// Leftover</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="keywordflow">for</span>(; x &lt; (int)POOL_SIZE_X; ++x)</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; {</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; uchar data = *((__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;input, x, y, 0));</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keywordtype">int</span> data0 = convert_int(data);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; sdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(sdata, data0);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; }</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="comment">// Reduce result</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; int4 reduce4 = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata.s0123, vdata.s4567);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; int2 reduce2 = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(reduce4.s01, reduce4.s23);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="keywordtype">int</span> res = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(reduce2.s0, reduce2.s1);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; res = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(res, sdata);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;<span class="preprocessor">#if defined(POOL_AVG)</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; res = <a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(<a class="code" href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a>(res, <a class="code" href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a>(POOL_SIZE_X, POOL_SIZE_Y, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y)));</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(POOL_AVG) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="comment">// Store result</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; *(__global uchar *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> = convert_uchar(res);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;}</div><div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a482ef7d59a5f474ca126e737c7f0978a"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a></div><div class="ttdeci">#define POOL_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00027">pooling_layer_quantized.cl:27</a></div></div>
497<div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00157">helpers.h:157</a></div></div>
498<div class="ttc" id="namespacearm__compute_xhtml_aaae2b6b1c3f4404121346a4c27b22647"><div class="ttname"><a href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">arm_compute::round</a></div><div class="ttdeci">int round(float x, RoundingPolicy rounding_policy)</div><div class="ttdoc">Return a rounded value of x. </div><div class="ttdef"><b>Definition:</b> <a href="_rounding_8cpp_source.xhtml#l00035">Rounding.cpp:35</a></div></div>
499<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00125">helpers.h:125</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000500<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a5db17889d824975fefb2ce2f4690637f"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a5db17889d824975fefb2ce2f4690637f">DIV_OP</a></div><div class="ttdeci">#define DIV_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00032">pooling_layer_quantized.cl:32</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000501<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">helpers.h:159</a></div></div>
502<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a></div><div class="ttdeci">__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)</div><div class="ttdoc">Get the pointer position of a Tensor3D. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">helpers.h:321</a></div></div>
Jenkinsb3a371b2018-05-23 11:36:53 +0100503<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a4057c01dd49145c5e463f1cea52542df"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a4057c01dd49145c5e463f1cea52542df">calculate_avg_scale</a></div><div class="ttdeci">int calculate_avg_scale(const int pool_size_x, const int pool_size_y, const int upper_bound_w, const int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00040">pooling_layer_quantized.cl:40</a></div></div>
504</div><!-- fragment -->
505</div>
506</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000507<a id="a1231ef5ce1d409f6bd145e971fa7e2ea"></a>
508<h2 class="memtitle"><span class="permalink"><a href="#a1231ef5ce1d409f6bd145e971fa7e2ea">&#9670;&nbsp;</a></span>pooling_layer_MxN_quantized_nhwc()</h2>
509
Jenkinsb3a371b2018-05-23 11:36:53 +0100510<div class="memitem">
511<div class="memproto">
512 <table class="memname">
513 <tr>
514 <td class="memname">__kernel void pooling_layer_MxN_quantized_nhwc </td>
515 <td>(</td>
516 <td class="paramtype">__global uchar *&#160;</td>
517 <td class="paramname"><em>input_ptr</em>, </td>
518 </tr>
519 <tr>
520 <td class="paramkey"></td>
521 <td></td>
522 <td class="paramtype">uint&#160;</td>
523 <td class="paramname"><em>input_stride_x</em>, </td>
524 </tr>
525 <tr>
526 <td class="paramkey"></td>
527 <td></td>
528 <td class="paramtype">uint&#160;</td>
529 <td class="paramname"><em>input_step_x</em>, </td>
530 </tr>
531 <tr>
532 <td class="paramkey"></td>
533 <td></td>
534 <td class="paramtype">uint&#160;</td>
535 <td class="paramname"><em>input_stride_y</em>, </td>
536 </tr>
537 <tr>
538 <td class="paramkey"></td>
539 <td></td>
540 <td class="paramtype">uint&#160;</td>
541 <td class="paramname"><em>input_step_y</em>, </td>
542 </tr>
543 <tr>
544 <td class="paramkey"></td>
545 <td></td>
546 <td class="paramtype">uint&#160;</td>
547 <td class="paramname"><em>input_stride_z</em>, </td>
548 </tr>
549 <tr>
550 <td class="paramkey"></td>
551 <td></td>
552 <td class="paramtype">uint&#160;</td>
553 <td class="paramname"><em>input_step_z</em>, </td>
554 </tr>
555 <tr>
556 <td class="paramkey"></td>
557 <td></td>
558 <td class="paramtype">uint&#160;</td>
Jenkinsb9abeae2018-11-22 11:58:08 +0000559 <td class="paramname"><em>input_stride_w</em>, </td>
560 </tr>
561 <tr>
562 <td class="paramkey"></td>
563 <td></td>
564 <td class="paramtype">uint&#160;</td>
565 <td class="paramname"><em>input_step_w</em>, </td>
566 </tr>
567 <tr>
568 <td class="paramkey"></td>
569 <td></td>
570 <td class="paramtype">uint&#160;</td>
Jenkinsb3a371b2018-05-23 11:36:53 +0100571 <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td>
572 </tr>
573 <tr>
574 <td class="paramkey"></td>
575 <td></td>
576 <td class="paramtype">__global uchar *&#160;</td>
577 <td class="paramname"><em>output_ptr</em>, </td>
578 </tr>
579 <tr>
580 <td class="paramkey"></td>
581 <td></td>
582 <td class="paramtype">uint&#160;</td>
583 <td class="paramname"><em>output_stride_x</em>, </td>
584 </tr>
585 <tr>
586 <td class="paramkey"></td>
587 <td></td>
588 <td class="paramtype">uint&#160;</td>
589 <td class="paramname"><em>output_step_x</em>, </td>
590 </tr>
591 <tr>
592 <td class="paramkey"></td>
593 <td></td>
594 <td class="paramtype">uint&#160;</td>
595 <td class="paramname"><em>output_stride_y</em>, </td>
596 </tr>
597 <tr>
598 <td class="paramkey"></td>
599 <td></td>
600 <td class="paramtype">uint&#160;</td>
601 <td class="paramname"><em>output_step_y</em>, </td>
602 </tr>
603 <tr>
604 <td class="paramkey"></td>
605 <td></td>
606 <td class="paramtype">uint&#160;</td>
607 <td class="paramname"><em>output_stride_z</em>, </td>
608 </tr>
609 <tr>
610 <td class="paramkey"></td>
611 <td></td>
612 <td class="paramtype">uint&#160;</td>
613 <td class="paramname"><em>output_step_z</em>, </td>
614 </tr>
615 <tr>
616 <td class="paramkey"></td>
617 <td></td>
618 <td class="paramtype">uint&#160;</td>
Jenkinsb9abeae2018-11-22 11:58:08 +0000619 <td class="paramname"><em>output_stride_w</em>, </td>
620 </tr>
621 <tr>
622 <td class="paramkey"></td>
623 <td></td>
624 <td class="paramtype">uint&#160;</td>
625 <td class="paramname"><em>output_step_w</em>, </td>
626 </tr>
627 <tr>
628 <td class="paramkey"></td>
629 <td></td>
630 <td class="paramtype">uint&#160;</td>
Jenkinsb3a371b2018-05-23 11:36:53 +0100631 <td class="paramname"><em>output_offset_first_element_in_bytes</em>&#160;</td>
632 </tr>
633 <tr>
634 <td></td>
635 <td>)</td>
636 <td></td><td></td>
637 </tr>
638 </table>
639</div><div class="memdoc">
640
641<p>Performs a pooling function of pool size equal to N (NHWC) </p>
642<dl class="section note"><dt>Note</dt><dd>Pool sizes must be passed using -DPOOL_SIZE_X and -DPOOL_SIZE_Y e.g. -DPOOL_SIZE_X=13; </dd>
643<dd>
644Tensors width and height must be passed at compile time using -DMAX_WIDTH and -DMAX_HEIGHT </dd>
645<dd>
646Strides must be passed at compile time using -DSTRIDE_X and -DSTRIDE_Y which are the steps of the window along the x and y directions </dd>
647<dd>
648Pad values must be passed at compile time using -DPAD_X and -DPAD_Y which are the pooling paddings in x and y dimension </dd>
649<dd>
650In case of average pooling the following information must be passed at compile time: -DPOOL_AVG must be provided otherwise max pooling will be performed.</dd></dl>
651<dl class="params"><dt>Parameters</dt><dd>
652 <table class="params">
653 <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the source image. Supported data types: QASYMM8 </td></tr>
654 <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>
655 <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>
656 <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>
657 <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>
658 <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>
659 <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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000660 <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_w</td><td>Stride of the source tensor in W dimension (in bytes) </td></tr>
661 <tr><td class="paramdir">[in]</td><td class="paramname">input_step_w</td><td>input_stride_w * number of elements along W processed per workitem(in bytes) </td></tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100662 <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 source image </td></tr>
663 <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination image. Supported data types: same as <code>input_ptr</code> </td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000664 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination tensor in X dimension (in bytes) </td></tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100665 <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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000666 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination tensor in Y dimension (in bytes) </td></tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100667 <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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000668 <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>
Jenkinsb3a371b2018-05-23 11:36:53 +0100669 <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>
Jenkinsb9abeae2018-11-22 11:58:08 +0000670 <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_w</td><td>Stride of the destination tensor in W dimension (in bytes) </td></tr>
671 <tr><td class="paramdir">[in]</td><td class="paramname">output_step_w</td><td>output_stride_w * number of elements along W processed per workitem(in bytes) </td></tr>
Jenkinsb3a371b2018-05-23 11:36:53 +0100672 <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>
673 </table>
674 </dd>
675</dl>
676
Jenkinsb9abeae2018-11-22 11:58:08 +0000677<p class="definition">Definition at line <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00174">174</a> of file <a class="el" href="pooling__layer__quantized_8cl_source.xhtml">pooling_layer_quantized.cl</a>.</p>
Jenkinsb3a371b2018-05-23 11:36:53 +0100678
Jenkinsb9abeae2018-11-22 11:58:08 +0000679<p class="reference">References <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00125">calculate_avg_scale_nhwc()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00125">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00132">CONVERT_TO_TENSOR4D_STRUCT</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00034">DIV_OP_NHWC</a>, <a class="el" href="pooling__layer__quantized_8cl_source.xhtml#l00027">POOL_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">Tensor3D::ptr</a>, <a class="el" href="_rounding_8cpp_source.xhtml#l00035">arm_compute::round()</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">tensor3D_offset()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00334">tensor4D_offset()</a>.</p>
680<div class="fragment"><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;{</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;<span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <a class="code" href="struct_tensor4_d.xhtml">Tensor4D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a>(input, DST_DEPTH);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <a class="code" href="struct_tensor4_d.xhtml">Tensor4D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a>(output, DST_DEPTH);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> input = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> output = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; int8 vdata = 0;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = get_global_id(1) * STRIDE_X;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = (get_global_id(2) % DST_DEPTH) * STRIDE_Y;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = get_global_id(2) * STRIDE_Y;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> y = 0; y &lt; POOL_SIZE_Y; ++y)</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; {</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="keywordtype">int</span> y1 = select(y, PAD_Y - idx_height, y + idx_height - PAD_Y &lt; 0 || y + idx_height - PAD_Y &gt;= MAX_HEIGHT);</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> x = 0; x &lt; POOL_SIZE_X; ++x)</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; {</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <span class="keywordtype">int</span> x1 = select(x, PAD_X - idx_width - 1, x + idx_width - PAD_X &lt; 0 || x + idx_width - PAD_X &gt;= MAX_WIDTH);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; x1 = select(x1, PAD_X - idx_width - 1, y != y1);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="preprocessor">#if defined(DST_DEPTH)</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#ad442fb5ec8be1fff97f543150de5d822">tensor4D_offset</a>(&amp;input, 0, x1 - PAD_X, y1 - PAD_Y, 0));</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; uchar8 data = vload8(0, (__global uchar *)<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a>(&amp;input, 0, x1 - PAD_X, y1 - PAD_Y));</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(DST_DEPTH) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; int8 data0 = convert_int8(data);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; vdata = <a class="code" href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a>(vdata, data0);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; }</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; }</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;<span class="preprocessor">#if defined(POOL_AVG)</span></div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="comment">// Divide by pool region in case of average pooling</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; vdata = convert_int8(<a class="code" href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">round</a>(<a class="code" href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a>(vdata, <a class="code" href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a>(POOL_SIZE_X, POOL_SIZE_Y, MAX_WIDTH, MAX_HEIGHT, PAD_X, PAD_Y, STRIDE_X, STRIDE_Y))));</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* defined(POOL_AVG) */</span><span class="preprocessor"></span></div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; <span class="comment">// Store result</span></div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; vstore8(convert_uchar8(vdata), 0, (__global uchar *)output.<a class="code" href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;}</div><div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a482ef7d59a5f474ca126e737c7f0978a"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a482ef7d59a5f474ca126e737c7f0978a">POOL_OP</a></div><div class="ttdeci">#define POOL_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00027">pooling_layer_quantized.cl:27</a></div></div>
681<div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00157">helpers.h:157</a></div></div>
682<div class="ttc" id="struct_tensor4_d_xhtml"><div class="ttname"><a href="struct_tensor4_d.xhtml">Tensor4D</a></div><div class="ttdoc">Structure to hold 4D tensor information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00167">helpers.h:167</a></div></div>
Jenkinsb3a371b2018-05-23 11:36:53 +0100683<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a235920cb0f8577da6e104ccb03fbda25"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a235920cb0f8577da6e104ccb03fbda25">calculate_avg_scale_nhwc</a></div><div class="ttdeci">int calculate_avg_scale_nhwc(const int pool_size_x, const int pool_size_y, int upper_bound_w, int upper_bound_h, const int pad_x, const int pad_y, const int stride_x, const int stride_y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00125">pooling_layer_quantized.cl:125</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000684<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_ad442fb5ec8be1fff97f543150de5d822"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#ad442fb5ec8be1fff97f543150de5d822">tensor4D_offset</a></div><div class="ttdeci">__global const uchar * tensor4D_offset(const Tensor4D *tensor, int x, int y, int z, int w)</div><div class="ttdoc">Get the pointer position of a Tensor4D. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00334">helpers.h:334</a></div></div>
685<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a23b9032d1b9d59547545e457f82ee478"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a23b9032d1b9d59547545e457f82ee478">CONVERT_TO_TENSOR4D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR4D_STRUCT(name, mod_size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00132">helpers.h:132</a></div></div>
686<div class="ttc" id="namespacearm__compute_xhtml_aaae2b6b1c3f4404121346a4c27b22647"><div class="ttname"><a href="namespacearm__compute.xhtml#aaae2b6b1c3f4404121346a4c27b22647">arm_compute::round</a></div><div class="ttdeci">int round(float x, RoundingPolicy rounding_policy)</div><div class="ttdoc">Return a rounded value of x. </div><div class="ttdef"><b>Definition:</b> <a href="_rounding_8cpp_source.xhtml#l00035">Rounding.cpp:35</a></div></div>
687<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00125">helpers.h:125</a></div></div>
688<div class="ttc" id="struct_tensor3_d_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_tensor3_d.xhtml#acf52c23cbd7424606c10a606524e3e32">Tensor3D::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00159">helpers.h:159</a></div></div>
Jenkinsb3a371b2018-05-23 11:36:53 +0100689<div class="ttc" id="pooling__layer__quantized_8cl_xhtml_a6c01fa98d360a9d52926dc6a5a599711"><div class="ttname"><a href="pooling__layer__quantized_8cl.xhtml#a6c01fa98d360a9d52926dc6a5a599711">DIV_OP_NHWC</a></div><div class="ttdeci">#define DIV_OP_NHWC(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="pooling__layer__quantized_8cl_source.xhtml#l00034">pooling_layer_quantized.cl:34</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000690<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a2101b2fe0193ce227ae4e0945e321d85"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a2101b2fe0193ce227ae4e0945e321d85">tensor3D_offset</a></div><div class="ttdeci">__global const uchar * tensor3D_offset(const Tensor3D *tensor, int x, int y, int z)</div><div class="ttdoc">Get the pointer position of a Tensor3D. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00321">helpers.h:321</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000691</div><!-- fragment -->
692</div>
693</div>
694</div><!-- contents -->
695</div><!-- doc-content -->
696<!-- start footer part -->
697<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
698 <ul>
699 <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="pooling__layer__quantized_8cl.xhtml">pooling_layer_quantized.cl</a></li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000700 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000701 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000702 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000703 </ul>
704</div>
705</body>
706</html>