blob: 586ed083cac308550df9234cecc6cfd20e2c1c43 [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +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 Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: src/core/CL/cl_kernels/magnitude_phase.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<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>
Anthony Barbier871448e2017-03-24 14:54:29 +000016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Anthony Barbier871448e2017-03-24 14:54:29 +000019</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>
Anthony Barbier871448e2017-03-24 14:54:29 +000022<script type="text/javascript" src="search/search.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000023<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>
Anthony Barbier871448e2017-03-24 14:54:29 +000029<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;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010038 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Anthony Barbier871448e2017-03-24 14:54:29 +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 Barbier871448e2017-03-24 14:54:29 +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 Barbier871448e2017-03-24 14:54:29 +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('magnitude__phase_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>
Anthony Barbier871448e2017-03-24 14:54:29 +000081
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">magnitude_phase.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 Barbier871448e2017-03-24 14:54:29 +000098</div>
99<p><a href="magnitude__phase_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>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000103<tr class="memitem:a259a59d7a4f247119c457af235827a29"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a>(x, y)&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000104<tr class="separator:a259a59d7a4f247119c457af235827a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000105<tr class="memitem:a4434551334149479f843f87424bbb8c8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a>(x, y)&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000106<tr class="separator:a4434551334149479f843f87424bbb8c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
107</table><table class="memberdecls">
108<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
109Functions</h2></td></tr>
110<tr class="memitem:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memItemLeft" align="right" valign="top">DATA_TYPE16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a> (DATA_TYPE16 a, DATA_TYPE16 b)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000111<tr class="memdesc:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates L1 normalization between two inputs. <a href="#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000112<tr class="separator:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
113<tr class="memitem:aec9387519a61474acb0b2bf90ef6d94d"><td class="memItemLeft" align="right" valign="top">DATA_TYPE16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#aec9387519a61474acb0b2bf90ef6d94d">magnitude_l2</a> (int16 a, int16 b)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000114<tr class="memdesc:aec9387519a61474acb0b2bf90ef6d94d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates L2 normalization between two inputs. <a href="#aec9387519a61474acb0b2bf90ef6d94d">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000115<tr class="separator:aec9387519a61474acb0b2bf90ef6d94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
116<tr class="memitem:ab0d7e891c8a09824c46baa2393d6961f"><td class="memItemLeft" align="right" valign="top">uchar16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a> (DATA_TYPE16 a, DATA_TYPE16 b)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000117<tr class="memdesc:ab0d7e891c8a09824c46baa2393d6961f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates unsigned phase between two inputs. <a href="#ab0d7e891c8a09824c46baa2393d6961f">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000118<tr class="separator:ab0d7e891c8a09824c46baa2393d6961f"><td class="memSeparator" colspan="2">&#160;</td></tr>
119<tr class="memitem:a02ff978b574e44604d625dbd470ab870"><td class="memItemLeft" align="right" valign="top">uchar16&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a02ff978b574e44604d625dbd470ab870">phase_signed</a> (DATA_TYPE16 a, DATA_TYPE16 b)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000120<tr class="memdesc:a02ff978b574e44604d625dbd470ab870"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculates signed phase between two inputs. <a href="#a02ff978b574e44604d625dbd470ab870">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000121<tr class="separator:a02ff978b574e44604d625dbd470ab870"><td class="memSeparator" colspan="2">&#160;</td></tr>
122<tr class="memitem:a76ac02e1f05a26f67090c9464434e04a"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a76ac02e1f05a26f67090c9464434e04a">magnitude_phase</a> (__global uchar *gx_ptr, uint gx_stride_x, uint gx_step_x, uint gx_stride_y, uint gx_step_y, uint gx_offset_first_element_in_bytes, __global uchar *gy_ptr, uint gy_stride_x, uint gy_step_x, uint gy_stride_y, uint gy_step_y, uint gy_offset_first_element_in_bytes, __global uchar *magnitude_ptr, uint magnitude_stride_x, uint magnitude_step_x, uint magnitude_stride_y, uint magnitude_step_y, uint magnitude_offset_first_element_in_bytes, __global uchar *phase_ptr, uint phase_stride_x, uint phase_step_x, uint phase_stride_y, uint phase_step_y, uint phase_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000123<tr class="memdesc:a76ac02e1f05a26f67090c9464434e04a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the magnitude and phase of given the gradients of an image. <a href="#a76ac02e1f05a26f67090c9464434e04a">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000124<tr class="separator:a76ac02e1f05a26f67090c9464434e04a"><td class="memSeparator" colspan="2">&#160;</td></tr>
125</table>
126<h2 class="groupheader">Macro Definition Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000127<a id="a259a59d7a4f247119c457af235827a29"></a>
128<h2 class="memtitle"><span class="permalink"><a href="#a259a59d7a4f247119c457af235827a29">&#9670;&nbsp;</a></span>MAGNITUDE_OP</h2>
129
Anthony Barbier871448e2017-03-24 14:54:29 +0000130<div class="memitem">
131<div class="memproto">
132 <table class="memname">
133 <tr>
134 <td class="memname">#define MAGNITUDE_OP</td>
135 <td>(</td>
136 <td class="paramtype">&#160;</td>
137 <td class="paramname">x, </td>
138 </tr>
139 <tr>
140 <td class="paramkey"></td>
141 <td></td>
142 <td class="paramtype">&#160;</td>
143 <td class="paramname">y&#160;</td>
144 </tr>
145 <tr>
146 <td></td>
147 <td>)</td>
148 <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td>
149 </tr>
150 </table>
151</div><div class="memdoc">
152
Jenkinsb9abeae2018-11-22 11:58:08 +0000153<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00081">81</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000154
Jenkinsb9abeae2018-11-22 11:58:08 +0000155<p class="reference">Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000156
157</div>
158</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000159<a id="a4434551334149479f843f87424bbb8c8"></a>
160<h2 class="memtitle"><span class="permalink"><a href="#a4434551334149479f843f87424bbb8c8">&#9670;&nbsp;</a></span>PHASE_OP</h2>
161
Anthony Barbier871448e2017-03-24 14:54:29 +0000162<div class="memitem">
163<div class="memproto">
164 <table class="memname">
165 <tr>
166 <td class="memname">#define PHASE_OP</td>
167 <td>(</td>
168 <td class="paramtype">&#160;</td>
169 <td class="paramname">x, </td>
170 </tr>
171 <tr>
172 <td class="paramkey"></td>
173 <td></td>
174 <td class="paramtype">&#160;</td>
175 <td class="paramname">y&#160;</td>
176 </tr>
177 <tr>
178 <td></td>
179 <td>)</td>
180 <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td>
181 </tr>
182 </table>
183</div><div class="memdoc">
184
Jenkinsb9abeae2018-11-22 11:58:08 +0000185<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00089">89</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000186
Jenkinsb9abeae2018-11-22 11:58:08 +0000187<p class="reference">Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000188
189</div>
190</div>
191<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000192<a id="aedc7e5ee4cb8f5a0240e422f9a9e7ce9"></a>
193<h2 class="memtitle"><span class="permalink"><a href="#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">&#9670;&nbsp;</a></span>magnitude_l1()</h2>
194
Anthony Barbier871448e2017-03-24 14:54:29 +0000195<div class="memitem">
196<div class="memproto">
197<table class="mlabels">
198 <tr>
199 <td class="mlabels-left">
200 <table class="memname">
201 <tr>
202 <td class="memname">DATA_TYPE16 magnitude_l1 </td>
203 <td>(</td>
204 <td class="paramtype">DATA_TYPE16&#160;</td>
205 <td class="paramname"><em>a</em>, </td>
206 </tr>
207 <tr>
208 <td class="paramkey"></td>
209 <td></td>
210 <td class="paramtype">DATA_TYPE16&#160;</td>
211 <td class="paramname"><em>b</em>&#160;</td>
212 </tr>
213 <tr>
214 <td></td>
215 <td>)</td>
216 <td></td><td></td>
217 </tr>
218 </table>
219 </td>
220 <td class="mlabels-right">
221<span class="mlabels"><span class="mlabel">inline</span></span> </td>
222 </tr>
223</table>
224</div><div class="memdoc">
225
226<p>Calculates L1 normalization between two inputs. </p>
227<dl class="params"><dt>Parameters</dt><dd>
228 <table class="params">
229 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
230 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
231 </table>
232 </dd>
233</dl>
234<dl class="section return"><dt>Returns</dt><dd>L1 normalization magnitude result. Supported data types: S16, S32 </dd></dl>
235
Jenkinsb9abeae2018-11-22 11:58:08 +0000236<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00033">33</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000237
Jenkinsb9abeae2018-11-22 11:58:08 +0000238<p class="reference">References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00030">CONVERT_SAT</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
239
240<p class="reference">Referenced by <a class="el" href="_n_e_magnitude_phase_kernel_8cpp_source.xhtml#l00250">NEMagnitudePhaseKernel&lt; mag_type, phase_type &gt;::configure()</a>.</p>
241<div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;{</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="keywordflow">return</span> <a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>(add_sat(abs(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>), abs(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a>)), <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="l00036"></a><span class="lineno"> 36</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">gemm configure &amp; a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">GEMM.cpp:102</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100242<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>
Jenkins52ba29e2018-08-29 15:32:11 +0000243<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00030">direct_convolution1x1.cl:30</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000244<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7b8004eef325a40dd43eb80755610fff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">arm_compute::test::validation::b</a></div><div class="ttdeci">CLTensor b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">GEMM.cpp:91</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000245<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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000246</div><!-- fragment -->
247</div>
248</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000249<a id="aec9387519a61474acb0b2bf90ef6d94d"></a>
250<h2 class="memtitle"><span class="permalink"><a href="#aec9387519a61474acb0b2bf90ef6d94d">&#9670;&nbsp;</a></span>magnitude_l2()</h2>
251
Anthony Barbier871448e2017-03-24 14:54:29 +0000252<div class="memitem">
253<div class="memproto">
254<table class="mlabels">
255 <tr>
256 <td class="mlabels-left">
257 <table class="memname">
258 <tr>
259 <td class="memname">DATA_TYPE16 magnitude_l2 </td>
260 <td>(</td>
261 <td class="paramtype">int16&#160;</td>
262 <td class="paramname"><em>a</em>, </td>
263 </tr>
264 <tr>
265 <td class="paramkey"></td>
266 <td></td>
267 <td class="paramtype">int16&#160;</td>
268 <td class="paramname"><em>b</em>&#160;</td>
269 </tr>
270 <tr>
271 <td></td>
272 <td>)</td>
273 <td></td><td></td>
274 </tr>
275 </table>
276 </td>
277 <td class="mlabels-right">
278<span class="mlabels"><span class="mlabel">inline</span></span> </td>
279 </tr>
280</table>
281</div><div class="memdoc">
282
283<p>Calculates L2 normalization between two inputs. </p>
284<dl class="params"><dt>Parameters</dt><dd>
285 <table class="params">
286 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
287 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
288 </table>
289 </dd>
290</dl>
291<dl class="section return"><dt>Returns</dt><dd>L2 normalization magnitude result. Supported data types: S16, S32 </dd></dl>
292
Jenkinsb9abeae2018-11-22 11:58:08 +0000293<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00045">45</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000294
Jenkinsb9abeae2018-11-22 11:58:08 +0000295<p class="reference">References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00030">CONVERT_SAT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
296
297<p class="reference">Referenced by <a class="el" href="_n_e_magnitude_phase_kernel_8cpp_source.xhtml#l00250">NEMagnitudePhaseKernel&lt; mag_type, phase_type &gt;::configure()</a>.</p>
298<div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;{</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keywordflow">return</span> <a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>((sqrt(convert_float16((convert_uint16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a> * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>) + convert_uint16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a> * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a>)))) + 0.5f),</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</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="l00049"></a><span class="lineno"> 49</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">gemm configure &amp; a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">GEMM.cpp:102</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100299<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>
Jenkins52ba29e2018-08-29 15:32:11 +0000300<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00030">direct_convolution1x1.cl:30</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000301<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7b8004eef325a40dd43eb80755610fff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">arm_compute::test::validation::b</a></div><div class="ttdeci">CLTensor b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">GEMM.cpp:91</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000302<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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000303</div><!-- fragment -->
304</div>
305</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000306<a id="a76ac02e1f05a26f67090c9464434e04a"></a>
307<h2 class="memtitle"><span class="permalink"><a href="#a76ac02e1f05a26f67090c9464434e04a">&#9670;&nbsp;</a></span>magnitude_phase()</h2>
308
Anthony Barbier871448e2017-03-24 14:54:29 +0000309<div class="memitem">
310<div class="memproto">
311 <table class="memname">
312 <tr>
313 <td class="memname">__kernel void magnitude_phase </td>
314 <td>(</td>
315 <td class="paramtype">__global uchar *&#160;</td>
316 <td class="paramname"><em>gx_ptr</em>, </td>
317 </tr>
318 <tr>
319 <td class="paramkey"></td>
320 <td></td>
321 <td class="paramtype">uint&#160;</td>
322 <td class="paramname"><em>gx_stride_x</em>, </td>
323 </tr>
324 <tr>
325 <td class="paramkey"></td>
326 <td></td>
327 <td class="paramtype">uint&#160;</td>
328 <td class="paramname"><em>gx_step_x</em>, </td>
329 </tr>
330 <tr>
331 <td class="paramkey"></td>
332 <td></td>
333 <td class="paramtype">uint&#160;</td>
334 <td class="paramname"><em>gx_stride_y</em>, </td>
335 </tr>
336 <tr>
337 <td class="paramkey"></td>
338 <td></td>
339 <td class="paramtype">uint&#160;</td>
340 <td class="paramname"><em>gx_step_y</em>, </td>
341 </tr>
342 <tr>
343 <td class="paramkey"></td>
344 <td></td>
345 <td class="paramtype">uint&#160;</td>
346 <td class="paramname"><em>gx_offset_first_element_in_bytes</em>, </td>
347 </tr>
348 <tr>
349 <td class="paramkey"></td>
350 <td></td>
351 <td class="paramtype">__global uchar *&#160;</td>
352 <td class="paramname"><em>gy_ptr</em>, </td>
353 </tr>
354 <tr>
355 <td class="paramkey"></td>
356 <td></td>
357 <td class="paramtype">uint&#160;</td>
358 <td class="paramname"><em>gy_stride_x</em>, </td>
359 </tr>
360 <tr>
361 <td class="paramkey"></td>
362 <td></td>
363 <td class="paramtype">uint&#160;</td>
364 <td class="paramname"><em>gy_step_x</em>, </td>
365 </tr>
366 <tr>
367 <td class="paramkey"></td>
368 <td></td>
369 <td class="paramtype">uint&#160;</td>
370 <td class="paramname"><em>gy_stride_y</em>, </td>
371 </tr>
372 <tr>
373 <td class="paramkey"></td>
374 <td></td>
375 <td class="paramtype">uint&#160;</td>
376 <td class="paramname"><em>gy_step_y</em>, </td>
377 </tr>
378 <tr>
379 <td class="paramkey"></td>
380 <td></td>
381 <td class="paramtype">uint&#160;</td>
382 <td class="paramname"><em>gy_offset_first_element_in_bytes</em>, </td>
383 </tr>
384 <tr>
385 <td class="paramkey"></td>
386 <td></td>
387 <td class="paramtype">__global uchar *&#160;</td>
388 <td class="paramname"><em>magnitude_ptr</em>, </td>
389 </tr>
390 <tr>
391 <td class="paramkey"></td>
392 <td></td>
393 <td class="paramtype">uint&#160;</td>
394 <td class="paramname"><em>magnitude_stride_x</em>, </td>
395 </tr>
396 <tr>
397 <td class="paramkey"></td>
398 <td></td>
399 <td class="paramtype">uint&#160;</td>
400 <td class="paramname"><em>magnitude_step_x</em>, </td>
401 </tr>
402 <tr>
403 <td class="paramkey"></td>
404 <td></td>
405 <td class="paramtype">uint&#160;</td>
406 <td class="paramname"><em>magnitude_stride_y</em>, </td>
407 </tr>
408 <tr>
409 <td class="paramkey"></td>
410 <td></td>
411 <td class="paramtype">uint&#160;</td>
412 <td class="paramname"><em>magnitude_step_y</em>, </td>
413 </tr>
414 <tr>
415 <td class="paramkey"></td>
416 <td></td>
417 <td class="paramtype">uint&#160;</td>
418 <td class="paramname"><em>magnitude_offset_first_element_in_bytes</em>, </td>
419 </tr>
420 <tr>
421 <td class="paramkey"></td>
422 <td></td>
423 <td class="paramtype">__global uchar *&#160;</td>
424 <td class="paramname"><em>phase_ptr</em>, </td>
425 </tr>
426 <tr>
427 <td class="paramkey"></td>
428 <td></td>
429 <td class="paramtype">uint&#160;</td>
430 <td class="paramname"><em>phase_stride_x</em>, </td>
431 </tr>
432 <tr>
433 <td class="paramkey"></td>
434 <td></td>
435 <td class="paramtype">uint&#160;</td>
436 <td class="paramname"><em>phase_step_x</em>, </td>
437 </tr>
438 <tr>
439 <td class="paramkey"></td>
440 <td></td>
441 <td class="paramtype">uint&#160;</td>
442 <td class="paramname"><em>phase_stride_y</em>, </td>
443 </tr>
444 <tr>
445 <td class="paramkey"></td>
446 <td></td>
447 <td class="paramtype">uint&#160;</td>
448 <td class="paramname"><em>phase_step_y</em>, </td>
449 </tr>
450 <tr>
451 <td class="paramkey"></td>
452 <td></td>
453 <td class="paramtype">uint&#160;</td>
454 <td class="paramname"><em>phase_offset_first_element_in_bytes</em>&#160;</td>
455 </tr>
456 <tr>
457 <td></td>
458 <td>)</td>
459 <td></td><td></td>
460 </tr>
461 </table>
462</div><div class="memdoc">
463
464<p>Calculate the magnitude and phase of given the gradients of an image. </p>
465<dl class="section note"><dt>Note</dt><dd>Magnitude calculation supported: L1 normalization(type = 1) and L2 normalization(type = 2). </dd>
466<dd>
467Phase calculation supported: Unsigned(type = 1) [0,128] and Signed(type = 2) [0,256).</dd></dl>
468<dl class="section attention"><dt>Attention</dt><dd>To enable phase calculation -DPHASE="phase_calculation_type_id" must be provided at compile time. eg -DPHASE=1 </dd>
469<dd>
470To enable magnitude calculation -DMAGNITUDE="magnitude_calculation_type_id" must be provided at compile time. eg -DMAGNITUDE=1 </dd>
471<dd>
472Datatype of the two inputs is passed at compile time using -DDATA_TYPE. e.g -DDATA_TYPE=short. Supported data_types are: short and int</dd></dl>
473<dl class="params"><dt>Parameters</dt><dd>
474 <table class="params">
475 <tr><td class="paramdir">[in]</td><td class="paramname">gx_ptr</td><td>Pointer to the first source image (gradient X). Supported data types: S16, S32 </td></tr>
476 <tr><td class="paramdir">[in]</td><td class="paramname">gx_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
477 <tr><td class="paramdir">[in]</td><td class="paramname">gx_step_x</td><td>gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
478 <tr><td class="paramdir">[in]</td><td class="paramname">gx_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
479 <tr><td class="paramdir">[in]</td><td class="paramname">gx_step_y</td><td>gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
480 <tr><td class="paramdir">[in]</td><td class="paramname">gx_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
481 <tr><td class="paramdir">[in]</td><td class="paramname">gy_ptr</td><td>Pointer to the second source image (gradient Y) . Supported data types: S16, S32 </td></tr>
482 <tr><td class="paramdir">[in]</td><td class="paramname">gy_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">gy_step_x</td><td>gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
484 <tr><td class="paramdir">[in]</td><td class="paramname">gy_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">gy_step_y</td><td>gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
486 <tr><td class="paramdir">[in]</td><td class="paramname">gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
487 <tr><td class="paramdir">[out]</td><td class="paramname">magnitude_ptr</td><td>Pointer to the magnitude destination image. Supported data types: S16, S32 </td></tr>
488 <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
489 <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_step_x</td><td>magnitude_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
490 <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
491 <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_step_y</td><td>magnitude_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
492 <tr><td class="paramdir">[in]</td><td class="paramname">magnitude_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
493 <tr><td class="paramdir">[out]</td><td class="paramname">phase_ptr</td><td>Pointer to the phase destination image. Supported data types: U8 </td></tr>
494 <tr><td class="paramdir">[in]</td><td class="paramname">phase_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
495 <tr><td class="paramdir">[in]</td><td class="paramname">phase_step_x</td><td>phase_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
496 <tr><td class="paramdir">[in]</td><td class="paramname">phase_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
497 <tr><td class="paramdir">[in]</td><td class="paramname">phase_step_y</td><td>phase_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
498 <tr><td class="paramdir">[in]</td><td class="paramname">phase_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
499 </table>
500 </dd>
501</dl>
502
Jenkinsb9abeae2018-11-22 11:58:08 +0000503<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">130</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000504
Jenkinsb9abeae2018-11-22 11:58:08 +0000505<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="validation_2reference_2_magnitude_8cpp_source.xhtml#l00035">arm_compute::test::validation::reference::magnitude()</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00081">MAGNITUDE_OP</a>, <a class="el" href="validation_2reference_2_phase_8cpp_source.xhtml#l00035">arm_compute::test::validation::reference::phase()</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00089">PHASE_OP</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
506
507<p class="reference">Referenced by <a class="el" href="_n_e_magnitude_phase_kernel_8cpp_source.xhtml#l00250">NEMagnitudePhaseKernel&lt; mag_type, phase_type &gt;::configure()</a>.</p>
508<div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;{</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> gx = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(gx);</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> gy = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(gy);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// Load values</span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</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="l00149"></a><span class="lineno"> 149</span>&#160; in_a = vload16(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)gx.ptr);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</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="l00151"></a><span class="lineno"> 151</span>&#160; in_b = vload16(0, (__global DATA_TYPE *)gy.ptr);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="comment">// Calculate and store the results</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;<span class="preprocessor">#ifdef MAGNITUDE</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6aa278cb3dd1777e7338c5e573c55550">magnitude</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(magnitude);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; vstore16(<a class="code" href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a>(in_a, in_b), 0, (__global DATA_TYPE *)magnitude.ptr);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* MAGNITUDE */</span><span class="preprocessor"></span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160;<span class="preprocessor">#ifdef PHASE</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a74991bda4fcca3ce5dcf8afdccdbafff">phase</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(phase);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; vstore16(<a class="code" href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a>(in_a, in_b), 0, phase.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* PHASE */</span><span class="preprocessor"></span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</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>
509<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
Jenkinsb3a371b2018-05-23 11:36:53 +0100510<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a74991bda4fcca3ce5dcf8afdccdbafff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a74991bda4fcca3ce5dcf8afdccdbafff">arm_compute::test::validation::reference::phase</a></div><div class="ttdeci">SimpleTensor&lt; uint8_t &gt; phase(const SimpleTensor&lt; T &gt; &amp;gx, const SimpleTensor&lt; T &gt; &amp;gy, PhaseType phase_type)</div><div class="ttdef"><b>Definition:</b> <a href="validation_2reference_2_phase_8cpp_source.xhtml#l00035">Phase.cpp:35</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000511<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>
512<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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">helpers.h:150</a></div></div>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100513<div class="ttc" id="magnitude__phase_8cl_xhtml_a4434551334149479f843f87424bbb8c8"><div class="ttname"><a href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a></div><div class="ttdeci">#define PHASE_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="magnitude__phase_8cl_source.xhtml#l00089">magnitude_phase.cl:89</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000514<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a6aa278cb3dd1777e7338c5e573c55550"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6aa278cb3dd1777e7338c5e573c55550">arm_compute::test::validation::reference::magnitude</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; magnitude(const SimpleTensor&lt; T &gt; &amp;gx, const SimpleTensor&lt; T &gt; &amp;gy, MagnitudeType magnitude_type)</div><div class="ttdef"><b>Definition:</b> <a href="validation_2reference_2_magnitude_8cpp_source.xhtml#l00035">Magnitude.cpp:35</a></div></div>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100515<div class="ttc" id="magnitude__phase_8cl_xhtml_a259a59d7a4f247119c457af235827a29"><div class="ttname"><a href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a></div><div class="ttdeci">#define MAGNITUDE_OP(x, y)</div><div class="ttdef"><b>Definition:</b> <a href="magnitude__phase_8cl_source.xhtml#l00081">magnitude_phase.cl:81</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000516<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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000517</div><!-- fragment -->
518</div>
519</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000520<a id="a02ff978b574e44604d625dbd470ab870"></a>
521<h2 class="memtitle"><span class="permalink"><a href="#a02ff978b574e44604d625dbd470ab870">&#9670;&nbsp;</a></span>phase_signed()</h2>
522
Anthony Barbier871448e2017-03-24 14:54:29 +0000523<div class="memitem">
524<div class="memproto">
525<table class="mlabels">
526 <tr>
527 <td class="mlabels-left">
528 <table class="memname">
529 <tr>
530 <td class="memname">uchar16 phase_signed </td>
531 <td>(</td>
532 <td class="paramtype">DATA_TYPE16&#160;</td>
533 <td class="paramname"><em>a</em>, </td>
534 </tr>
535 <tr>
536 <td class="paramkey"></td>
537 <td></td>
538 <td class="paramtype">DATA_TYPE16&#160;</td>
539 <td class="paramname"><em>b</em>&#160;</td>
540 </tr>
541 <tr>
542 <td></td>
543 <td>)</td>
544 <td></td><td></td>
545 </tr>
546 </table>
547 </td>
548 <td class="mlabels-right">
549<span class="mlabels"><span class="mlabel">inline</span></span> </td>
550 </tr>
551</table>
552</div><div class="memdoc">
553
554<p>Calculates signed phase between two inputs. </p>
555<dl class="params"><dt>Parameters</dt><dd>
556 <table class="params">
557 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
558 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
559 </table>
560 </dd>
561</dl>
562<dl class="section return"><dt>Returns</dt><dd>Signed phase mapped in the interval [0, 256). Supported data types: U8 </dd></dl>
563
Jenkinsb9abeae2018-11-22 11:58:08 +0000564<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00072">72</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000565
Jenkinsb9abeae2018-11-22 11:58:08 +0000566<p class="reference">References <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">arm_compute::test::validation::a</a>, and <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">arm_compute::test::validation::b</a>.</p>
567
568<p class="reference">Referenced by <a class="el" href="_n_e_magnitude_phase_kernel_8cpp_source.xhtml#l00250">NEMagnitudePhaseKernel&lt; mag_type, phase_type &gt;::configure()</a>.</p>
Jenkins52ba29e2018-08-29 15:32:11 +0000569<div class="fragment"><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; float16 arct = atan2pi(convert_float16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a>), convert_float16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>));</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; arct = select(arct, arct + 2, arct &lt; 0.0f);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; <span class="keywordflow">return</span> convert_uchar16(convert_int16(mad(arct, 128, 0.5f)) &amp; (int16)0xFFu);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">gemm configure &amp; a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">GEMM.cpp:102</a></div></div>
570<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7b8004eef325a40dd43eb80755610fff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">arm_compute::test::validation::b</a></div><div class="ttdeci">CLTensor b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">GEMM.cpp:91</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100571</div><!-- fragment -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000572</div>
573</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000574<a id="ab0d7e891c8a09824c46baa2393d6961f"></a>
575<h2 class="memtitle"><span class="permalink"><a href="#ab0d7e891c8a09824c46baa2393d6961f">&#9670;&nbsp;</a></span>phase_unsigned()</h2>
576
Anthony Barbier871448e2017-03-24 14:54:29 +0000577<div class="memitem">
578<div class="memproto">
579<table class="mlabels">
580 <tr>
581 <td class="mlabels-left">
582 <table class="memname">
583 <tr>
584 <td class="memname">uchar16 phase_unsigned </td>
585 <td>(</td>
586 <td class="paramtype">DATA_TYPE16&#160;</td>
587 <td class="paramname"><em>a</em>, </td>
588 </tr>
589 <tr>
590 <td class="paramkey"></td>
591 <td></td>
592 <td class="paramtype">DATA_TYPE16&#160;</td>
593 <td class="paramname"><em>b</em>&#160;</td>
594 </tr>
595 <tr>
596 <td></td>
597 <td>)</td>
598 <td></td><td></td>
599 </tr>
600 </table>
601 </td>
602 <td class="mlabels-right">
603<span class="mlabels"><span class="mlabel">inline</span></span> </td>
604 </tr>
605</table>
606</div><div class="memdoc">
607
608<p>Calculates unsigned phase between two inputs. </p>
609<dl class="params"><dt>Parameters</dt><dd>
610 <table class="params">
611 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
612 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
613 </table>
614 </dd>
615</dl>
616<dl class="section return"><dt>Returns</dt><dd>Unsigned phase mapped in the interval [0, 180]. Supported data types: U8 </dd></dl>
617
Jenkinsb9abeae2018-11-22 11:58:08 +0000618<p class="definition">Definition at line <a class="el" href="magnitude__phase_8cl_source.xhtml#l00058">58</a> of file <a class="el" href="magnitude__phase_8cl_source.xhtml">magnitude_phase.cl</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000619
Jenkinsb9abeae2018-11-22 11:58:08 +0000620<p class="reference">References <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">arm_compute::test::validation::a</a>, and <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">arm_compute::test::validation::b</a>.</p>
621
622<p class="reference">Referenced by <a class="el" href="_n_e_magnitude_phase_kernel_8cpp_source.xhtml#l00250">NEMagnitudePhaseKernel&lt; mag_type, phase_type &gt;::configure()</a>.</p>
Jenkins52ba29e2018-08-29 15:32:11 +0000623<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; float16 angle_deg_f32 = atan2pi(convert_float16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a>), convert_float16(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>)) * (float16)180.0f;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; angle_deg_f32 = select(angle_deg_f32, (float16)180.0f + angle_deg_f32, angle_deg_f32 &lt; (float16)0.0f);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordflow">return</span> convert_uchar16(angle_deg_f32);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">gemm configure &amp; a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">GEMM.cpp:102</a></div></div>
624<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7b8004eef325a40dd43eb80755610fff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">arm_compute::test::validation::b</a></div><div class="ttdeci">CLTensor b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00091">GEMM.cpp:91</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100625</div><!-- fragment -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000626</div>
627</div>
628</div><!-- contents -->
629</div><!-- doc-content -->
630<!-- start footer part -->
631<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
632 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000633 <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="magnitude__phase_8cl.xhtml">magnitude_phase.cl</a></li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000634 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000635 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000636 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000637 </ul>
638</div>
639</body>
640</html>