blob: a3868bc5abee9543dc750e40ce7e5a62a307f28b [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"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +00007<meta name="generator" content="Doxygen 1.8.11"/>
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);
19 $(window).load(resizeHeight);
20</script>
21<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000022<script type="text/javascript" src="search/searchdata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000023<script type="text/javascript" src="search/search.js"></script>
24<script type="text/javascript">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000025 $(document).ready(function() { init_search(); });
Anthony Barbier871448e2017-03-24 14:54:29 +000026</script>
27<script type="text/x-mathjax-config">
28 MathJax.Hub.Config({
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
31});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000032</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000033<link href="doxygen.css" rel="stylesheet" type="text/css" />
34</head>
35<body>
36<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37<div id="titlearea">
38<table cellspacing="0" cellpadding="0">
39 <tbody>
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010042 <div id="projectname">Compute Library
Jenkinsb3a371b2018-05-23 11:36:53 +010043 &#160;<span id="projectnumber">18.05</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Anthony Barbier8140e1e2017-12-14 23:48:46 +000051<!-- Generated by Doxygen 1.8.11 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000052<script type="text/javascript">
53var searchBox = new SearchBox("searchBox", "search",false,'Search');
54</script>
55 <div id="navrow1" class="tabs">
56 <ul class="tablist">
57 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010058 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000059 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
61 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62 <li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
64 <span class="left">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 alt=""/>
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75 </span>
76 </div>
77 </li>
78 </ul>
79 </div>
80 <div id="navrow2" class="tabs2">
81 <ul class="tablist">
82 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
83 <li><a href="globals.xhtml"><span>Globals</span></a></li>
84 </ul>
85 </div>
86</div><!-- top -->
87<div id="side-nav" class="ui-resizable side-nav-resizable">
88 <div id="nav-tree">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
91 </div>
92 </div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
95 </div>
96</div>
97<script type="text/javascript">
98$(document).ready(function(){initNavTree('magnitude__phase_8cl.xhtml','');});
99</script>
100<div id="doc-content">
101<!-- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000106</div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="javascript:void(0)" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<div class="header">
116 <div class="summary">
117<a href="#define-members">Macros</a> &#124;
118<a href="#func-members">Functions</a> </div>
119 <div class="headertitle">
120<div class="title">magnitude_phase.cl File Reference</div> </div>
121</div><!--header-->
122<div class="contents">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000123<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Anthony Barbier871448e2017-03-24 14:54:29 +0000124</div>
125<p><a href="magnitude__phase_8cl_source.xhtml">Go to the source code of this file.</a></p>
126<table class="memberdecls">
127<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
128Macros</h2></td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000129<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 +0000130<tr class="separator:a259a59d7a4f247119c457af235827a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000131<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 +0000132<tr class="separator:a4434551334149479f843f87424bbb8c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
133</table><table class="memberdecls">
134<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
135Functions</h2></td></tr>
136<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 +0000137<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 +0000138<tr class="separator:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memSeparator" colspan="2">&#160;</td></tr>
139<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 +0000140<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 +0000141<tr class="separator:aec9387519a61474acb0b2bf90ef6d94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
142<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 +0000143<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 +0000144<tr class="separator:ab0d7e891c8a09824c46baa2393d6961f"><td class="memSeparator" colspan="2">&#160;</td></tr>
145<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 +0000146<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 +0000147<tr class="separator:a02ff978b574e44604d625dbd470ab870"><td class="memSeparator" colspan="2">&#160;</td></tr>
148<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 +0000149<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 +0000150<tr class="separator:a76ac02e1f05a26f67090c9464434e04a"><td class="memSeparator" colspan="2">&#160;</td></tr>
151</table>
152<h2 class="groupheader">Macro Definition Documentation</h2>
153<a class="anchor" id="a259a59d7a4f247119c457af235827a29"></a>
154<div class="memitem">
155<div class="memproto">
156 <table class="memname">
157 <tr>
158 <td class="memname">#define MAGNITUDE_OP</td>
159 <td>(</td>
160 <td class="paramtype">&#160;</td>
161 <td class="paramname">x, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype">&#160;</td>
167 <td class="paramname">y&#160;</td>
168 </tr>
169 <tr>
170 <td></td>
171 <td>)</td>
172 <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td>
173 </tr>
174 </table>
175</div><div class="memdoc">
176
Anthony Barbierdbdab852017-06-23 15:42:00 +0100177<p>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 +0000178
Anthony Barbierdbdab852017-06-23 15:42:00 +0100179<p>Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000180
181</div>
182</div>
183<a class="anchor" id="a4434551334149479f843f87424bbb8c8"></a>
184<div class="memitem">
185<div class="memproto">
186 <table class="memname">
187 <tr>
188 <td class="memname">#define PHASE_OP</td>
189 <td>(</td>
190 <td class="paramtype">&#160;</td>
191 <td class="paramname">x, </td>
192 </tr>
193 <tr>
194 <td class="paramkey"></td>
195 <td></td>
196 <td class="paramtype">&#160;</td>
197 <td class="paramname">y&#160;</td>
198 </tr>
199 <tr>
200 <td></td>
201 <td>)</td>
202 <td></td><td>&#160;&#160;&#160;<a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td>
203 </tr>
204 </table>
205</div><div class="memdoc">
206
Anthony Barbierdbdab852017-06-23 15:42:00 +0100207<p>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 +0000208
Anthony Barbierdbdab852017-06-23 15:42:00 +0100209<p>Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000210
211</div>
212</div>
213<h2 class="groupheader">Function Documentation</h2>
214<a class="anchor" id="aedc7e5ee4cb8f5a0240e422f9a9e7ce9"></a>
215<div class="memitem">
216<div class="memproto">
217<table class="mlabels">
218 <tr>
219 <td class="mlabels-left">
220 <table class="memname">
221 <tr>
222 <td class="memname">DATA_TYPE16 magnitude_l1 </td>
223 <td>(</td>
224 <td class="paramtype">DATA_TYPE16&#160;</td>
225 <td class="paramname"><em>a</em>, </td>
226 </tr>
227 <tr>
228 <td class="paramkey"></td>
229 <td></td>
230 <td class="paramtype">DATA_TYPE16&#160;</td>
231 <td class="paramname"><em>b</em>&#160;</td>
232 </tr>
233 <tr>
234 <td></td>
235 <td>)</td>
236 <td></td><td></td>
237 </tr>
238 </table>
239 </td>
240 <td class="mlabels-right">
241<span class="mlabels"><span class="mlabel">inline</span></span> </td>
242 </tr>
243</table>
244</div><div class="memdoc">
245
246<p>Calculates L1 normalization between two inputs. </p>
247<dl class="params"><dt>Parameters</dt><dd>
248 <table class="params">
249 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
250 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
251 </table>
252 </dd>
253</dl>
254<dl class="section return"><dt>Returns</dt><dd>L1 normalization magnitude result. Supported data types: S16, S32 </dd></dl>
255
256<p>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>
257
Jenkinsb3a371b2018-05-23 11:36:53 +0100258<p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00927">arm_compute::test::fixed_point_arithmetic::detail::abs()</a>, <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Jenkinsc3f34a42018-03-02 12:38:09 +0000259<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(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">abs</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">abs</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a>)), <a class="code" href="fixed__point_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">CLTensor a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00121">GEMM.cpp:121</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100260<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>
261<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#l00040">direct_convolution1x1.cl:40</a></div></div>
262<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_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="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
Jenkinsb3a371b2018-05-23 11:36:53 +0100263<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ae115fc750a92fb6a5e094998b56fcc56"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">arm_compute::test::fixed_point_arithmetic::detail::abs</a></div><div class="ttdeci">fixed_point&lt; T &gt; abs(fixed_point&lt; T &gt; x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00927">FixedPoint.h:927</a></div></div>
Jenkinsc3f34a42018-03-02 12:38:09 +0000264<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#l00122">GEMM.cpp:122</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000265</div><!-- fragment -->
266</div>
267</div>
268<a class="anchor" id="aec9387519a61474acb0b2bf90ef6d94d"></a>
269<div class="memitem">
270<div class="memproto">
271<table class="mlabels">
272 <tr>
273 <td class="mlabels-left">
274 <table class="memname">
275 <tr>
276 <td class="memname">DATA_TYPE16 magnitude_l2 </td>
277 <td>(</td>
278 <td class="paramtype">int16&#160;</td>
279 <td class="paramname"><em>a</em>, </td>
280 </tr>
281 <tr>
282 <td class="paramkey"></td>
283 <td></td>
284 <td class="paramtype">int16&#160;</td>
285 <td class="paramname"><em>b</em>&#160;</td>
286 </tr>
287 <tr>
288 <td></td>
289 <td>)</td>
290 <td></td><td></td>
291 </tr>
292 </table>
293 </td>
294 <td class="mlabels-right">
295<span class="mlabels"><span class="mlabel">inline</span></span> </td>
296 </tr>
297</table>
298</div><div class="memdoc">
299
300<p>Calculates L2 normalization between two inputs. </p>
301<dl class="params"><dt>Parameters</dt><dd>
302 <table class="params">
303 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
304 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
305 </table>
306 </dd>
307</dl>
308<dl class="section return"><dt>Returns</dt><dd>L2 normalization magnitude result. Supported data types: S16, S32 </dd></dl>
309
310<p>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>
311
Kaizen8938bd32017-09-28 14:38:23 +0100312<p>References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Jenkinsc3f34a42018-03-02 12:38:09 +0000313<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="fixed__point_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">CLTensor a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00121">GEMM.cpp:121</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100314<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>
315<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#l00040">direct_convolution1x1.cl:40</a></div></div>
316<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_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="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
Jenkinsc3f34a42018-03-02 12:38:09 +0000317<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#l00122">GEMM.cpp:122</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000318</div><!-- fragment -->
319</div>
320</div>
321<a class="anchor" id="a76ac02e1f05a26f67090c9464434e04a"></a>
322<div class="memitem">
323<div class="memproto">
324 <table class="memname">
325 <tr>
326 <td class="memname">__kernel void magnitude_phase </td>
327 <td>(</td>
328 <td class="paramtype">__global uchar *&#160;</td>
329 <td class="paramname"><em>gx_ptr</em>, </td>
330 </tr>
331 <tr>
332 <td class="paramkey"></td>
333 <td></td>
334 <td class="paramtype">uint&#160;</td>
335 <td class="paramname"><em>gx_stride_x</em>, </td>
336 </tr>
337 <tr>
338 <td class="paramkey"></td>
339 <td></td>
340 <td class="paramtype">uint&#160;</td>
341 <td class="paramname"><em>gx_step_x</em>, </td>
342 </tr>
343 <tr>
344 <td class="paramkey"></td>
345 <td></td>
346 <td class="paramtype">uint&#160;</td>
347 <td class="paramname"><em>gx_stride_y</em>, </td>
348 </tr>
349 <tr>
350 <td class="paramkey"></td>
351 <td></td>
352 <td class="paramtype">uint&#160;</td>
353 <td class="paramname"><em>gx_step_y</em>, </td>
354 </tr>
355 <tr>
356 <td class="paramkey"></td>
357 <td></td>
358 <td class="paramtype">uint&#160;</td>
359 <td class="paramname"><em>gx_offset_first_element_in_bytes</em>, </td>
360 </tr>
361 <tr>
362 <td class="paramkey"></td>
363 <td></td>
364 <td class="paramtype">__global uchar *&#160;</td>
365 <td class="paramname"><em>gy_ptr</em>, </td>
366 </tr>
367 <tr>
368 <td class="paramkey"></td>
369 <td></td>
370 <td class="paramtype">uint&#160;</td>
371 <td class="paramname"><em>gy_stride_x</em>, </td>
372 </tr>
373 <tr>
374 <td class="paramkey"></td>
375 <td></td>
376 <td class="paramtype">uint&#160;</td>
377 <td class="paramname"><em>gy_step_x</em>, </td>
378 </tr>
379 <tr>
380 <td class="paramkey"></td>
381 <td></td>
382 <td class="paramtype">uint&#160;</td>
383 <td class="paramname"><em>gy_stride_y</em>, </td>
384 </tr>
385 <tr>
386 <td class="paramkey"></td>
387 <td></td>
388 <td class="paramtype">uint&#160;</td>
389 <td class="paramname"><em>gy_step_y</em>, </td>
390 </tr>
391 <tr>
392 <td class="paramkey"></td>
393 <td></td>
394 <td class="paramtype">uint&#160;</td>
395 <td class="paramname"><em>gy_offset_first_element_in_bytes</em>, </td>
396 </tr>
397 <tr>
398 <td class="paramkey"></td>
399 <td></td>
400 <td class="paramtype">__global uchar *&#160;</td>
401 <td class="paramname"><em>magnitude_ptr</em>, </td>
402 </tr>
403 <tr>
404 <td class="paramkey"></td>
405 <td></td>
406 <td class="paramtype">uint&#160;</td>
407 <td class="paramname"><em>magnitude_stride_x</em>, </td>
408 </tr>
409 <tr>
410 <td class="paramkey"></td>
411 <td></td>
412 <td class="paramtype">uint&#160;</td>
413 <td class="paramname"><em>magnitude_step_x</em>, </td>
414 </tr>
415 <tr>
416 <td class="paramkey"></td>
417 <td></td>
418 <td class="paramtype">uint&#160;</td>
419 <td class="paramname"><em>magnitude_stride_y</em>, </td>
420 </tr>
421 <tr>
422 <td class="paramkey"></td>
423 <td></td>
424 <td class="paramtype">uint&#160;</td>
425 <td class="paramname"><em>magnitude_step_y</em>, </td>
426 </tr>
427 <tr>
428 <td class="paramkey"></td>
429 <td></td>
430 <td class="paramtype">uint&#160;</td>
431 <td class="paramname"><em>magnitude_offset_first_element_in_bytes</em>, </td>
432 </tr>
433 <tr>
434 <td class="paramkey"></td>
435 <td></td>
436 <td class="paramtype">__global uchar *&#160;</td>
437 <td class="paramname"><em>phase_ptr</em>, </td>
438 </tr>
439 <tr>
440 <td class="paramkey"></td>
441 <td></td>
442 <td class="paramtype">uint&#160;</td>
443 <td class="paramname"><em>phase_stride_x</em>, </td>
444 </tr>
445 <tr>
446 <td class="paramkey"></td>
447 <td></td>
448 <td class="paramtype">uint&#160;</td>
449 <td class="paramname"><em>phase_step_x</em>, </td>
450 </tr>
451 <tr>
452 <td class="paramkey"></td>
453 <td></td>
454 <td class="paramtype">uint&#160;</td>
455 <td class="paramname"><em>phase_stride_y</em>, </td>
456 </tr>
457 <tr>
458 <td class="paramkey"></td>
459 <td></td>
460 <td class="paramtype">uint&#160;</td>
461 <td class="paramname"><em>phase_step_y</em>, </td>
462 </tr>
463 <tr>
464 <td class="paramkey"></td>
465 <td></td>
466 <td class="paramtype">uint&#160;</td>
467 <td class="paramname"><em>phase_offset_first_element_in_bytes</em>&#160;</td>
468 </tr>
469 <tr>
470 <td></td>
471 <td>)</td>
472 <td></td><td></td>
473 </tr>
474 </table>
475</div><div class="memdoc">
476
477<p>Calculate the magnitude and phase of given the gradients of an image. </p>
478<dl class="section note"><dt>Note</dt><dd>Magnitude calculation supported: L1 normalization(type = 1) and L2 normalization(type = 2). </dd>
479<dd>
480Phase calculation supported: Unsigned(type = 1) [0,128] and Signed(type = 2) [0,256).</dd></dl>
481<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>
482<dd>
483To enable magnitude calculation -DMAGNITUDE="magnitude_calculation_type_id" must be provided at compile time. eg -DMAGNITUDE=1 </dd>
484<dd>
485Datatype 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>
486<dl class="params"><dt>Parameters</dt><dd>
487 <table class="params">
488 <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>
489 <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>
490 <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>
491 <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>
492 <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>
493 <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>
494 <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>
495 <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>
496 <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>
497 <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>
498 <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>
499 <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>
500 <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>
501 <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>
502 <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>
503 <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>
504 <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>
505 <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>
506 <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>
507 <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>
508 <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>
509 <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>
510 <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>
511 <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>
512 </table>
513 </dd>
514</dl>
515
Anthony Barbierdbdab852017-06-23 15:42:00 +0100516<p>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 +0000517
Jenkinsb3a371b2018-05-23 11:36:53 +0100518<p>References <a class="el" href="helpers_8h_source.xhtml#l00104">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="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Anthony Barbier06ea0482018-02-22 15:45:35 +0000519
520<p>Referenced by <a class="el" href="_n_e_magnitude_phase_kernel_8h_source.xhtml#l00039">NEMagnitudePhaseKernel&lt; mag_type, phase_type &gt;::name()</a>.</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000521<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="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="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="fixed__point_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="fixed__point_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="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="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="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 +0100522<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>
523<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="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="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
524<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
525<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100526<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_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="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100527<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 +0000528<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 +0100529<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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000530</div><!-- fragment -->
531</div>
532</div>
533<a class="anchor" id="a02ff978b574e44604d625dbd470ab870"></a>
534<div class="memitem">
535<div class="memproto">
536<table class="mlabels">
537 <tr>
538 <td class="mlabels-left">
539 <table class="memname">
540 <tr>
541 <td class="memname">uchar16 phase_signed </td>
542 <td>(</td>
543 <td class="paramtype">DATA_TYPE16&#160;</td>
544 <td class="paramname"><em>a</em>, </td>
545 </tr>
546 <tr>
547 <td class="paramkey"></td>
548 <td></td>
549 <td class="paramtype">DATA_TYPE16&#160;</td>
550 <td class="paramname"><em>b</em>&#160;</td>
551 </tr>
552 <tr>
553 <td></td>
554 <td>)</td>
555 <td></td><td></td>
556 </tr>
557 </table>
558 </td>
559 <td class="mlabels-right">
560<span class="mlabels"><span class="mlabel">inline</span></span> </td>
561 </tr>
562</table>
563</div><div class="memdoc">
564
565<p>Calculates signed phase between two inputs. </p>
566<dl class="params"><dt>Parameters</dt><dd>
567 <table class="params">
568 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
569 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
570 </table>
571 </dd>
572</dl>
573<dl class="section return"><dt>Returns</dt><dd>Signed phase mapped in the interval [0, 256). Supported data types: U8 </dd></dl>
574
Anthony Barbierdbdab852017-06-23 15:42:00 +0100575<p>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 +0000576
Jenkinsc3f34a42018-03-02 12:38:09 +0000577<p>References <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00121">arm_compute::test::validation::a</a>, and <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00122">arm_compute::test::validation::b</a>.</p>
578<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">CLTensor a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00121">GEMM.cpp:121</a></div></div>
579<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#l00122">GEMM.cpp:122</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100580</div><!-- fragment -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000581</div>
582</div>
583<a class="anchor" id="ab0d7e891c8a09824c46baa2393d6961f"></a>
584<div class="memitem">
585<div class="memproto">
586<table class="mlabels">
587 <tr>
588 <td class="mlabels-left">
589 <table class="memname">
590 <tr>
591 <td class="memname">uchar16 phase_unsigned </td>
592 <td>(</td>
593 <td class="paramtype">DATA_TYPE16&#160;</td>
594 <td class="paramname"><em>a</em>, </td>
595 </tr>
596 <tr>
597 <td class="paramkey"></td>
598 <td></td>
599 <td class="paramtype">DATA_TYPE16&#160;</td>
600 <td class="paramname"><em>b</em>&#160;</td>
601 </tr>
602 <tr>
603 <td></td>
604 <td>)</td>
605 <td></td><td></td>
606 </tr>
607 </table>
608 </td>
609 <td class="mlabels-right">
610<span class="mlabels"><span class="mlabel">inline</span></span> </td>
611 </tr>
612</table>
613</div><div class="memdoc">
614
615<p>Calculates unsigned phase between two inputs. </p>
616<dl class="params"><dt>Parameters</dt><dd>
617 <table class="params">
618 <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr>
619 <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr>
620 </table>
621 </dd>
622</dl>
623<dl class="section return"><dt>Returns</dt><dd>Unsigned phase mapped in the interval [0, 180]. Supported data types: U8 </dd></dl>
624
625<p>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 +0000626
Jenkinsc3f34a42018-03-02 12:38:09 +0000627<p>References <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00121">arm_compute::test::validation::a</a>, and <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00122">arm_compute::test::validation::b</a>.</p>
628<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">CLTensor a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00121">GEMM.cpp:121</a></div></div>
629<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#l00122">GEMM.cpp:122</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100630</div><!-- fragment -->
Anthony Barbier871448e2017-03-24 14:54:29 +0000631</div>
632</div>
633</div><!-- contents -->
634</div><!-- doc-content -->
635<!-- start footer part -->
636<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
637 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000638 <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>
Jenkinsb3a371b2018-05-23 11:36:53 +0100639 <li class="footer">Generated on Wed May 23 2018 11:36:39 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000640 <a href="http://www.doxygen.org/index.html">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000641 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000642 </ul>
643</div>
644</body>
645</html>