blob: acdc86fc83993ca4aed916a6965e9ee627b55700 [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"/>
7<meta name="generator" content="Doxygen 1.8.11"/>
8<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: src/core/CL/cl_kernels/softmax_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);
19 $(window).load(resizeHeight);
20</script>
21<link href="search/search.css" rel="stylesheet" type="text/css"/>
22<script type="text/javascript" src="search/searchdata.js"></script>
23<script type="text/javascript" src="search/search.js"></script>
24<script type="text/javascript">
25 $(document).ready(function() { init_search(); });
26</script>
27<script type="text/x-mathjax-config">
28 MathJax.Hub.Config({
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
31});
32</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
33<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
Anthony Barbierf45d5a92018-01-24 16:23:15 +000043 &#160;<span id="projectnumber">18.01</span>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
51<!-- Generated by Doxygen 1.8.11 -->
52<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('softmax__layer__quantized_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)">
106</div>
107
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="#define-members">Macros</a> &#124;
118<a href="#func-members">Functions</a> &#124;
119<a href="#var-members">Variables</a> </div>
120 <div class="headertitle">
121<div class="title">softmax_layer_quantized.cl File Reference</div> </div>
122</div><!--header-->
123<div class="contents">
124<div class="textblock"><code>#include &quot;<a class="el" href="asymm__helper_8h_source.xhtml">asymm_helper.h</a>&quot;</code><br />
125<code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
126</div>
127<p><a href="softmax__layer__quantized_8cl_source.xhtml">Go to the source code of this file.</a></p>
128<table class="memberdecls">
129<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
130Macros</h2></td></tr>
131<tr class="memitem:abaa48ad818c44e415fd3f9dd0f27bf01"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(x, y, type, <a class="el" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>)&#160;&#160;&#160;max((x), (y))</td></tr>
132<tr class="separator:abaa48ad818c44e415fd3f9dd0f27bf01"><td class="memSeparator" colspan="2">&#160;</td></tr>
133<tr class="memitem:a44206a4e5783c7aabacec88aad878c88"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="softmax__layer__quantized_8cl.xhtml#a44206a4e5783c7aabacec88aad878c88">ADD_OP</a>(x, y, type, <a class="el" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>)&#160;&#160;&#160;((x) + (y))</td></tr>
134<tr class="separator:a44206a4e5783c7aabacec88aad878c88"><td class="memSeparator" colspan="2">&#160;</td></tr>
135</table><table class="memberdecls">
136<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
137Functions</h2></td></tr>
138<tr class="memitem:a79bd9092e1a23c550d4dc1aeb9b746ad"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="softmax__layer__quantized_8cl.xhtml#a79bd9092e1a23c550d4dc1aeb9b746ad">softmax_layer_max_quantized</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_stride_z, uint src_step_z, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_stride_z, uint dst_step_z, uint dst_offset_first_element_in_bytes, uint width)</td></tr>
139<tr class="memdesc:a79bd9092e1a23c550d4dc1aeb9b746ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Identifies the maximum value across the 1st dimension. <a href="#a79bd9092e1a23c550d4dc1aeb9b746ad">More...</a><br /></td></tr>
140<tr class="separator:a79bd9092e1a23c550d4dc1aeb9b746ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
141</table><table class="memberdecls">
142<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
143Variables</h2></td></tr>
144<tr class="memitem:a4701bcd6d0c0472d7d3e8017a24f2be6"><td class="memItemLeft" align="right" valign="top">__constant uchar16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="softmax__layer__quantized_8cl.xhtml#a4701bcd6d0c0472d7d3e8017a24f2be6">type_min</a> = 0</td></tr>
145<tr class="separator:a4701bcd6d0c0472d7d3e8017a24f2be6"><td class="memSeparator" colspan="2">&#160;</td></tr>
146<tr class="memitem:a0712735973f172ac9efc7d48a31e47ad"><td class="memItemLeft" align="right" valign="top">__constant uint16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="softmax__layer__quantized_8cl.xhtml#a0712735973f172ac9efc7d48a31e47ad">idx16</a> = (uint16)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)</td></tr>
147<tr class="separator:a0712735973f172ac9efc7d48a31e47ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
148</table>
149<h2 class="groupheader">Macro Definition Documentation</h2>
150<a class="anchor" id="a44206a4e5783c7aabacec88aad878c88"></a>
151<div class="memitem">
152<div class="memproto">
153 <table class="memname">
154 <tr>
155 <td class="memname">#define ADD_OP</td>
156 <td>(</td>
157 <td class="paramtype">&#160;</td>
158 <td class="paramname">x, </td>
159 </tr>
160 <tr>
161 <td class="paramkey"></td>
162 <td></td>
163 <td class="paramtype">&#160;</td>
164 <td class="paramname">y, </td>
165 </tr>
166 <tr>
167 <td class="paramkey"></td>
168 <td></td>
169 <td class="paramtype">&#160;</td>
170 <td class="paramname">type, </td>
171 </tr>
172 <tr>
173 <td class="paramkey"></td>
174 <td></td>
175 <td class="paramtype">&#160;</td>
176 <td class="paramname"><a class="el" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>&#160;</td>
177 </tr>
178 <tr>
179 <td></td>
180 <td>)</td>
181 <td></td><td>&#160;&#160;&#160;((x) + (y))</td>
182 </tr>
183 </table>
184</div><div class="memdoc">
185
186<p>Definition at line <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00028">28</a> of file <a class="el" href="softmax__layer__quantized_8cl_source.xhtml">softmax_layer_quantized.cl</a>.</p>
187
188<p>Referenced by <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00055">softmax_layer_max_quantized()</a>.</p>
189
190</div>
191</div>
192<a class="anchor" id="abaa48ad818c44e415fd3f9dd0f27bf01"></a>
193<div class="memitem">
194<div class="memproto">
195 <table class="memname">
196 <tr>
197 <td class="memname">#define MAX_OP</td>
198 <td>(</td>
199 <td class="paramtype">&#160;</td>
200 <td class="paramname">x, </td>
201 </tr>
202 <tr>
203 <td class="paramkey"></td>
204 <td></td>
205 <td class="paramtype">&#160;</td>
206 <td class="paramname">y, </td>
207 </tr>
208 <tr>
209 <td class="paramkey"></td>
210 <td></td>
211 <td class="paramtype">&#160;</td>
212 <td class="paramname">type, </td>
213 </tr>
214 <tr>
215 <td class="paramkey"></td>
216 <td></td>
217 <td class="paramtype">&#160;</td>
218 <td class="paramname"><a class="el" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>&#160;</td>
219 </tr>
220 <tr>
221 <td></td>
222 <td>)</td>
223 <td></td><td>&#160;&#160;&#160;max((x), (y))</td>
224 </tr>
225 </table>
226</div><div class="memdoc">
227
228<p>Definition at line <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00027">27</a> of file <a class="el" href="softmax__layer__quantized_8cl_source.xhtml">softmax_layer_quantized.cl</a>.</p>
229
230<p>Referenced by <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00055">softmax_layer_max_quantized()</a>.</p>
231
232</div>
233</div>
234<h2 class="groupheader">Function Documentation</h2>
235<a class="anchor" id="a79bd9092e1a23c550d4dc1aeb9b746ad"></a>
236<div class="memitem">
237<div class="memproto">
238 <table class="memname">
239 <tr>
240 <td class="memname">__kernel void softmax_layer_max_quantized </td>
241 <td>(</td>
242 <td class="paramtype">__global uchar *&#160;</td>
243 <td class="paramname"><em>src_ptr</em>, </td>
244 </tr>
245 <tr>
246 <td class="paramkey"></td>
247 <td></td>
248 <td class="paramtype">uint&#160;</td>
249 <td class="paramname"><em>src_stride_x</em>, </td>
250 </tr>
251 <tr>
252 <td class="paramkey"></td>
253 <td></td>
254 <td class="paramtype">uint&#160;</td>
255 <td class="paramname"><em>src_step_x</em>, </td>
256 </tr>
257 <tr>
258 <td class="paramkey"></td>
259 <td></td>
260 <td class="paramtype">uint&#160;</td>
261 <td class="paramname"><em>src_stride_y</em>, </td>
262 </tr>
263 <tr>
264 <td class="paramkey"></td>
265 <td></td>
266 <td class="paramtype">uint&#160;</td>
267 <td class="paramname"><em>src_step_y</em>, </td>
268 </tr>
269 <tr>
270 <td class="paramkey"></td>
271 <td></td>
272 <td class="paramtype">uint&#160;</td>
273 <td class="paramname"><em>src_stride_z</em>, </td>
274 </tr>
275 <tr>
276 <td class="paramkey"></td>
277 <td></td>
278 <td class="paramtype">uint&#160;</td>
279 <td class="paramname"><em>src_step_z</em>, </td>
280 </tr>
281 <tr>
282 <td class="paramkey"></td>
283 <td></td>
284 <td class="paramtype">uint&#160;</td>
285 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
286 </tr>
287 <tr>
288 <td class="paramkey"></td>
289 <td></td>
290 <td class="paramtype">__global uchar *&#160;</td>
291 <td class="paramname"><em>dst_ptr</em>, </td>
292 </tr>
293 <tr>
294 <td class="paramkey"></td>
295 <td></td>
296 <td class="paramtype">uint&#160;</td>
297 <td class="paramname"><em>dst_stride_x</em>, </td>
298 </tr>
299 <tr>
300 <td class="paramkey"></td>
301 <td></td>
302 <td class="paramtype">uint&#160;</td>
303 <td class="paramname"><em>dst_step_x</em>, </td>
304 </tr>
305 <tr>
306 <td class="paramkey"></td>
307 <td></td>
308 <td class="paramtype">uint&#160;</td>
309 <td class="paramname"><em>dst_stride_y</em>, </td>
310 </tr>
311 <tr>
312 <td class="paramkey"></td>
313 <td></td>
314 <td class="paramtype">uint&#160;</td>
315 <td class="paramname"><em>dst_step_y</em>, </td>
316 </tr>
317 <tr>
318 <td class="paramkey"></td>
319 <td></td>
320 <td class="paramtype">uint&#160;</td>
321 <td class="paramname"><em>dst_stride_z</em>, </td>
322 </tr>
323 <tr>
324 <td class="paramkey"></td>
325 <td></td>
326 <td class="paramtype">uint&#160;</td>
327 <td class="paramname"><em>dst_step_z</em>, </td>
328 </tr>
329 <tr>
330 <td class="paramkey"></td>
331 <td></td>
332 <td class="paramtype">uint&#160;</td>
333 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>, </td>
334 </tr>
335 <tr>
336 <td class="paramkey"></td>
337 <td></td>
338 <td class="paramtype">uint&#160;</td>
339 <td class="paramname"><em>width</em>&#160;</td>
340 </tr>
341 <tr>
342 <td></td>
343 <td>)</td>
344 <td></td><td></td>
345 </tr>
346 </table>
347</div><div class="memdoc">
348
349<p>Identifies the maximum value across the 1st dimension. </p>
350<dl class="section note"><dt>Note</dt><dd>In case the input is not multiple of 16 -DNON_MULTIPLE_OF_16 must be passed.</dd></dl>
351<dl class="params"><dt>Parameters</dt><dd>
352 <table class="params">
353 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source tensor slice. Supported data types: QASYMM8 </td></tr>
354 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source tensor in X dimension (in bytes) </td></tr>
355 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
356 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source tensor in Y dimension (in bytes) </td></tr>
357 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
358 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr>
359 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_z</td><td>src_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
360 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source tensor </td></tr>
361 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination tensor slice. Supported data types: same as <code>src_ptr</code> </td></tr>
362 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination tensor in X dimension (in bytes) </td></tr>
363 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
364 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination tensor in Y dimension (in bytes) </td></tr>
365 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
366 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_z</td><td>Stride of the destination tensor in Z dimension (in bytes) </td></tr>
367 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_z</td><td>dst_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
368 <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination tensor </td></tr>
369 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Input image width </td></tr>
370 </table>
371 </dd>
372</dl>
373
374<p>Definition at line <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00055">55</a> of file <a class="el" href="softmax__layer__quantized_8cl_source.xhtml">softmax_layer_quantized.cl</a>.</p>
375
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000376<p>References <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00028">ADD_OP</a>, <a class="el" href="asymm__helper_8h_source.xhtml#l00200">asymm_exp_on_negative_values()</a>, <a class="el" href="asymm__helper_8h_source.xhtml#l00167">asymm_mult()</a>, <a class="el" href="asymm__helper_8h_source.xhtml#l00243">asymm_one_over_one_plus_x_for_x_in_0_1()</a>, <a class="el" href="asymm__helper_8h_source.xhtml#l00269">asymm_rescale()</a>, <a class="el" href="asymm__helper_8h_source.xhtml#l00082">asymm_rounding_divide_by_pow2()</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00276">arm_compute::test::fixed_point_arithmetic::detail::clz()</a>, <a class="el" href="helpers_8h_source.xhtml#l00114">CONVERT_TENSOR3D_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00111">CONVERT_TENSOR3D_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00123">arm_compute::test::validation::dst</a>, <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00031">idx16</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00027">MAX_OP</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00052">sum()</a>, <a class="el" href="helpers_8h_source.xhtml#l00074">TENSOR3D_DECLARATION</a>, and <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00030">type_min</a>.</p>
377<div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;{</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#a541f8db866a0fa93ee67d58ea31a7d0c">CONVERT_TENSOR3D_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#a541f8db866a0fa93ee67d58ea31a7d0c">CONVERT_TENSOR3D_TO_IMAGE_STRUCT</a>(dst);</div><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">// Initialize local maximum</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; uchar16 max_val = 0;</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="comment">// Calculate max of row</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keyword">const</span> uint width4 = width &gt;&gt; 4;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keywordflow">for</span>(uint i = 0; i &lt; width4; i++)</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; uchar16 data = vload16(0, (__global uchar *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, i &lt;&lt; 4, 0));</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; max_val = <a class="code" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(data, max_val, uchar, 16);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; }</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor">#ifdef NON_MULTIPLE_OF_16</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="comment">// Handle non multiple of 16</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; uchar16 data = vload16(0, (__global uchar *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, width4 &lt;&lt; 4, 0));</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; uchar16 widx = convert_uchar16(((uint16)(width4 &lt;&lt; 4) + <a class="code" href="softmax__layer__quantized_8cl.xhtml#a0712735973f172ac9efc7d48a31e47ad">idx16</a>) &lt; width);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; max_val = <a class="code" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(max_val, select(<a class="code" href="softmax__layer__quantized_8cl.xhtml#a4701bcd6d0c0472d7d3e8017a24f2be6">type_min</a>, data, widx), uchar, 16);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* NON_MULTIPLE_OF_16 */</span><span class="preprocessor"></span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="comment">// Perform max reduction</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; max_val.s01234567 = <a class="code" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(max_val.s01234567, max_val.s89ABCDEF, uchar, 8);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; max_val.s0123 = <a class="code" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(max_val.s0123, max_val.s4567, uchar, 4);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; max_val.s01 = <a class="code" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(max_val.s01, max_val.s23, uchar, 2);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; max_val.s0 = <a class="code" href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a>(max_val.s0, max_val.s1, uchar, 1);</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; <span class="comment">// Store result</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; *((__global uchar *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) = max_val.s0;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;}</div><div class="ttc" id="softmax__layer__quantized_8cl_xhtml_a4701bcd6d0c0472d7d3e8017a24f2be6"><div class="ttname"><a href="softmax__layer__quantized_8cl.xhtml#a4701bcd6d0c0472d7d3e8017a24f2be6">type_min</a></div><div class="ttdeci">__constant uchar16 type_min</div><div class="ttdef"><b>Definition:</b> <a href="softmax__layer__quantized_8cl_source.xhtml#l00030">softmax_layer_quantized.cl:30</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000378<div class="ttc" id="softmax__layer__quantized_8cl_xhtml_abaa48ad818c44e415fd3f9dd0f27bf01"><div class="ttname"><a href="softmax__layer__quantized_8cl.xhtml#abaa48ad818c44e415fd3f9dd0f27bf01">MAX_OP</a></div><div class="ttdeci">#define MAX_OP(x, y, type, size)</div><div class="ttdef"><b>Definition:</b> <a href="softmax__layer__quantized_8cl_source.xhtml#l00027">softmax_layer_quantized.cl:27</a></div></div>
379<div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000380<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00123">Convolution.cpp:123</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000381<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
382<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
383<div class="ttc" id="helpers_8h_xhtml_a541f8db866a0fa93ee67d58ea31a7d0c"><div class="ttname"><a href="helpers_8h.xhtml#a541f8db866a0fa93ee67d58ea31a7d0c">CONVERT_TENSOR3D_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TENSOR3D_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00114">helpers.h:114</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000384<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000385<div class="ttc" id="softmax__layer__quantized_8cl_xhtml_a0712735973f172ac9efc7d48a31e47ad"><div class="ttname"><a href="softmax__layer__quantized_8cl.xhtml#a0712735973f172ac9efc7d48a31e47ad">idx16</a></div><div class="ttdeci">__constant uint16 idx16</div><div class="ttdef"><b>Definition:</b> <a href="softmax__layer__quantized_8cl_source.xhtml#l00031">softmax_layer_quantized.cl:31</a></div></div>
386</div><!-- fragment -->
387</div>
388</div>
389<h2 class="groupheader">Variable Documentation</h2>
390<a class="anchor" id="a0712735973f172ac9efc7d48a31e47ad"></a>
391<div class="memitem">
392<div class="memproto">
393 <table class="memname">
394 <tr>
395 <td class="memname">__constant uint16 idx16 = (uint16)(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)</td>
396 </tr>
397 </table>
398</div><div class="memdoc">
399
400<p>Definition at line <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00031">31</a> of file <a class="el" href="softmax__layer__quantized_8cl_source.xhtml">softmax_layer_quantized.cl</a>.</p>
401
402<p>Referenced by <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00055">softmax_layer_max_quantized()</a>.</p>
403
404</div>
405</div>
406<a class="anchor" id="a4701bcd6d0c0472d7d3e8017a24f2be6"></a>
407<div class="memitem">
408<div class="memproto">
409 <table class="memname">
410 <tr>
411 <td class="memname">__constant uchar16 type_min = 0</td>
412 </tr>
413 </table>
414</div><div class="memdoc">
415
416<p>Definition at line <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00030">30</a> of file <a class="el" href="softmax__layer__quantized_8cl_source.xhtml">softmax_layer_quantized.cl</a>.</p>
417
418<p>Referenced by <a class="el" href="softmax__layer__quantized_8cl_source.xhtml#l00055">softmax_layer_max_quantized()</a>.</p>
419
420</div>
421</div>
422</div><!-- contents -->
423</div><!-- doc-content -->
424<!-- start footer part -->
425<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
426 <ul>
427 <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="softmax__layer__quantized_8cl.xhtml">softmax_layer_quantized.cl</a></li>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000428 <li class="footer">Generated on Wed Jan 24 2018 14:30:43 for Compute Library by
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000429 <a href="http://www.doxygen.org/index.html">
430 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
431 </ul>
432</div>
433</body>
434</html>