Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 1 | <!-- 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"/> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 7 | <meta name="generator" content="Doxygen 1.8.6"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 9 | <title>Compute Library: src/core/CL/cl_kernels/magnitude_phase.cl File Reference</title> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | $(window).load(resizeHeight); |
| 19 | </script> |
| 20 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <script type="text/javascript"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 23 | $(document).ready(function() { searchBox.OnSelectItem(0); }); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 24 | </script> |
| 25 | <script type="text/x-mathjax-config"> |
| 26 | MathJax.Hub.Config({ |
| 27 | extensions: ["tex2jax.js"], |
| 28 | jax: ["input/TeX","output/HTML-CSS"], |
| 29 | }); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 30 | </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 31 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 32 | </head> |
| 33 | <body> |
| 34 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 35 | <div id="titlearea"> |
| 36 | <table cellspacing="0" cellpadding="0"> |
| 37 | <tbody> |
| 38 | <tr style="height: 56px;"> |
| 39 | <td style="padding-left: 0.5em;"> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 40 | <div id="projectname">Compute Library |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 41 |  <span id="projectnumber">17.10</span> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 42 | </div> |
| 43 | </td> |
| 44 | </tr> |
| 45 | </tbody> |
| 46 | </table> |
| 47 | </div> |
| 48 | <!-- end header part --> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 49 | <!-- Generated by Doxygen 1.8.6 --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 50 | <script type="text/javascript"> |
| 51 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 52 | </script> |
| 53 | <div id="navrow1" class="tabs"> |
| 54 | <ul class="tablist"> |
| 55 | <li><a href="index.xhtml"><span>Main Page</span></a></li> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 56 | <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 57 | <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| 58 | <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| 59 | <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| 60 | <li> |
| 61 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 62 | <span class="left"> |
| 63 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 64 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 65 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 66 | alt=""/> |
| 67 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 68 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 69 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 70 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 71 | </span><span class="right"> |
| 72 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 73 | </span> |
| 74 | </div> |
| 75 | </li> |
| 76 | </ul> |
| 77 | </div> |
| 78 | <div id="navrow2" class="tabs2"> |
| 79 | <ul class="tablist"> |
| 80 | <li><a href="files.xhtml"><span>File List</span></a></li> |
| 81 | <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| 82 | </ul> |
| 83 | </div> |
| 84 | </div><!-- top --> |
| 85 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 86 | <div id="nav-tree"> |
| 87 | <div id="nav-tree-contents"> |
| 88 | <div id="nav-sync" class="sync"></div> |
| 89 | </div> |
| 90 | </div> |
| 91 | <div id="splitbar" style="-moz-user-select:none;" |
| 92 | class="ui-resizable-handle"> |
| 93 | </div> |
| 94 | </div> |
| 95 | <script type="text/javascript"> |
| 96 | $(document).ready(function(){initNavTree('magnitude__phase_8cl.xhtml','');}); |
| 97 | </script> |
| 98 | <div id="doc-content"> |
| 99 | <!-- window showing the filter options --> |
| 100 | <div id="MSearchSelectWindow" |
| 101 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 102 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 103 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 104 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 105 | |
| 106 | <!-- iframe showing the search results (closed by default) --> |
| 107 | <div id="MSearchResultsWindow"> |
| 108 | <iframe src="javascript:void(0)" frameborder="0" |
| 109 | name="MSearchResults" id="MSearchResults"> |
| 110 | </iframe> |
| 111 | </div> |
| 112 | |
| 113 | <div class="header"> |
| 114 | <div class="summary"> |
| 115 | <a href="#define-members">Macros</a> | |
| 116 | <a href="#func-members">Functions</a> </div> |
| 117 | <div class="headertitle"> |
| 118 | <div class="title">magnitude_phase.cl File Reference</div> </div> |
| 119 | </div><!--header--> |
| 120 | <div class="contents"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 121 | <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 122 | </div> |
| 123 | <p><a href="magnitude__phase_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| 124 | <table class="memberdecls"> |
| 125 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 126 | Macros</h2></td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 127 | <tr class="memitem:a259a59d7a4f247119c457af235827a29"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a>(x, y)   <a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 128 | <tr class="separator:a259a59d7a4f247119c457af235827a29"><td class="memSeparator" colspan="2"> </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 129 | <tr class="memitem:a4434551334149479f843f87424bbb8c8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#a4434551334149479f843f87424bbb8c8">PHASE_OP</a>(x, y)   <a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 130 | <tr class="separator:a4434551334149479f843f87424bbb8c8"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | </table><table class="memberdecls"> |
| 132 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 133 | Functions</h2></td></tr> |
| 134 | <tr class="memitem:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memItemLeft" align="right" valign="top">DATA_TYPE16 </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 135 | <tr class="memdesc:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="mdescLeft"> </td><td class="mdescRight">Calculates L1 normalization between two inputs. <a href="#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">More...</a><br/></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 136 | <tr class="separator:aedc7e5ee4cb8f5a0240e422f9a9e7ce9"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:aec9387519a61474acb0b2bf90ef6d94d"><td class="memItemLeft" align="right" valign="top">DATA_TYPE16 </td><td class="memItemRight" valign="bottom"><a class="el" href="magnitude__phase_8cl.xhtml#aec9387519a61474acb0b2bf90ef6d94d">magnitude_l2</a> (int16 a, int16 b)</td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 138 | <tr class="memdesc:aec9387519a61474acb0b2bf90ef6d94d"><td class="mdescLeft"> </td><td class="mdescRight">Calculates L2 normalization between two inputs. <a href="#aec9387519a61474acb0b2bf90ef6d94d">More...</a><br/></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 139 | <tr class="separator:aec9387519a61474acb0b2bf90ef6d94d"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <tr class="memitem:ab0d7e891c8a09824c46baa2393d6961f"><td class="memItemLeft" align="right" valign="top">uchar16 </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 141 | <tr class="memdesc:ab0d7e891c8a09824c46baa2393d6961f"><td class="mdescLeft"> </td><td class="mdescRight">Calculates unsigned phase between two inputs. <a href="#ab0d7e891c8a09824c46baa2393d6961f">More...</a><br/></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 142 | <tr class="separator:ab0d7e891c8a09824c46baa2393d6961f"><td class="memSeparator" colspan="2"> </td></tr> |
| 143 | <tr class="memitem:a02ff978b574e44604d625dbd470ab870"><td class="memItemLeft" align="right" valign="top">uchar16 </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 144 | <tr class="memdesc:a02ff978b574e44604d625dbd470ab870"><td class="mdescLeft"> </td><td class="mdescRight">Calculates signed phase between two inputs. <a href="#a02ff978b574e44604d625dbd470ab870">More...</a><br/></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 145 | <tr class="separator:a02ff978b574e44604d625dbd470ab870"><td class="memSeparator" colspan="2"> </td></tr> |
| 146 | <tr class="memitem:a76ac02e1f05a26f67090c9464434e04a"><td class="memItemLeft" align="right" valign="top">__kernel void </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 147 | <tr class="memdesc:a76ac02e1f05a26f67090c9464434e04a"><td class="mdescLeft"> </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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 148 | <tr class="separator:a76ac02e1f05a26f67090c9464434e04a"><td class="memSeparator" colspan="2"> </td></tr> |
| 149 | </table> |
| 150 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 151 | <a class="anchor" id="a259a59d7a4f247119c457af235827a29"></a> |
| 152 | <div class="memitem"> |
| 153 | <div class="memproto"> |
| 154 | <table class="memname"> |
| 155 | <tr> |
| 156 | <td class="memname">#define MAGNITUDE_OP</td> |
| 157 | <td>(</td> |
| 158 | <td class="paramtype"> </td> |
| 159 | <td class="paramname">x, </td> |
| 160 | </tr> |
| 161 | <tr> |
| 162 | <td class="paramkey"></td> |
| 163 | <td></td> |
| 164 | <td class="paramtype"> </td> |
| 165 | <td class="paramname">y </td> |
| 166 | </tr> |
| 167 | <tr> |
| 168 | <td></td> |
| 169 | <td>)</td> |
| 170 | <td></td><td>   <a class="el" href="magnitude__phase_8cl.xhtml#aedc7e5ee4cb8f5a0240e422f9a9e7ce9">magnitude_l1</a>((x), (y))</td> |
| 171 | </tr> |
| 172 | </table> |
| 173 | </div><div class="memdoc"> |
| 174 | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 175 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 176 | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 177 | <p>Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 178 | |
| 179 | </div> |
| 180 | </div> |
| 181 | <a class="anchor" id="a4434551334149479f843f87424bbb8c8"></a> |
| 182 | <div class="memitem"> |
| 183 | <div class="memproto"> |
| 184 | <table class="memname"> |
| 185 | <tr> |
| 186 | <td class="memname">#define PHASE_OP</td> |
| 187 | <td>(</td> |
| 188 | <td class="paramtype"> </td> |
| 189 | <td class="paramname">x, </td> |
| 190 | </tr> |
| 191 | <tr> |
| 192 | <td class="paramkey"></td> |
| 193 | <td></td> |
| 194 | <td class="paramtype"> </td> |
| 195 | <td class="paramname">y </td> |
| 196 | </tr> |
| 197 | <tr> |
| 198 | <td></td> |
| 199 | <td>)</td> |
| 200 | <td></td><td>   <a class="el" href="magnitude__phase_8cl.xhtml#ab0d7e891c8a09824c46baa2393d6961f">phase_unsigned</a>((x), (y))</td> |
| 201 | </tr> |
| 202 | </table> |
| 203 | </div><div class="memdoc"> |
| 204 | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 205 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 206 | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 207 | <p>Referenced by <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 208 | |
| 209 | </div> |
| 210 | </div> |
| 211 | <h2 class="groupheader">Function Documentation</h2> |
| 212 | <a class="anchor" id="aedc7e5ee4cb8f5a0240e422f9a9e7ce9"></a> |
| 213 | <div class="memitem"> |
| 214 | <div class="memproto"> |
| 215 | <table class="mlabels"> |
| 216 | <tr> |
| 217 | <td class="mlabels-left"> |
| 218 | <table class="memname"> |
| 219 | <tr> |
| 220 | <td class="memname">DATA_TYPE16 magnitude_l1 </td> |
| 221 | <td>(</td> |
| 222 | <td class="paramtype">DATA_TYPE16 </td> |
| 223 | <td class="paramname"><em>a</em>, </td> |
| 224 | </tr> |
| 225 | <tr> |
| 226 | <td class="paramkey"></td> |
| 227 | <td></td> |
| 228 | <td class="paramtype">DATA_TYPE16 </td> |
| 229 | <td class="paramname"><em>b</em> </td> |
| 230 | </tr> |
| 231 | <tr> |
| 232 | <td></td> |
| 233 | <td>)</td> |
| 234 | <td></td><td></td> |
| 235 | </tr> |
| 236 | </table> |
| 237 | </td> |
| 238 | <td class="mlabels-right"> |
| 239 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 240 | </tr> |
| 241 | </table> |
| 242 | </div><div class="memdoc"> |
| 243 | |
| 244 | <p>Calculates L1 normalization between two inputs. </p> |
| 245 | <dl class="params"><dt>Parameters</dt><dd> |
| 246 | <table class="params"> |
| 247 | <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr> |
| 248 | <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr> |
| 249 | </table> |
| 250 | </dd> |
| 251 | </dl> |
| 252 | <dl class="section return"><dt>Returns</dt><dd>L1 normalization magnitude result. Supported data types: S16, S32 </dd></dl> |
| 253 | |
| 254 | <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> |
| 255 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 256 | <p>References <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">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> |
| 257 | <div class="fragment"><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div> |
| 258 | <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <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), <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ae115fc750a92fb6a5e094998b56fcc56">abs</a>(b)), <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> |
| 259 | <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> }</div> |
| 260 | <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> |
| 263 | <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< T > abs(fixed_point< T > x)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00914">FixedPoint.h:914</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 264 | </div><!-- fragment --> |
| 265 | </div> |
| 266 | </div> |
| 267 | <a class="anchor" id="aec9387519a61474acb0b2bf90ef6d94d"></a> |
| 268 | <div class="memitem"> |
| 269 | <div class="memproto"> |
| 270 | <table class="mlabels"> |
| 271 | <tr> |
| 272 | <td class="mlabels-left"> |
| 273 | <table class="memname"> |
| 274 | <tr> |
| 275 | <td class="memname">DATA_TYPE16 magnitude_l2 </td> |
| 276 | <td>(</td> |
| 277 | <td class="paramtype">int16 </td> |
| 278 | <td class="paramname"><em>a</em>, </td> |
| 279 | </tr> |
| 280 | <tr> |
| 281 | <td class="paramkey"></td> |
| 282 | <td></td> |
| 283 | <td class="paramtype">int16 </td> |
| 284 | <td class="paramname"><em>b</em> </td> |
| 285 | </tr> |
| 286 | <tr> |
| 287 | <td></td> |
| 288 | <td>)</td> |
| 289 | <td></td><td></td> |
| 290 | </tr> |
| 291 | </table> |
| 292 | </td> |
| 293 | <td class="mlabels-right"> |
| 294 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 295 | </tr> |
| 296 | </table> |
| 297 | </div><div class="memdoc"> |
| 298 | |
| 299 | <p>Calculates L2 normalization between two inputs. </p> |
| 300 | <dl class="params"><dt>Parameters</dt><dd> |
| 301 | <table class="params"> |
| 302 | <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr> |
| 303 | <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr> |
| 304 | </table> |
| 305 | </dd> |
| 306 | </dl> |
| 307 | <dl class="section return"><dt>Returns</dt><dd>L2 normalization magnitude result. Supported data types: S16, S32 </dd></dl> |
| 308 | |
| 309 | <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> |
| 310 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 311 | <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> |
| 312 | <div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div> |
| 313 | <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <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> |
| 314 | <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <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> |
| 315 | <div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div> |
| 316 | <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> |
| 317 | <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> |
| 318 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 319 | </div><!-- fragment --> |
| 320 | </div> |
| 321 | </div> |
| 322 | <a class="anchor" id="a76ac02e1f05a26f67090c9464434e04a"></a> |
| 323 | <div class="memitem"> |
| 324 | <div class="memproto"> |
| 325 | <table class="memname"> |
| 326 | <tr> |
| 327 | <td class="memname">__kernel void magnitude_phase </td> |
| 328 | <td>(</td> |
| 329 | <td class="paramtype">__global uchar * </td> |
| 330 | <td class="paramname"><em>gx_ptr</em>, </td> |
| 331 | </tr> |
| 332 | <tr> |
| 333 | <td class="paramkey"></td> |
| 334 | <td></td> |
| 335 | <td class="paramtype">uint </td> |
| 336 | <td class="paramname"><em>gx_stride_x</em>, </td> |
| 337 | </tr> |
| 338 | <tr> |
| 339 | <td class="paramkey"></td> |
| 340 | <td></td> |
| 341 | <td class="paramtype">uint </td> |
| 342 | <td class="paramname"><em>gx_step_x</em>, </td> |
| 343 | </tr> |
| 344 | <tr> |
| 345 | <td class="paramkey"></td> |
| 346 | <td></td> |
| 347 | <td class="paramtype">uint </td> |
| 348 | <td class="paramname"><em>gx_stride_y</em>, </td> |
| 349 | </tr> |
| 350 | <tr> |
| 351 | <td class="paramkey"></td> |
| 352 | <td></td> |
| 353 | <td class="paramtype">uint </td> |
| 354 | <td class="paramname"><em>gx_step_y</em>, </td> |
| 355 | </tr> |
| 356 | <tr> |
| 357 | <td class="paramkey"></td> |
| 358 | <td></td> |
| 359 | <td class="paramtype">uint </td> |
| 360 | <td class="paramname"><em>gx_offset_first_element_in_bytes</em>, </td> |
| 361 | </tr> |
| 362 | <tr> |
| 363 | <td class="paramkey"></td> |
| 364 | <td></td> |
| 365 | <td class="paramtype">__global uchar * </td> |
| 366 | <td class="paramname"><em>gy_ptr</em>, </td> |
| 367 | </tr> |
| 368 | <tr> |
| 369 | <td class="paramkey"></td> |
| 370 | <td></td> |
| 371 | <td class="paramtype">uint </td> |
| 372 | <td class="paramname"><em>gy_stride_x</em>, </td> |
| 373 | </tr> |
| 374 | <tr> |
| 375 | <td class="paramkey"></td> |
| 376 | <td></td> |
| 377 | <td class="paramtype">uint </td> |
| 378 | <td class="paramname"><em>gy_step_x</em>, </td> |
| 379 | </tr> |
| 380 | <tr> |
| 381 | <td class="paramkey"></td> |
| 382 | <td></td> |
| 383 | <td class="paramtype">uint </td> |
| 384 | <td class="paramname"><em>gy_stride_y</em>, </td> |
| 385 | </tr> |
| 386 | <tr> |
| 387 | <td class="paramkey"></td> |
| 388 | <td></td> |
| 389 | <td class="paramtype">uint </td> |
| 390 | <td class="paramname"><em>gy_step_y</em>, </td> |
| 391 | </tr> |
| 392 | <tr> |
| 393 | <td class="paramkey"></td> |
| 394 | <td></td> |
| 395 | <td class="paramtype">uint </td> |
| 396 | <td class="paramname"><em>gy_offset_first_element_in_bytes</em>, </td> |
| 397 | </tr> |
| 398 | <tr> |
| 399 | <td class="paramkey"></td> |
| 400 | <td></td> |
| 401 | <td class="paramtype">__global uchar * </td> |
| 402 | <td class="paramname"><em>magnitude_ptr</em>, </td> |
| 403 | </tr> |
| 404 | <tr> |
| 405 | <td class="paramkey"></td> |
| 406 | <td></td> |
| 407 | <td class="paramtype">uint </td> |
| 408 | <td class="paramname"><em>magnitude_stride_x</em>, </td> |
| 409 | </tr> |
| 410 | <tr> |
| 411 | <td class="paramkey"></td> |
| 412 | <td></td> |
| 413 | <td class="paramtype">uint </td> |
| 414 | <td class="paramname"><em>magnitude_step_x</em>, </td> |
| 415 | </tr> |
| 416 | <tr> |
| 417 | <td class="paramkey"></td> |
| 418 | <td></td> |
| 419 | <td class="paramtype">uint </td> |
| 420 | <td class="paramname"><em>magnitude_stride_y</em>, </td> |
| 421 | </tr> |
| 422 | <tr> |
| 423 | <td class="paramkey"></td> |
| 424 | <td></td> |
| 425 | <td class="paramtype">uint </td> |
| 426 | <td class="paramname"><em>magnitude_step_y</em>, </td> |
| 427 | </tr> |
| 428 | <tr> |
| 429 | <td class="paramkey"></td> |
| 430 | <td></td> |
| 431 | <td class="paramtype">uint </td> |
| 432 | <td class="paramname"><em>magnitude_offset_first_element_in_bytes</em>, </td> |
| 433 | </tr> |
| 434 | <tr> |
| 435 | <td class="paramkey"></td> |
| 436 | <td></td> |
| 437 | <td class="paramtype">__global uchar * </td> |
| 438 | <td class="paramname"><em>phase_ptr</em>, </td> |
| 439 | </tr> |
| 440 | <tr> |
| 441 | <td class="paramkey"></td> |
| 442 | <td></td> |
| 443 | <td class="paramtype">uint </td> |
| 444 | <td class="paramname"><em>phase_stride_x</em>, </td> |
| 445 | </tr> |
| 446 | <tr> |
| 447 | <td class="paramkey"></td> |
| 448 | <td></td> |
| 449 | <td class="paramtype">uint </td> |
| 450 | <td class="paramname"><em>phase_step_x</em>, </td> |
| 451 | </tr> |
| 452 | <tr> |
| 453 | <td class="paramkey"></td> |
| 454 | <td></td> |
| 455 | <td class="paramtype">uint </td> |
| 456 | <td class="paramname"><em>phase_stride_y</em>, </td> |
| 457 | </tr> |
| 458 | <tr> |
| 459 | <td class="paramkey"></td> |
| 460 | <td></td> |
| 461 | <td class="paramtype">uint </td> |
| 462 | <td class="paramname"><em>phase_step_y</em>, </td> |
| 463 | </tr> |
| 464 | <tr> |
| 465 | <td class="paramkey"></td> |
| 466 | <td></td> |
| 467 | <td class="paramtype">uint </td> |
| 468 | <td class="paramname"><em>phase_offset_first_element_in_bytes</em> </td> |
| 469 | </tr> |
| 470 | <tr> |
| 471 | <td></td> |
| 472 | <td>)</td> |
| 473 | <td></td><td></td> |
| 474 | </tr> |
| 475 | </table> |
| 476 | </div><div class="memdoc"> |
| 477 | |
| 478 | <p>Calculate the magnitude and phase of given the gradients of an image. </p> |
| 479 | <dl class="section note"><dt>Note</dt><dd>Magnitude calculation supported: L1 normalization(type = 1) and L2 normalization(type = 2). </dd> |
| 480 | <dd> |
| 481 | Phase calculation supported: Unsigned(type = 1) [0,128] and Signed(type = 2) [0,256).</dd></dl> |
| 482 | <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> |
| 483 | <dd> |
| 484 | To enable magnitude calculation -DMAGNITUDE="magnitude_calculation_type_id" must be provided at compile time. eg -DMAGNITUDE=1 </dd> |
| 485 | <dd> |
| 486 | Datatype 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> |
| 487 | <dl class="params"><dt>Parameters</dt><dd> |
| 488 | <table class="params"> |
| 489 | <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> |
| 490 | <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> |
| 491 | <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> |
| 492 | <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> |
| 493 | <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> |
| 494 | <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> |
| 495 | <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> |
| 496 | <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> |
| 497 | <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> |
| 498 | <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> |
| 499 | <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> |
| 500 | <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> |
| 501 | <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> |
| 502 | <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> |
| 503 | <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> |
| 504 | <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> |
| 505 | <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> |
| 506 | <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> |
| 507 | <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> |
| 508 | <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> |
| 509 | <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> |
| 510 | <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> |
| 511 | <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> |
| 512 | <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> |
| 513 | </table> |
| 514 | </dd> |
| 515 | </dl> |
| 516 | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 517 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 518 | |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 519 | <p>References <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00081">MAGNITUDE_OP</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00089">PHASE_OP</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 520 | <div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> {</div> |
| 521 | <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="comment">// Get pixels pointer</span></div> |
| 522 | <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <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> |
| 523 | <div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <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> |
| 524 | <div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div> |
| 525 | <div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// Load values</span></div> |
| 526 | <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <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> |
| 527 | <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  in_a = vload16(0, (__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)gx.ptr);</div> |
| 528 | <div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <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> |
| 529 | <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  in_b = vload16(0, (__global DATA_TYPE *)gy.ptr);</div> |
| 530 | <div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div> |
| 531 | <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">// Calculate and store the results</span></div> |
| 532 | <div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="preprocessor">#ifdef MAGNITUDE</span></div> |
| 533 | <div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="preprocessor"></span> <a class="code" href="struct_image.xhtml">Image</a> magnitude = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(magnitude);</div> |
| 534 | <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  vstore16(<a class="code" href="magnitude__phase_8cl.xhtml#a259a59d7a4f247119c457af235827a29">MAGNITUDE_OP</a>(in_a, in_b), 0, (__global DATA_TYPE *)magnitude.ptr);</div> |
| 535 | <div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="preprocessor">#endif </span><span class="comment">/* MAGNITUDE */</span><span class="preprocessor"></span></div> |
| 536 | <div class="line"><a name="l00158"></a><span class="lineno"> 158</span> <span class="preprocessor"></span><span class="preprocessor">#ifdef PHASE</span></div> |
| 537 | <div class="line"><a name="l00159"></a><span class="lineno"> 159</span> <span class="preprocessor"></span> <a class="code" href="struct_image.xhtml">Image</a> phase = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(phase);</div> |
| 538 | <div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  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> |
| 539 | <div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="preprocessor">#endif </span><span class="comment">/* PHASE */</span><span class="preprocessor"></span></div> |
| 540 | <div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="preprocessor"></span>}</div> |
| 541 | <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> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 542 | <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#l00096">helpers.h:96</a></div></div> |
| 543 | <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#l00134">helpers.h:134</a></div></div> |
| 544 | <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#l00136">helpers.h:136</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 545 | <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 Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 546 | <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> |
| 547 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 548 | </div><!-- fragment --> |
| 549 | </div> |
| 550 | </div> |
| 551 | <a class="anchor" id="a02ff978b574e44604d625dbd470ab870"></a> |
| 552 | <div class="memitem"> |
| 553 | <div class="memproto"> |
| 554 | <table class="mlabels"> |
| 555 | <tr> |
| 556 | <td class="mlabels-left"> |
| 557 | <table class="memname"> |
| 558 | <tr> |
| 559 | <td class="memname">uchar16 phase_signed </td> |
| 560 | <td>(</td> |
| 561 | <td class="paramtype">DATA_TYPE16 </td> |
| 562 | <td class="paramname"><em>a</em>, </td> |
| 563 | </tr> |
| 564 | <tr> |
| 565 | <td class="paramkey"></td> |
| 566 | <td></td> |
| 567 | <td class="paramtype">DATA_TYPE16 </td> |
| 568 | <td class="paramname"><em>b</em> </td> |
| 569 | </tr> |
| 570 | <tr> |
| 571 | <td></td> |
| 572 | <td>)</td> |
| 573 | <td></td><td></td> |
| 574 | </tr> |
| 575 | </table> |
| 576 | </td> |
| 577 | <td class="mlabels-right"> |
| 578 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 579 | </tr> |
| 580 | </table> |
| 581 | </div><div class="memdoc"> |
| 582 | |
| 583 | <p>Calculates signed phase between two inputs. </p> |
| 584 | <dl class="params"><dt>Parameters</dt><dd> |
| 585 | <table class="params"> |
| 586 | <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr> |
| 587 | <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr> |
| 588 | </table> |
| 589 | </dd> |
| 590 | </dl> |
| 591 | <dl class="section return"><dt>Returns</dt><dd>Signed phase mapped in the interval [0, 256). Supported data types: U8 </dd></dl> |
| 592 | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 593 | <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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 594 | <div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> {</div> |
| 595 | <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  float16 arct = atan2pi(convert_float16(b), convert_float16(a));</div> |
| 596 | <div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  arct = select(arct, arct + 2, arct < 0.0f);</div> |
| 597 | <div class="line"><a name="l00076"></a><span class="lineno"> 76</span> </div> |
| 598 | <div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">return</span> convert_uchar16(convert_int16(mad(arct, 128, 0.5f)) & 0xFFu);</div> |
| 599 | <div class="line"><a name="l00078"></a><span class="lineno"> 78</span> }</div> |
| 600 | </div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 601 | </div> |
| 602 | </div> |
| 603 | <a class="anchor" id="ab0d7e891c8a09824c46baa2393d6961f"></a> |
| 604 | <div class="memitem"> |
| 605 | <div class="memproto"> |
| 606 | <table class="mlabels"> |
| 607 | <tr> |
| 608 | <td class="mlabels-left"> |
| 609 | <table class="memname"> |
| 610 | <tr> |
| 611 | <td class="memname">uchar16 phase_unsigned </td> |
| 612 | <td>(</td> |
| 613 | <td class="paramtype">DATA_TYPE16 </td> |
| 614 | <td class="paramname"><em>a</em>, </td> |
| 615 | </tr> |
| 616 | <tr> |
| 617 | <td class="paramkey"></td> |
| 618 | <td></td> |
| 619 | <td class="paramtype">DATA_TYPE16 </td> |
| 620 | <td class="paramname"><em>b</em> </td> |
| 621 | </tr> |
| 622 | <tr> |
| 623 | <td></td> |
| 624 | <td>)</td> |
| 625 | <td></td><td></td> |
| 626 | </tr> |
| 627 | </table> |
| 628 | </td> |
| 629 | <td class="mlabels-right"> |
| 630 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 631 | </tr> |
| 632 | </table> |
| 633 | </div><div class="memdoc"> |
| 634 | |
| 635 | <p>Calculates unsigned phase between two inputs. </p> |
| 636 | <dl class="params"><dt>Parameters</dt><dd> |
| 637 | <table class="params"> |
| 638 | <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input. Supported data types: S16, S32 </td></tr> |
| 639 | <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input. Supported data types: S16, S32</td></tr> |
| 640 | </table> |
| 641 | </dd> |
| 642 | </dl> |
| 643 | <dl class="section return"><dt>Returns</dt><dd>Unsigned phase mapped in the interval [0, 180]. Supported data types: U8 </dd></dl> |
| 644 | |
| 645 | <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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 646 | <div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> {</div> |
| 647 | <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  float16 angle_deg_f32 = atan2pi(convert_float16(b), convert_float16(a)) * (float16)180.0f;</div> |
| 648 | <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  angle_deg_f32 = select(angle_deg_f32, (float16)180.0f + angle_deg_f32, angle_deg_f32 < (float16)0.0f);</div> |
| 649 | <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keywordflow">return</span> convert_uchar16(angle_deg_f32);</div> |
| 650 | <div class="line"><a name="l00063"></a><span class="lineno"> 63</span> }</div> |
| 651 | </div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 652 | </div> |
| 653 | </div> |
| 654 | </div><!-- contents --> |
| 655 | </div><!-- doc-content --> |
| 656 | <!-- start footer part --> |
| 657 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 658 | <ul> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 659 | <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="magnitude__phase_8cl.xhtml">magnitude_phase.cl</a></li> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 660 | <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 661 | <a href="http://www.doxygen.org/index.html"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 662 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 663 | </ul> |
| 664 | </div> |
| 665 | </body> |
| 666 | </html> |