blob: 0f3fa9c1544029a0aec320c8f0d90659e009ec98 [file] [log] [blame]
Jenkins514be652019-02-28 12:25:18 +00001<!-- HTML header for doxygen 1.8.15-->
2<!-- Remember to use version doxygen 1.8.15 +-->
Anthony Barbier871448e2017-03-24 14:54:29 +00003<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml">
5<head>
6<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
7<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkins514be652019-02-28 12:25:18 +00008<meta name="generator" content="Doxygen 1.8.15"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00009<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +010010<title>Compute Library: src/core/CL/cl_kernels/magnitude_phase.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000011<link href="tabs.css" rel="stylesheet" type="text/css"/>
12<script type="text/javascript" src="jquery.js"></script>
13<script type="text/javascript" src="dynsections.js"></script>
14<link href="navtree.css" rel="stylesheet" type="text/css"/>
15<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000016<script type="text/javascript" src="navtreedata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000017<script type="text/javascript" src="navtree.js"></script>
18<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000019/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Anthony Barbier871448e2017-03-24 14:54:29 +000020 $(document).ready(initResizable);
Jenkins514be652019-02-28 12:25:18 +000021/* @license-end */</script>
Anthony Barbier871448e2017-03-24 14:54:29 +000022<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000023<script type="text/javascript" src="search/searchdata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000024<script type="text/javascript" src="search/search.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000025<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Jenkins514be652019-02-28 12:25:18 +000030</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000031<link href="doxygen.css" rel="stylesheet" type="text/css" />
Jenkins514be652019-02-28 12:25:18 +000032<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
Anthony Barbier871448e2017-03-24 14:54:29 +000033</head>
34<body>
35<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
36<div id="titlearea">
37<table cellspacing="0" cellpadding="0">
38 <tbody>
39 <tr style="height: 56px;">
Jenkins514be652019-02-28 12:25:18 +000040 <img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
Anthony Barbier871448e2017-03-24 14:54:29 +000041 <td style="padding-left: 0.5em;">
Jenkins514be652019-02-28 12:25:18 +000042 <div id="projectname">
43 &#160;<span id="projectnumber">19.02</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Jenkins514be652019-02-28 12:25:18 +000051<!-- Generated by Doxygen 1.8.15 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000052<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000053/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Anthony Barbier871448e2017-03-24 14:54:29 +000054var searchBox = new SearchBox("searchBox", "search",false,'Search');
Jenkins514be652019-02-28 12:25:18 +000055/* @license-end */
Anthony Barbier871448e2017-03-24 14:54:29 +000056</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000057<script type="text/javascript" src="menudata.js"></script>
58<script type="text/javascript" src="menu.js"></script>
59<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000060/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Jenkinsb9abeae2018-11-22 11:58:08 +000061$(function() {
62 initMenu('',true,false,'search.php','Search');
63 $(document).ready(function() { init_search(); });
64});
Jenkins514be652019-02-28 12:25:18 +000065/* @license-end */</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000066<div id="main-nav"></div>
Anthony Barbier871448e2017-03-24 14:54:29 +000067</div><!-- top -->
68<div id="side-nav" class="ui-resizable side-nav-resizable">
69 <div id="nav-tree">
70 <div id="nav-tree-contents">
71 <div id="nav-sync" class="sync"></div>
72 </div>
73 </div>
74 <div id="splitbar" style="-moz-user-select:none;"
75 class="ui-resizable-handle">
76 </div>
77</div>
78<script type="text/javascript">
Jenkins514be652019-02-28 12:25:18 +000079/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
Anthony Barbier871448e2017-03-24 14:54:29 +000080$(document).ready(function(){initNavTree('magnitude__phase_8cl.xhtml','');});
Jenkins514be652019-02-28 12:25:18 +000081/* @license-end */
Anthony Barbier871448e2017-03-24 14:54:29 +000082</script>
83<div id="doc-content">
84<!-- window showing the filter options -->
85<div id="MSearchSelectWindow"
86 onmouseover="return searchBox.OnSearchSelectShow()"
87 onmouseout="return searchBox.OnSearchSelectHide()"
88 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000089</div>
Anthony Barbier871448e2017-03-24 14:54:29 +000090
91<!-- iframe showing the search results (closed by default) -->
92<div id="MSearchResultsWindow">
93<iframe src="javascript:void(0)" frameborder="0"
94 name="MSearchResults" id="MSearchResults">
95</iframe>
96</div>
97
98<div class="header">
99 <div class="summary">
100<a href="#define-members">Macros</a> &#124;
101<a href="#func-members">Functions</a> </div>
102 <div class="headertitle">
103<div class="title">magnitude_phase.cl File Reference</div> </div>
104</div><!--header-->
105<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +0000106<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 +0000107</div>
108<p><a href="magnitude__phase_8cl_source.xhtml">Go to the source code of this file.</a></p>
109<table class="memberdecls">
110<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
111Macros</h2></td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000112<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 +0000113<tr class="separator:a259a59d7a4f247119c457af235827a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000114<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 +0000115<tr class="separator:a4434551334149479f843f87424bbb8c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
116</table><table class="memberdecls">
117<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
118Functions</h2></td></tr>
119<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 +0000120<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 +0000121<tr class="separator:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
122<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 +0000123<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 +0000124<tr class="separator:aec9387519a61474acb0b2bf90ef6d94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
125<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 +0000126<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 +0000127<tr class="separator:ab0d7e891c8a09824c46baa2393d6961f"><td class="memSeparator" colspan="2">&#160;</td></tr>
128<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 +0000129<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 +0000130<tr class="separator:a02ff978b574e44604d625dbd470ab870"><td class="memSeparator" colspan="2">&#160;</td></tr>
131<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 +0000132<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 +0000133<tr class="separator:a76ac02e1f05a26f67090c9464434e04a"><td class="memSeparator" colspan="2">&#160;</td></tr>
134</table>
135<h2 class="groupheader">Macro Definition Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000136<a id="a259a59d7a4f247119c457af235827a29"></a>
137<h2 class="memtitle"><span class="permalink"><a href="#a259a59d7a4f247119c457af235827a29">&#9670;&nbsp;</a></span>MAGNITUDE_OP</h2>
138
Anthony Barbier871448e2017-03-24 14:54:29 +0000139<div class="memitem">
140<div class="memproto">
141 <table class="memname">
142 <tr>
143 <td class="memname">#define MAGNITUDE_OP</td>
144 <td>(</td>
145 <td class="paramtype">&#160;</td>
146 <td class="paramname">x, </td>
147 </tr>
148 <tr>
149 <td class="paramkey"></td>
150 <td></td>
151 <td class="paramtype">&#160;</td>
152 <td class="paramname">y&#160;</td>
153 </tr>
154 <tr>
155 <td></td>
156 <td>)</td>
157 <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td>
158 </tr>
159 </table>
160</div><div class="memdoc">
161
Jenkinsb9abeae2018-11-22 11:58:08 +0000162<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 +0000163
Anthony Barbier871448e2017-03-24 14:54:29 +0000164</div>
165</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000166<a id="a4434551334149479f843f87424bbb8c8"></a>
167<h2 class="memtitle"><span class="permalink"><a href="#a4434551334149479f843f87424bbb8c8">&#9670;&nbsp;</a></span>PHASE_OP</h2>
168
Anthony Barbier871448e2017-03-24 14:54:29 +0000169<div class="memitem">
170<div class="memproto">
171 <table class="memname">
172 <tr>
173 <td class="memname">#define PHASE_OP</td>
174 <td>(</td>
175 <td class="paramtype">&#160;</td>
176 <td class="paramname">x, </td>
177 </tr>
178 <tr>
179 <td class="paramkey"></td>
180 <td></td>
181 <td class="paramtype">&#160;</td>
182 <td class="paramname">y&#160;</td>
183 </tr>
184 <tr>
185 <td></td>
186 <td>)</td>
187 <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td>
188 </tr>
189 </table>
190</div><div class="memdoc">
191
Jenkinsb9abeae2018-11-22 11:58:08 +0000192<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 +0000193
Anthony Barbier871448e2017-03-24 14:54:29 +0000194</div>
195</div>
196<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000197<a id="aedc7e5ee4cb8f5a0240e422f9a9e7ce9"></a>
198<h2 class="memtitle"><span class="permalink"><a href="#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">&#9670;&nbsp;</a></span>magnitude_l1()</h2>
199
Anthony Barbier871448e2017-03-24 14:54:29 +0000200<div class="memitem">
201<div class="memproto">
202<table class="mlabels">
203 <tr>
204 <td class="mlabels-left">
205 <table class="memname">
206 <tr>
207 <td class="memname">DATA_TYPE16 magnitude_l1 </td>
208 <td>(</td>
209 <td class="paramtype">DATA_TYPE16&#160;</td>
210 <td class="paramname"><em>a</em>, </td>
211 </tr>
212 <tr>
213 <td class="paramkey"></td>
214 <td></td>
215 <td class="paramtype">DATA_TYPE16&#160;</td>
216 <td class="paramname"><em>b</em>&#160;</td>
217 </tr>
218 <tr>
219 <td></td>
220 <td>)</td>
221 <td></td><td></td>
222 </tr>
223 </table>
224 </td>
225 <td class="mlabels-right">
226<span class="mlabels"><span class="mlabel">inline</span></span> </td>
227 </tr>
228</table>
229</div><div class="memdoc">
230
231<p>Calculates L1 normalization between two inputs. </p>
232<dl class="params"><dt>Parameters</dt><dd>
233 <table class="params">
234 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
235 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
236 </table>
237 </dd>
238</dl>
239<dl class="section return"><dt>Returns</dt><dd>L1 normalization magnitude result. Supported data types: S16, S32 </dd></dl>
240
Jenkinsb9abeae2018-11-22 11:58:08 +0000241<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>
Jenkins514be652019-02-28 12:25:18 +0000242<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>(<a class="code" href="namespacearm__compute_1_1wrapper.xhtml#ac4358b7409261f013124bd6068aeee79">add_sat</a>(abs(a), abs(b)), <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="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>
Jenkins514be652019-02-28 12:25:18 +0000244<div class="ttc" id="namespacearm__compute_1_1wrapper_xhtml_ac4358b7409261f013124bd6068aeee79"><div class="ttname"><a href="namespacearm__compute_1_1wrapper.xhtml#ac4358b7409261f013124bd6068aeee79">arm_compute::wrapper::add_sat</a></div><div class="ttdeci">uint8_t add_sat(const uint8_t &amp;a, const uint8_t &amp;b)</div><div class="ttdef"><b>Definition:</b> <a href="scalar_2add_8h_source.xhtml#l00033">add.h:33</a></div></div>
245<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#l00057">helpers.h:57</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000246</div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000247<p class="reference">References <a class="el" href="scalar_2add_8h_source.xhtml#l00033">arm_compute::wrapper::add_sat()</a>, <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#l00057">VEC_DATA_TYPE</a>.</p>
248
Anthony Barbier871448e2017-03-24 14:54:29 +0000249</div>
250</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000251<a id="aec9387519a61474acb0b2bf90ef6d94d"></a>
252<h2 class="memtitle"><span class="permalink"><a href="#aec9387519a61474acb0b2bf90ef6d94d">&#9670;&nbsp;</a></span>magnitude_l2()</h2>
253
Anthony Barbier871448e2017-03-24 14:54:29 +0000254<div class="memitem">
255<div class="memproto">
256<table class="mlabels">
257 <tr>
258 <td class="mlabels-left">
259 <table class="memname">
260 <tr>
261 <td class="memname">DATA_TYPE16 magnitude_l2 </td>
262 <td>(</td>
263 <td class="paramtype">int16&#160;</td>
264 <td class="paramname"><em>a</em>, </td>
265 </tr>
266 <tr>
267 <td class="paramkey"></td>
268 <td></td>
269 <td class="paramtype">int16&#160;</td>
270 <td class="paramname"><em>b</em>&#160;</td>
271 </tr>
272 <tr>
273 <td></td>
274 <td>)</td>
275 <td></td><td></td>
276 </tr>
277 </table>
278 </td>
279 <td class="mlabels-right">
280<span class="mlabels"><span class="mlabel">inline</span></span> </td>
281 </tr>
282</table>
283</div><div class="memdoc">
284
285<p>Calculates L2 normalization between two inputs. </p>
286<dl class="params"><dt>Parameters</dt><dd>
287 <table class="params">
288 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
289 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
290 </table>
291 </dd>
292</dl>
293<dl class="section return"><dt>Returns</dt><dd>L2 normalization magnitude result. Supported data types: S16, S32 </dd></dl>
294
Jenkinsb9abeae2018-11-22 11:58:08 +0000295<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>
Jenkins514be652019-02-28 12:25:18 +0000296<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 * a) + convert_uint16(b * b)))) + 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="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 +0000297<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>
Jenkins514be652019-02-28 12:25:18 +0000298<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#l00057">helpers.h:57</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000299</div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000300<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#l00057">VEC_DATA_TYPE</a>.</p>
301
Anthony Barbier871448e2017-03-24 14:54:29 +0000302</div>
303</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000304<a id="a76ac02e1f05a26f67090c9464434e04a"></a>
305<h2 class="memtitle"><span class="permalink"><a href="#a76ac02e1f05a26f67090c9464434e04a">&#9670;&nbsp;</a></span>magnitude_phase()</h2>
306
Anthony Barbier871448e2017-03-24 14:54:29 +0000307<div class="memitem">
308<div class="memproto">
309 <table class="memname">
310 <tr>
311 <td class="memname">__kernel void magnitude_phase </td>
312 <td>(</td>
313 <td class="paramtype">__global uchar *&#160;</td>
314 <td class="paramname"><em>gx_ptr</em>, </td>
315 </tr>
316 <tr>
317 <td class="paramkey"></td>
318 <td></td>
319 <td class="paramtype">uint&#160;</td>
320 <td class="paramname"><em>gx_stride_x</em>, </td>
321 </tr>
322 <tr>
323 <td class="paramkey"></td>
324 <td></td>
325 <td class="paramtype">uint&#160;</td>
326 <td class="paramname"><em>gx_step_x</em>, </td>
327 </tr>
328 <tr>
329 <td class="paramkey"></td>
330 <td></td>
331 <td class="paramtype">uint&#160;</td>
332 <td class="paramname"><em>gx_stride_y</em>, </td>
333 </tr>
334 <tr>
335 <td class="paramkey"></td>
336 <td></td>
337 <td class="paramtype">uint&#160;</td>
338 <td class="paramname"><em>gx_step_y</em>, </td>
339 </tr>
340 <tr>
341 <td class="paramkey"></td>
342 <td></td>
343 <td class="paramtype">uint&#160;</td>
344 <td class="paramname"><em>gx_offset_first_element_in_bytes</em>, </td>
345 </tr>
346 <tr>
347 <td class="paramkey"></td>
348 <td></td>
349 <td class="paramtype">__global uchar *&#160;</td>
350 <td class="paramname"><em>gy_ptr</em>, </td>
351 </tr>
352 <tr>
353 <td class="paramkey"></td>
354 <td></td>
355 <td class="paramtype">uint&#160;</td>
356 <td class="paramname"><em>gy_stride_x</em>, </td>
357 </tr>
358 <tr>
359 <td class="paramkey"></td>
360 <td></td>
361 <td class="paramtype">uint&#160;</td>
362 <td class="paramname"><em>gy_step_x</em>, </td>
363 </tr>
364 <tr>
365 <td class="paramkey"></td>
366 <td></td>
367 <td class="paramtype">uint&#160;</td>
368 <td class="paramname"><em>gy_stride_y</em>, </td>
369 </tr>
370 <tr>
371 <td class="paramkey"></td>
372 <td></td>
373 <td class="paramtype">uint&#160;</td>
374 <td class="paramname"><em>gy_step_y</em>, </td>
375 </tr>
376 <tr>
377 <td class="paramkey"></td>
378 <td></td>
379 <td class="paramtype">uint&#160;</td>
380 <td class="paramname"><em>gy_offset_first_element_in_bytes</em>, </td>
381 </tr>
382 <tr>
383 <td class="paramkey"></td>
384 <td></td>
385 <td class="paramtype">__global uchar *&#160;</td>
386 <td class="paramname"><em>magnitude_ptr</em>, </td>
387 </tr>
388 <tr>
389 <td class="paramkey"></td>
390 <td></td>
391 <td class="paramtype">uint&#160;</td>
392 <td class="paramname"><em>magnitude_stride_x</em>, </td>
393 </tr>
394 <tr>
395 <td class="paramkey"></td>
396 <td></td>
397 <td class="paramtype">uint&#160;</td>
398 <td class="paramname"><em>magnitude_step_x</em>, </td>
399 </tr>
400 <tr>
401 <td class="paramkey"></td>
402 <td></td>
403 <td class="paramtype">uint&#160;</td>
404 <td class="paramname"><em>magnitude_stride_y</em>, </td>
405 </tr>
406 <tr>
407 <td class="paramkey"></td>
408 <td></td>
409 <td class="paramtype">uint&#160;</td>
410 <td class="paramname"><em>magnitude_step_y</em>, </td>
411 </tr>
412 <tr>
413 <td class="paramkey"></td>
414 <td></td>
415 <td class="paramtype">uint&#160;</td>
416 <td class="paramname"><em>magnitude_offset_first_element_in_bytes</em>, </td>
417 </tr>
418 <tr>
419 <td class="paramkey"></td>
420 <td></td>
421 <td class="paramtype">__global uchar *&#160;</td>
422 <td class="paramname"><em>phase_ptr</em>, </td>
423 </tr>
424 <tr>
425 <td class="paramkey"></td>
426 <td></td>
427 <td class="paramtype">uint&#160;</td>
428 <td class="paramname"><em>phase_stride_x</em>, </td>
429 </tr>
430 <tr>
431 <td class="paramkey"></td>
432 <td></td>
433 <td class="paramtype">uint&#160;</td>
434 <td class="paramname"><em>phase_step_x</em>, </td>
435 </tr>
436 <tr>
437 <td class="paramkey"></td>
438 <td></td>
439 <td class="paramtype">uint&#160;</td>
440 <td class="paramname"><em>phase_stride_y</em>, </td>
441 </tr>
442 <tr>
443 <td class="paramkey"></td>
444 <td></td>
445 <td class="paramtype">uint&#160;</td>
446 <td class="paramname"><em>phase_step_y</em>, </td>
447 </tr>
448 <tr>
449 <td class="paramkey"></td>
450 <td></td>
451 <td class="paramtype">uint&#160;</td>
452 <td class="paramname"><em>phase_offset_first_element_in_bytes</em>&#160;</td>
453 </tr>
454 <tr>
455 <td></td>
456 <td>)</td>
457 <td></td><td></td>
458 </tr>
459 </table>
460</div><div class="memdoc">
461
462<p>Calculate the magnitude and phase of given the gradients of an image. </p>
463<dl class="section note"><dt>Note</dt><dd>Magnitude calculation supported: L1 normalization(type = 1) and L2 normalization(type = 2). </dd>
464<dd>
465Phase calculation supported: Unsigned(type = 1) [0,128] and Signed(type = 2) [0,256).</dd></dl>
466<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>
467<dd>
468To enable magnitude calculation -DMAGNITUDE="magnitude_calculation_type_id" must be provided at compile time. eg -DMAGNITUDE=1 </dd>
469<dd>
470Datatype 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>
471<dl class="params"><dt>Parameters</dt><dd>
472 <table class="params">
473 <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>
474 <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>
475 <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>
476 <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>
477 <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>
478 <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>
479 <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>
480 <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>
481 <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>
482 <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>
483 <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>
484 <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>
485 <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>
486 <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>
487 <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>
488 <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>
489 <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>
490 <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>
491 <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>
492 <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>
493 <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>
494 <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>
495 <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>
496 <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>
497 </table>
498 </dd>
499</dl>
500
Jenkinsb9abeae2018-11-22 11:58:08 +0000501<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>
Jenkins514be652019-02-28 12:25:18 +0000502<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 <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)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>(<a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6aa278cb3dd1777e7338c5e573c55550">magnitude</a>);</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 <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a6aa278cb3dd1777e7338c5e573c55550">magnitude</a>.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>(<a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a74991bda4fcca3ce5dcf8afdccdbafff">phase</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a74991bda4fcca3ce5dcf8afdccdbafff">phase</a>.ptr);</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#l00113">helpers.h:113</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000503<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 +0100504<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>
Jenkins514be652019-02-28 12:25:18 +0000505<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#l00151">helpers.h:151</a></div></div>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100506<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 +0000507<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 +0100508<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>
Jenkins514be652019-02-28 12:25:18 +0000509<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#l00057">helpers.h:57</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000510</div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000511<p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00113">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#l00153">Image::ptr</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00057">VEC_DATA_TYPE</a>.</p>
512
Anthony Barbier871448e2017-03-24 14:54:29 +0000513</div>
514</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000515<a id="a02ff978b574e44604d625dbd470ab870"></a>
516<h2 class="memtitle"><span class="permalink"><a href="#a02ff978b574e44604d625dbd470ab870">&#9670;&nbsp;</a></span>phase_signed()</h2>
517
Anthony Barbier871448e2017-03-24 14:54:29 +0000518<div class="memitem">
519<div class="memproto">
520<table class="mlabels">
521 <tr>
522 <td class="mlabels-left">
523 <table class="memname">
524 <tr>
525 <td class="memname">uchar16 phase_signed </td>
526 <td>(</td>
527 <td class="paramtype">DATA_TYPE16&#160;</td>
528 <td class="paramname"><em>a</em>, </td>
529 </tr>
530 <tr>
531 <td class="paramkey"></td>
532 <td></td>
533 <td class="paramtype">DATA_TYPE16&#160;</td>
534 <td class="paramname"><em>b</em>&#160;</td>
535 </tr>
536 <tr>
537 <td></td>
538 <td>)</td>
539 <td></td><td></td>
540 </tr>
541 </table>
542 </td>
543 <td class="mlabels-right">
544<span class="mlabels"><span class="mlabel">inline</span></span> </td>
545 </tr>
546</table>
547</div><div class="memdoc">
548
549<p>Calculates signed phase between two inputs. </p>
550<dl class="params"><dt>Parameters</dt><dd>
551 <table class="params">
552 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
553 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
554 </table>
555 </dd>
556</dl>
557<dl class="section return"><dt>Returns</dt><dd>Signed phase mapped in the interval [0, 256). Supported data types: U8 </dd></dl>
558
Jenkinsb9abeae2018-11-22 11:58:08 +0000559<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>
Jenkins514be652019-02-28 12:25:18 +0000560<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(b), convert_float16(a));</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; arct = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(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_af77145fbdc6b0c8931148f5597d9de53"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">arm_compute::test::validation::select</a></div><div class="ttdeci">CLSelect select</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_select_8cpp_source.xhtml#l00164">Select.cpp:164</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100561</div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000562<p class="reference">References <a class="el" href="_c_l_2_select_8cpp_source.xhtml#l00164">arm_compute::test::validation::select</a>.</p>
563
Anthony Barbier871448e2017-03-24 14:54:29 +0000564</div>
565</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000566<a id="ab0d7e891c8a09824c46baa2393d6961f"></a>
567<h2 class="memtitle"><span class="permalink"><a href="#ab0d7e891c8a09824c46baa2393d6961f">&#9670;&nbsp;</a></span>phase_unsigned()</h2>
568
Anthony Barbier871448e2017-03-24 14:54:29 +0000569<div class="memitem">
570<div class="memproto">
571<table class="mlabels">
572 <tr>
573 <td class="mlabels-left">
574 <table class="memname">
575 <tr>
576 <td class="memname">uchar16 phase_unsigned </td>
577 <td>(</td>
578 <td class="paramtype">DATA_TYPE16&#160;</td>
579 <td class="paramname"><em>a</em>, </td>
580 </tr>
581 <tr>
582 <td class="paramkey"></td>
583 <td></td>
584 <td class="paramtype">DATA_TYPE16&#160;</td>
585 <td class="paramname"><em>b</em>&#160;</td>
586 </tr>
587 <tr>
588 <td></td>
589 <td>)</td>
590 <td></td><td></td>
591 </tr>
592 </table>
593 </td>
594 <td class="mlabels-right">
595<span class="mlabels"><span class="mlabel">inline</span></span> </td>
596 </tr>
597</table>
598</div><div class="memdoc">
599
600<p>Calculates unsigned phase between two inputs. </p>
601<dl class="params"><dt>Parameters</dt><dd>
602 <table class="params">
603 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
604 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
605 </table>
606 </dd>
607</dl>
608<dl class="section return"><dt>Returns</dt><dd>Unsigned phase mapped in the interval [0, 180]. Supported data types: U8 </dd></dl>
609
Jenkinsb9abeae2018-11-22 11:58:08 +0000610<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>
Jenkins514be652019-02-28 12:25:18 +0000611<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(b), convert_float16(a)) * (float16)180.0f;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; angle_deg_f32 = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">select</a>(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_af77145fbdc6b0c8931148f5597d9de53"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af77145fbdc6b0c8931148f5597d9de53">arm_compute::test::validation::select</a></div><div class="ttdeci">CLSelect select</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_select_8cpp_source.xhtml#l00164">Select.cpp:164</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100612</div><!-- fragment -->
Jenkins514be652019-02-28 12:25:18 +0000613<p class="reference">References <a class="el" href="_c_l_2_select_8cpp_source.xhtml#l00164">arm_compute::test::validation::select</a>.</p>
614
Anthony Barbier871448e2017-03-24 14:54:29 +0000615</div>
616</div>
617</div><!-- contents -->
618</div><!-- doc-content -->
619<!-- start footer part -->
620<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
621 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000622 <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>
Jenkins514be652019-02-28 12:25:18 +0000623 <li class="footer">Generated on Thu Feb 28 2019 12:24:56 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000624 <a href="http://www.doxygen.org/index.html">
Jenkins514be652019-02-28 12:25:18 +0000625 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000626 </ul>
627</div>
628</body>
629</html>