blob: bf0b80a2831f6fa7e5e58cc51fb15b0323a375fb [file] [log] [blame]
Kaizen8938bd32017-09-28 14:38:23 +01001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00007<meta name="generator" content="Doxygen 1.8.13"/>
Kaizen8938bd32017-09-28 14:38:23 +01008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: src/core/CL/cl_kernels/l2_normalize.cl File Reference</title>
10<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Kaizen8938bd32017-09-28 14:38:23 +010019</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000021<script type="text/javascript" src="search/searchdata.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010022<script type="text/javascript" src="search/search.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010023<script type="text/x-mathjax-config">
24 MathJax.Hub.Config({
25 extensions: ["tex2jax.js"],
26 jax: ["input/TeX","output/HTML-CSS"],
27});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000028</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Kaizen8938bd32017-09-28 14:38:23 +010029<link href="doxygen.css" rel="stylesheet" type="text/css" />
30</head>
31<body>
32<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33<div id="titlearea">
34<table cellspacing="0" cellpadding="0">
35 <tbody>
36 <tr style="height: 56px;">
37 <td style="padding-left: 0.5em;">
38 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Kaizen8938bd32017-09-28 14:38:23 +010040 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
Jenkinsb9abeae2018-11-22 11:58:08 +000047<!-- Generated by Doxygen 1.8.13 -->
Kaizen8938bd32017-09-28 14:38:23 +010048<script type="text/javascript">
49var searchBox = new SearchBox("searchBox", "search",false,'Search');
50</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000051<script type="text/javascript" src="menudata.js"></script>
52<script type="text/javascript" src="menu.js"></script>
53<script type="text/javascript">
54$(function() {
55 initMenu('',true,false,'search.php','Search');
56 $(document).ready(function() { init_search(); });
57});
58</script>
59<div id="main-nav"></div>
Kaizen8938bd32017-09-28 14:38:23 +010060</div><!-- top -->
61<div id="side-nav" class="ui-resizable side-nav-resizable">
62 <div id="nav-tree">
63 <div id="nav-tree-contents">
64 <div id="nav-sync" class="sync"></div>
65 </div>
66 </div>
67 <div id="splitbar" style="-moz-user-select:none;"
68 class="ui-resizable-handle">
69 </div>
70</div>
71<script type="text/javascript">
72$(document).ready(function(){initNavTree('l2__normalize_8cl.xhtml','');});
73</script>
74<div id="doc-content">
75<!-- window showing the filter options -->
76<div id="MSearchSelectWindow"
77 onmouseover="return searchBox.OnSearchSelectShow()"
78 onmouseout="return searchBox.OnSearchSelectHide()"
79 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000080</div>
Kaizen8938bd32017-09-28 14:38:23 +010081
82<!-- iframe showing the search results (closed by default) -->
83<div id="MSearchResultsWindow">
84<iframe src="javascript:void(0)" frameborder="0"
85 name="MSearchResults" id="MSearchResults">
86</iframe>
87</div>
88
89<div class="header">
90 <div class="summary">
91<a href="#func-members">Functions</a> </div>
92 <div class="headertitle">
93<div class="title">l2_normalize.cl File Reference</div> </div>
94</div><!--header-->
95<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +000096<div class="textblock"><code>#include &quot;<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Kaizen8938bd32017-09-28 14:38:23 +010097</div>
98<p><a href="l2__normalize_8cl_source.xhtml">Go to the source code of this file.</a></p>
99<table class="memberdecls">
100<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
101Functions</h2></td></tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000102<tr class="memitem:aecb8206d06294af64d2cf722399df448"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="l2__normalize_8cl.xhtml#aecb8206d06294af64d2cf722399df448">l2_normalize_x</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_offset_first_element_in_bytes, __global uchar *sum_ptr, uint sum_stride_x, uint sum_step_x, uint sum_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_offset_first_element_in_bytes, <a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> <a class="el" href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a>)</td></tr>
103<tr class="memdesc:aecb8206d06294af64d2cf722399df448"><td class="mdescLeft">&#160;</td><td class="mdescRight">This kernel performs l2 normalization on x-axis. <a href="#aecb8206d06294af64d2cf722399df448">More...</a><br /></td></tr>
104<tr class="separator:aecb8206d06294af64d2cf722399df448"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:aa860f55bdbc8de4e8e5850a05147b2be"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="l2__normalize_8cl.xhtml#aa860f55bdbc8de4e8e5850a05147b2be">l2_normalize_y</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *sum_ptr, uint sum_stride_x, uint sum_step_x, uint sum_stride_y, uint sum_step_y, uint sum_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_offset_first_element_in_bytes, <a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> <a class="el" href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a>)</td></tr>
106<tr class="memdesc:aa860f55bdbc8de4e8e5850a05147b2be"><td class="mdescLeft">&#160;</td><td class="mdescRight">This kernel performs l2 normalization on y-axis. <a href="#aa860f55bdbc8de4e8e5850a05147b2be">More...</a><br /></td></tr>
107<tr class="separator:aa860f55bdbc8de4e8e5850a05147b2be"><td class="memSeparator" colspan="2">&#160;</td></tr>
108<tr class="memitem:a809db37fce4c2e573b09b0af0d3b95ee"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="l2__normalize_8cl.xhtml#a809db37fce4c2e573b09b0af0d3b95ee">l2_normalize_z</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 *sum_ptr, uint sum_stride_x, uint sum_step_x, uint sum_stride_y, uint sum_step_y, uint sum_stride_z, uint sum_step_z, uint sum_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, <a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> <a class="el" href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a>)</td></tr>
109<tr class="memdesc:a809db37fce4c2e573b09b0af0d3b95ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">This kernel performs l2 normalization on z-axis. <a href="#a809db37fce4c2e573b09b0af0d3b95ee">More...</a><br /></td></tr>
110<tr class="separator:a809db37fce4c2e573b09b0af0d3b95ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100111</table>
112<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000113<a id="aecb8206d06294af64d2cf722399df448"></a>
114<h2 class="memtitle"><span class="permalink"><a href="#aecb8206d06294af64d2cf722399df448">&#9670;&nbsp;</a></span>l2_normalize_x()</h2>
115
Kaizen8938bd32017-09-28 14:38:23 +0100116<div class="memitem">
117<div class="memproto">
118 <table class="memname">
119 <tr>
Jenkinsb9abeae2018-11-22 11:58:08 +0000120 <td class="memname">__kernel void l2_normalize_x </td>
Kaizen8938bd32017-09-28 14:38:23 +0100121 <td>(</td>
122 <td class="paramtype">__global uchar *&#160;</td>
123 <td class="paramname"><em>src_ptr</em>, </td>
124 </tr>
125 <tr>
126 <td class="paramkey"></td>
127 <td></td>
128 <td class="paramtype">uint&#160;</td>
129 <td class="paramname"><em>src_stride_x</em>, </td>
130 </tr>
131 <tr>
132 <td class="paramkey"></td>
133 <td></td>
134 <td class="paramtype">uint&#160;</td>
135 <td class="paramname"><em>src_step_x</em>, </td>
136 </tr>
137 <tr>
138 <td class="paramkey"></td>
139 <td></td>
140 <td class="paramtype">uint&#160;</td>
141 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
142 </tr>
143 <tr>
144 <td class="paramkey"></td>
145 <td></td>
146 <td class="paramtype">__global uchar *&#160;</td>
147 <td class="paramname"><em>sum_ptr</em>, </td>
148 </tr>
149 <tr>
150 <td class="paramkey"></td>
151 <td></td>
152 <td class="paramtype">uint&#160;</td>
153 <td class="paramname"><em>sum_stride_x</em>, </td>
154 </tr>
155 <tr>
156 <td class="paramkey"></td>
157 <td></td>
158 <td class="paramtype">uint&#160;</td>
159 <td class="paramname"><em>sum_step_x</em>, </td>
160 </tr>
161 <tr>
162 <td class="paramkey"></td>
163 <td></td>
164 <td class="paramtype">uint&#160;</td>
165 <td class="paramname"><em>sum_offset_first_element_in_bytes</em>, </td>
166 </tr>
167 <tr>
168 <td class="paramkey"></td>
169 <td></td>
170 <td class="paramtype">__global uchar *&#160;</td>
171 <td class="paramname"><em>dst_ptr</em>, </td>
172 </tr>
173 <tr>
174 <td class="paramkey"></td>
175 <td></td>
176 <td class="paramtype">uint&#160;</td>
177 <td class="paramname"><em>dst_stride_x</em>, </td>
178 </tr>
179 <tr>
180 <td class="paramkey"></td>
181 <td></td>
182 <td class="paramtype">uint&#160;</td>
183 <td class="paramname"><em>dst_step_x</em>, </td>
184 </tr>
185 <tr>
186 <td class="paramkey"></td>
187 <td></td>
188 <td class="paramtype">uint&#160;</td>
189 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>, </td>
190 </tr>
191 <tr>
192 <td class="paramkey"></td>
193 <td></td>
194 <td class="paramtype"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;</td>
195 <td class="paramname"><em>epsilon</em>&#160;</td>
196 </tr>
197 <tr>
198 <td></td>
199 <td>)</td>
200 <td></td><td></td>
201 </tr>
202 </table>
203</div><div class="memdoc">
204
Jenkinsb9abeae2018-11-22 11:58:08 +0000205<p>This kernel performs l2 normalization on x-axis. </p>
Kaizen8938bd32017-09-28 14:38:23 +0100206<dl class="section note"><dt>Note</dt><dd>The data type must be passed at compile time using -DDATA_TYPE: e.g. -DDATA_TYPE=float </dd>
207<dd>
208The data size must be passed at compile time using -DDATA_SIZE e.g. -DDATA_SIZE=32</dd></dl>
209<dl class="params"><dt>Parameters</dt><dd>
210 <table class="params">
Jenkins52ba29e2018-08-29 15:32:11 +0000211 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source tensor. Supported data types: F16/F32 </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100212 <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>
213 <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>
214 <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>
Jenkins52ba29e2018-08-29 15:32:11 +0000215 <tr><td class="paramdir">[in]</td><td class="paramname">sum_ptr</td><td>Pointer to the source tensor. Supported data types: F16/F32 </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100216 <tr><td class="paramdir">[in]</td><td class="paramname">sum_stride_x</td><td>Stride of the source tensor in X dimension (in bytes) </td></tr>
217 <tr><td class="paramdir">[in]</td><td class="paramname">sum_step_x</td><td>sum_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
218 <tr><td class="paramdir">[in]</td><td class="paramname">sum_offset_first_element_in_bytes</td><td>The offset of the first element in the source tensor </td></tr>
219 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination tensor. Supported data types: same as <code>src_ptr</code> </td></tr>
220 <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>
221 <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>
222 <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>
223 <tr><td class="paramdir">[in]</td><td class="paramname">epsilon</td><td>Epsilon value </td></tr>
224 </table>
225 </dd>
226</dl>
227
Jenkinsb9abeae2018-11-22 11:58:08 +0000228<p class="definition">Definition at line <a class="el" href="l2__normalize_8cl_source.xhtml#l00045">45</a> of file <a class="el" href="l2__normalize_8cl_source.xhtml">l2_normalize.cl</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100229
Jenkinsb9abeae2018-11-22 11:58:08 +0000230<p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00104">CONVERT_TO_VECTOR_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_arithmetic_division_8cpp_source.xhtml#l00100">arm_compute::test::validation::dst</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00142">Vector::ptr</a>, <a class="el" href="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00052">sum()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
231<div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="struct_vector.xhtml">Vector</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(src);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="struct_vector.xhtml">Vector</a> <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(sum);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="code" href="struct_vector.xhtml">Vector</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(dst);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = vload16(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)src.ptr);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; normalize_value = (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 16))rsqrt(fmax(((__global DATA_TYPE *)sum.ptr)[0], <a class="code" href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a>));</div><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; vstore16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> * normalize_value, 0, (__global DATA_TYPE *)dst.ptr);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;}</div><div class="ttc" id="struct_vector_xhtml"><div class="ttname"><a href="struct_vector.xhtml">Vector</a></div><div class="ttdoc">Structure to hold Vector information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100232<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
233<div class="ttc" id="reduction__operation_8cl_xhtml_ab0df00f5333da51860deb93deb44a782"><div class="ttname"><a href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a></div><div class="ttdeci">DATA_TYPE sum(__global const DATA_TYPE *input)</div><div class="ttdoc">Calculate sum of a vector. </div><div class="ttdef"><b>Definition:</b> <a href="reduction__operation_8cl_source.xhtml#l00052">reduction_operation.cl:52</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000234<div class="ttc" id="_asymm_helpers_8cpp_xhtml_a552dc3787d7ea1675f3e4e8993501d58"><div class="ttname"><a href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a></div><div class="ttdeci">constexpr float epsilon</div><div class="ttdef"><b>Definition:</b> <a href="_asymm_helpers_8cpp_source.xhtml#l00033">AsymmHelpers.cpp:33</a></div></div>
235<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div>
236<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a527bfdf5eeb306f1cf01c4a8e29f38e0"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_VECTOR_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000237<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_arithmetic_division_8cpp_source.xhtml#l00100">ArithmeticDivision.cpp:100</a></div></div>
238<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="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000239<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">helpers.h:54</a></div></div>
240</div><!-- fragment -->
241</div>
242</div>
243<a id="aa860f55bdbc8de4e8e5850a05147b2be"></a>
244<h2 class="memtitle"><span class="permalink"><a href="#aa860f55bdbc8de4e8e5850a05147b2be">&#9670;&nbsp;</a></span>l2_normalize_y()</h2>
245
246<div class="memitem">
247<div class="memproto">
248 <table class="memname">
249 <tr>
250 <td class="memname">__kernel void l2_normalize_y </td>
251 <td>(</td>
252 <td class="paramtype">__global uchar *&#160;</td>
253 <td class="paramname"><em>src_ptr</em>, </td>
254 </tr>
255 <tr>
256 <td class="paramkey"></td>
257 <td></td>
258 <td class="paramtype">uint&#160;</td>
259 <td class="paramname"><em>src_stride_x</em>, </td>
260 </tr>
261 <tr>
262 <td class="paramkey"></td>
263 <td></td>
264 <td class="paramtype">uint&#160;</td>
265 <td class="paramname"><em>src_step_x</em>, </td>
266 </tr>
267 <tr>
268 <td class="paramkey"></td>
269 <td></td>
270 <td class="paramtype">uint&#160;</td>
271 <td class="paramname"><em>src_stride_y</em>, </td>
272 </tr>
273 <tr>
274 <td class="paramkey"></td>
275 <td></td>
276 <td class="paramtype">uint&#160;</td>
277 <td class="paramname"><em>src_step_y</em>, </td>
278 </tr>
279 <tr>
280 <td class="paramkey"></td>
281 <td></td>
282 <td class="paramtype">uint&#160;</td>
283 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
284 </tr>
285 <tr>
286 <td class="paramkey"></td>
287 <td></td>
288 <td class="paramtype">__global uchar *&#160;</td>
289 <td class="paramname"><em>sum_ptr</em>, </td>
290 </tr>
291 <tr>
292 <td class="paramkey"></td>
293 <td></td>
294 <td class="paramtype">uint&#160;</td>
295 <td class="paramname"><em>sum_stride_x</em>, </td>
296 </tr>
297 <tr>
298 <td class="paramkey"></td>
299 <td></td>
300 <td class="paramtype">uint&#160;</td>
301 <td class="paramname"><em>sum_step_x</em>, </td>
302 </tr>
303 <tr>
304 <td class="paramkey"></td>
305 <td></td>
306 <td class="paramtype">uint&#160;</td>
307 <td class="paramname"><em>sum_stride_y</em>, </td>
308 </tr>
309 <tr>
310 <td class="paramkey"></td>
311 <td></td>
312 <td class="paramtype">uint&#160;</td>
313 <td class="paramname"><em>sum_step_y</em>, </td>
314 </tr>
315 <tr>
316 <td class="paramkey"></td>
317 <td></td>
318 <td class="paramtype">uint&#160;</td>
319 <td class="paramname"><em>sum_offset_first_element_in_bytes</em>, </td>
320 </tr>
321 <tr>
322 <td class="paramkey"></td>
323 <td></td>
324 <td class="paramtype">__global uchar *&#160;</td>
325 <td class="paramname"><em>dst_ptr</em>, </td>
326 </tr>
327 <tr>
328 <td class="paramkey"></td>
329 <td></td>
330 <td class="paramtype">uint&#160;</td>
331 <td class="paramname"><em>dst_stride_x</em>, </td>
332 </tr>
333 <tr>
334 <td class="paramkey"></td>
335 <td></td>
336 <td class="paramtype">uint&#160;</td>
337 <td class="paramname"><em>dst_step_x</em>, </td>
338 </tr>
339 <tr>
340 <td class="paramkey"></td>
341 <td></td>
342 <td class="paramtype">uint&#160;</td>
343 <td class="paramname"><em>dst_stride_y</em>, </td>
344 </tr>
345 <tr>
346 <td class="paramkey"></td>
347 <td></td>
348 <td class="paramtype">uint&#160;</td>
349 <td class="paramname"><em>dst_step_y</em>, </td>
350 </tr>
351 <tr>
352 <td class="paramkey"></td>
353 <td></td>
354 <td class="paramtype">uint&#160;</td>
355 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>, </td>
356 </tr>
357 <tr>
358 <td class="paramkey"></td>
359 <td></td>
360 <td class="paramtype"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;</td>
361 <td class="paramname"><em>epsilon</em>&#160;</td>
362 </tr>
363 <tr>
364 <td></td>
365 <td>)</td>
366 <td></td><td></td>
367 </tr>
368 </table>
369</div><div class="memdoc">
370
371<p>This kernel performs l2 normalization on y-axis. </p>
372<dl class="section note"><dt>Note</dt><dd>The data type must be passed at compile time using -DDATA_TYPE: e.g. -DDATA_TYPE=float </dd>
373<dd>
374The data size must be passed at compile time using -DDATA_SIZE e.g. -DDATA_SIZE=32</dd></dl>
375<dl class="params"><dt>Parameters</dt><dd>
376 <table class="params">
377 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source tensor. Supported data types: F16/F32 </td></tr>
378 <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>
379 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along Y processed per workitem(in bytes) </td></tr>
380 <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>
381 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along X processed per workitem(in bytes) </td></tr>
382 <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>
383 <tr><td class="paramdir">[in]</td><td class="paramname">sum_ptr</td><td>Pointer to the source tensor. Supported data types: F16/F32 </td></tr>
384 <tr><td class="paramdir">[in]</td><td class="paramname">sum_stride_x</td><td>Stride of the source tensor in X dimension (in bytes) </td></tr>
385 <tr><td class="paramdir">[in]</td><td class="paramname">sum_step_x</td><td>sum_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
386 <tr><td class="paramdir">[in]</td><td class="paramname">sum_stride_y</td><td>Stride of the source tensor in Y dimension (in bytes) </td></tr>
387 <tr><td class="paramdir">[in]</td><td class="paramname">sum_step_y</td><td>sum_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
388 <tr><td class="paramdir">[in]</td><td class="paramname">sum_offset_first_element_in_bytes</td><td>The offset of the first element in the source tensor </td></tr>
389 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination tensor. Supported data types: same as <code>src_ptr</code> </td></tr>
390 <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>
391 <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>
392 <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>
393 <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>
394 <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>
395 <tr><td class="paramdir">[in]</td><td class="paramname">epsilon</td><td>Epsilon value </td></tr>
396 </table>
397 </dd>
398</dl>
399
400<p class="definition">Definition at line <a class="el" href="l2__normalize_8cl_source.xhtml#l00088">88</a> of file <a class="el" href="l2__normalize_8cl_source.xhtml">l2_normalize.cl</a>.</p>
401
402<p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_arithmetic_division_8cpp_source.xhtml#l00100">arm_compute::test::validation::dst</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>, <a class="el" href="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00052">sum()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
403<div class="fragment"><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; <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(sum);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</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="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = vload16(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)src.ptr);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; sums = vload16(0, (__global DATA_TYPE *)sum.ptr);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 16)</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; normalize_value = (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 16))rsqrt(fmax(sums, <a class="code" href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a>));</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; vstore16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> * normalize_value, 0, (__global DATA_TYPE *)dst.ptr);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div>
404<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
405<div class="ttc" id="reduction__operation_8cl_xhtml_ab0df00f5333da51860deb93deb44a782"><div class="ttname"><a href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a></div><div class="ttdeci">DATA_TYPE sum(__global const DATA_TYPE *input)</div><div class="ttdoc">Calculate sum of a vector. </div><div class="ttdef"><b>Definition:</b> <a href="reduction__operation_8cl_source.xhtml#l00052">reduction_operation.cl:52</a></div></div>
406<div class="ttc" id="_asymm_helpers_8cpp_xhtml_a552dc3787d7ea1675f3e4e8993501d58"><div class="ttname"><a href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a></div><div class="ttdeci">constexpr float epsilon</div><div class="ttdef"><b>Definition:</b> <a href="_asymm_helpers_8cpp_source.xhtml#l00033">AsymmHelpers.cpp:33</a></div></div>
407<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div>
408<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_arithmetic_division_8cpp_source.xhtml#l00100">ArithmeticDivision.cpp:100</a></div></div>
409<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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00148">helpers.h:148</a></div></div>
410<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="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
411<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">helpers.h:54</a></div></div>
412</div><!-- fragment -->
413</div>
414</div>
415<a id="a809db37fce4c2e573b09b0af0d3b95ee"></a>
416<h2 class="memtitle"><span class="permalink"><a href="#a809db37fce4c2e573b09b0af0d3b95ee">&#9670;&nbsp;</a></span>l2_normalize_z()</h2>
417
418<div class="memitem">
419<div class="memproto">
420 <table class="memname">
421 <tr>
422 <td class="memname">__kernel void l2_normalize_z </td>
423 <td>(</td>
424 <td class="paramtype">__global uchar *&#160;</td>
425 <td class="paramname"><em>src_ptr</em>, </td>
426 </tr>
427 <tr>
428 <td class="paramkey"></td>
429 <td></td>
430 <td class="paramtype">uint&#160;</td>
431 <td class="paramname"><em>src_stride_x</em>, </td>
432 </tr>
433 <tr>
434 <td class="paramkey"></td>
435 <td></td>
436 <td class="paramtype">uint&#160;</td>
437 <td class="paramname"><em>src_step_x</em>, </td>
438 </tr>
439 <tr>
440 <td class="paramkey"></td>
441 <td></td>
442 <td class="paramtype">uint&#160;</td>
443 <td class="paramname"><em>src_stride_y</em>, </td>
444 </tr>
445 <tr>
446 <td class="paramkey"></td>
447 <td></td>
448 <td class="paramtype">uint&#160;</td>
449 <td class="paramname"><em>src_step_y</em>, </td>
450 </tr>
451 <tr>
452 <td class="paramkey"></td>
453 <td></td>
454 <td class="paramtype">uint&#160;</td>
455 <td class="paramname"><em>src_stride_z</em>, </td>
456 </tr>
457 <tr>
458 <td class="paramkey"></td>
459 <td></td>
460 <td class="paramtype">uint&#160;</td>
461 <td class="paramname"><em>src_step_z</em>, </td>
462 </tr>
463 <tr>
464 <td class="paramkey"></td>
465 <td></td>
466 <td class="paramtype">uint&#160;</td>
467 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
468 </tr>
469 <tr>
470 <td class="paramkey"></td>
471 <td></td>
472 <td class="paramtype">__global uchar *&#160;</td>
473 <td class="paramname"><em>sum_ptr</em>, </td>
474 </tr>
475 <tr>
476 <td class="paramkey"></td>
477 <td></td>
478 <td class="paramtype">uint&#160;</td>
479 <td class="paramname"><em>sum_stride_x</em>, </td>
480 </tr>
481 <tr>
482 <td class="paramkey"></td>
483 <td></td>
484 <td class="paramtype">uint&#160;</td>
485 <td class="paramname"><em>sum_step_x</em>, </td>
486 </tr>
487 <tr>
488 <td class="paramkey"></td>
489 <td></td>
490 <td class="paramtype">uint&#160;</td>
491 <td class="paramname"><em>sum_stride_y</em>, </td>
492 </tr>
493 <tr>
494 <td class="paramkey"></td>
495 <td></td>
496 <td class="paramtype">uint&#160;</td>
497 <td class="paramname"><em>sum_step_y</em>, </td>
498 </tr>
499 <tr>
500 <td class="paramkey"></td>
501 <td></td>
502 <td class="paramtype">uint&#160;</td>
503 <td class="paramname"><em>sum_stride_z</em>, </td>
504 </tr>
505 <tr>
506 <td class="paramkey"></td>
507 <td></td>
508 <td class="paramtype">uint&#160;</td>
509 <td class="paramname"><em>sum_step_z</em>, </td>
510 </tr>
511 <tr>
512 <td class="paramkey"></td>
513 <td></td>
514 <td class="paramtype">uint&#160;</td>
515 <td class="paramname"><em>sum_offset_first_element_in_bytes</em>, </td>
516 </tr>
517 <tr>
518 <td class="paramkey"></td>
519 <td></td>
520 <td class="paramtype">__global uchar *&#160;</td>
521 <td class="paramname"><em>dst_ptr</em>, </td>
522 </tr>
523 <tr>
524 <td class="paramkey"></td>
525 <td></td>
526 <td class="paramtype">uint&#160;</td>
527 <td class="paramname"><em>dst_stride_x</em>, </td>
528 </tr>
529 <tr>
530 <td class="paramkey"></td>
531 <td></td>
532 <td class="paramtype">uint&#160;</td>
533 <td class="paramname"><em>dst_step_x</em>, </td>
534 </tr>
535 <tr>
536 <td class="paramkey"></td>
537 <td></td>
538 <td class="paramtype">uint&#160;</td>
539 <td class="paramname"><em>dst_stride_y</em>, </td>
540 </tr>
541 <tr>
542 <td class="paramkey"></td>
543 <td></td>
544 <td class="paramtype">uint&#160;</td>
545 <td class="paramname"><em>dst_step_y</em>, </td>
546 </tr>
547 <tr>
548 <td class="paramkey"></td>
549 <td></td>
550 <td class="paramtype">uint&#160;</td>
551 <td class="paramname"><em>dst_stride_z</em>, </td>
552 </tr>
553 <tr>
554 <td class="paramkey"></td>
555 <td></td>
556 <td class="paramtype">uint&#160;</td>
557 <td class="paramname"><em>dst_step_z</em>, </td>
558 </tr>
559 <tr>
560 <td class="paramkey"></td>
561 <td></td>
562 <td class="paramtype">uint&#160;</td>
563 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>, </td>
564 </tr>
565 <tr>
566 <td class="paramkey"></td>
567 <td></td>
568 <td class="paramtype"><a class="el" href="convolution9x9_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;</td>
569 <td class="paramname"><em>epsilon</em>&#160;</td>
570 </tr>
571 <tr>
572 <td></td>
573 <td>)</td>
574 <td></td><td></td>
575 </tr>
576 </table>
577</div><div class="memdoc">
578
579<p>This kernel performs l2 normalization on z-axis. </p>
580<dl class="section note"><dt>Note</dt><dd>The data type must be passed at compile time using -DDATA_TYPE: e.g. -DDATA_TYPE=float </dd>
581<dd>
582The data size must be passed at compile time using -DDATA_SIZE e.g. -DDATA_SIZE=32</dd></dl>
583<dl class="params"><dt>Parameters</dt><dd>
584 <table class="params">
585 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source tensor. Supported data types: F16/F32 </td></tr>
586 <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>
587 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along Y processed per workitem(in bytes) </td></tr>
588 <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>
589 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along X processed per workitem(in bytes) </td></tr>
590 <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>
591 <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>
592 <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>
593 <tr><td class="paramdir">[in]</td><td class="paramname">sum_ptr</td><td>Pointer to the source tensor. Supported data types: F16/F32 </td></tr>
594 <tr><td class="paramdir">[in]</td><td class="paramname">sum_stride_x</td><td>Stride of the source tensor in X dimension (in bytes) </td></tr>
595 <tr><td class="paramdir">[in]</td><td class="paramname">sum_step_x</td><td>sum_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
596 <tr><td class="paramdir">[in]</td><td class="paramname">sum_stride_y</td><td>Stride of the source tensor in Y dimension (in bytes) </td></tr>
597 <tr><td class="paramdir">[in]</td><td class="paramname">sum_step_y</td><td>sum_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
598 <tr><td class="paramdir">[in]</td><td class="paramname">sum_stride_z</td><td>Stride of the source tensor in Z dimension (in bytes) </td></tr>
599 <tr><td class="paramdir">[in]</td><td class="paramname">sum_step_z</td><td>sum_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr>
600 <tr><td class="paramdir">[in]</td><td class="paramname">sum_offset_first_element_in_bytes</td><td>The offset of the first element in the source tensor </td></tr>
601 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination tensor. Supported data types: same as <code>src_ptr</code> </td></tr>
602 <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>
603 <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>
604 <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>
605 <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>
606 <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>
607 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_z</td><td>dst_stride_z * number of elements along Y processed per workitem(in bytes) </td></tr>
608 <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>
609 <tr><td class="paramdir">[in]</td><td class="paramname">epsilon</td><td>Epsilon value </td></tr>
610 </table>
611 </dd>
612</dl>
613
614<p class="definition">Definition at line <a class="el" href="l2__normalize_8cl_source.xhtml#l00139">139</a> of file <a class="el" href="l2__normalize_8cl_source.xhtml">l2_normalize.cl</a>.</p>
615
616<p class="reference">References <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="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_arithmetic_division_8cpp_source.xhtml#l00100">arm_compute::test::validation::dst</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00265">arm_compute::test::validation::in</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="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00052">sum()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
617<div class="fragment"><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;{</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(src);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> <a class="code" href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(sum);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(dst);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = vload16(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)src.ptr);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 16)</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; sums = vload16(0, (__global DATA_TYPE *)sum.ptr);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 16)</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; normalize_value = (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 16))rsqrt(fmax(sums, <a class="code" href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a>));</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; vstore16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> * normalize_value, 0, (__global DATA_TYPE *)dst.ptr);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;}</div><div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
618<div class="ttc" id="reduction__operation_8cl_xhtml_ab0df00f5333da51860deb93deb44a782"><div class="ttname"><a href="reduction__operation_8cl.xhtml#ab0df00f5333da51860deb93deb44a782">sum</a></div><div class="ttdeci">DATA_TYPE sum(__global const DATA_TYPE *input)</div><div class="ttdoc">Calculate sum of a vector. </div><div class="ttdef"><b>Definition:</b> <a href="reduction__operation_8cl_source.xhtml#l00052">reduction_operation.cl:52</a></div></div>
619<div class="ttc" id="_asymm_helpers_8cpp_xhtml_a552dc3787d7ea1675f3e4e8993501d58"><div class="ttname"><a href="_asymm_helpers_8cpp.xhtml#a552dc3787d7ea1675f3e4e8993501d58">epsilon</a></div><div class="ttdeci">constexpr float epsilon</div><div class="ttdef"><b>Definition:</b> <a href="_asymm_helpers_8cpp_source.xhtml#l00033">AsymmHelpers.cpp:33</a></div></div>
620<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00265">Winograd.cpp:265</a></div></div>
621<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>
622<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_arithmetic_division_8cpp_source.xhtml#l00100">ArithmeticDivision.cpp:100</a></div></div>
623<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>
624<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="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
625<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">helpers.h:54</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100626</div><!-- fragment -->
627</div>
628</div>
629</div><!-- contents -->
630</div><!-- doc-content -->
631<!-- start footer part -->
632<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
633 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000634 <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="l2__normalize_8cl.xhtml">l2_normalize.cl</a></li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000635 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Kaizen8938bd32017-09-28 14:38:23 +0100636 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000637 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Kaizen8938bd32017-09-28 14:38:23 +0100638 </ul>
639</div>
640</body>
641</html>