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">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7 <meta name="generator" content="Doxygen 1.8.11"/>
8 <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9 <title>Compute Library: src/core/CL/cl_kernels/sobel_filter.cl File Reference</title>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="dynsections.js"></script>
13 <link href="navtree.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="resize.js"></script>
15 <script type="text/javascript" src="navtreedata.js"></script>
16 <script type="text/javascript" src="navtree.js"></script>
17 <script type="text/javascript">
18 $(document).ready(initResizable);
19 $(window).load(resizeHeight);
21 <link href="search/search.css" rel="stylesheet" type="text/css"/>
22 <script type="text/javascript" src="search/searchdata.js"></script>
23 <script type="text/javascript" src="search/search.js"></script>
24 <script type="text/javascript">
25 $(document).ready(function() { init_search(); });
27 <script type="text/x-mathjax-config">
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
32 </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
33 <link href="doxygen.css" rel="stylesheet" type="text/css" />
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
42 <div id="projectname">Compute Library
43  <span id="projectnumber">18.02</span>
50 <!-- end header part -->
51 <!-- Generated by Doxygen 1.8.11 -->
52 <script type="text/javascript">
53 var searchBox = new SearchBox("searchBox", "search",false,'Search');
55 <div id="navrow1" class="tabs">
57 <li><a href="index.xhtml"><span>Main Page</span></a></li>
58 <li><a href="pages.xhtml"><span>Related Pages</span></a></li>
59 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
61 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
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>
80 <div id="navrow2" class="tabs2">
82 <li><a href="files.xhtml"><span>File List</span></a></li>
83 <li><a href="globals.xhtml"><span>Globals</span></a></li>
87 <div id="side-nav" class="ui-resizable side-nav-resizable">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
97 <script type="text/javascript">
98 $(document).ready(function(){initNavTree('sobel__filter_8cl.xhtml','');});
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)">
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">
116 <div class="summary">
117 <a href="#define-members">Macros</a> |
118 <a href="#func-members">Functions</a> </div>
119 <div class="headertitle">
120 <div class="title">sobel_filter.cl File Reference</div> </div>
122 <div class="contents">
123 <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br />
125 <p><a href="sobel__filter_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>
128 Macros</h2></td></tr>
129 <tr class="memitem:a8476f4a8de2c191433342c9ce896986a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a8476f4a8de2c191433342c9ce896986a">X0</a>   -1</td></tr>
130 <tr class="separator:a8476f4a8de2c191433342c9ce896986a"><td class="memSeparator" colspan="2"> </td></tr>
131 <tr class="memitem:a1964818ccd90a6173ea48cecb652feeb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a1964818ccd90a6173ea48cecb652feeb">X1</a>   -4</td></tr>
132 <tr class="separator:a1964818ccd90a6173ea48cecb652feeb"><td class="memSeparator" colspan="2"> </td></tr>
133 <tr class="memitem:a79ae03a0214cb30e57b9e8835f2a0019"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a79ae03a0214cb30e57b9e8835f2a0019">X2</a>   -5</td></tr>
134 <tr class="separator:a79ae03a0214cb30e57b9e8835f2a0019"><td class="memSeparator" colspan="2"> </td></tr>
135 <tr class="memitem:adb6fd3d004959525c6a684b82ef50860"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#adb6fd3d004959525c6a684b82ef50860">X3</a>   0</td></tr>
136 <tr class="separator:adb6fd3d004959525c6a684b82ef50860"><td class="memSeparator" colspan="2"> </td></tr>
137 <tr class="memitem:a0f79fa7387c308a89a30682d905aa40a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a0f79fa7387c308a89a30682d905aa40a">X4</a>   5</td></tr>
138 <tr class="separator:a0f79fa7387c308a89a30682d905aa40a"><td class="memSeparator" colspan="2"> </td></tr>
139 <tr class="memitem:a921884524c9038883b25f03d3bd1b078"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a921884524c9038883b25f03d3bd1b078">X5</a>   4</td></tr>
140 <tr class="separator:a921884524c9038883b25f03d3bd1b078"><td class="memSeparator" colspan="2"> </td></tr>
141 <tr class="memitem:a0e11bba5150b8ae2a8831f6f4532e352"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a0e11bba5150b8ae2a8831f6f4532e352">X6</a>   1</td></tr>
142 <tr class="separator:a0e11bba5150b8ae2a8831f6f4532e352"><td class="memSeparator" colspan="2"> </td></tr>
143 <tr class="memitem:a0b0dcdd1ffa302474e907d3d7ad9dbfe"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a0b0dcdd1ffa302474e907d3d7ad9dbfe">Y0</a>   1</td></tr>
144 <tr class="separator:a0b0dcdd1ffa302474e907d3d7ad9dbfe"><td class="memSeparator" colspan="2"> </td></tr>
145 <tr class="memitem:a294189cdea31dda8faf609b9b3e2000a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a294189cdea31dda8faf609b9b3e2000a">Y1</a>   6</td></tr>
146 <tr class="separator:a294189cdea31dda8faf609b9b3e2000a"><td class="memSeparator" colspan="2"> </td></tr>
147 <tr class="memitem:a3128cc29e366777d66d8b049451ca8a0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a3128cc29e366777d66d8b049451ca8a0">Y2</a>   15</td></tr>
148 <tr class="separator:a3128cc29e366777d66d8b049451ca8a0"><td class="memSeparator" colspan="2"> </td></tr>
149 <tr class="memitem:a676acf01638364a90adf5d09d2a215bf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a676acf01638364a90adf5d09d2a215bf">Y3</a>   20</td></tr>
150 <tr class="separator:a676acf01638364a90adf5d09d2a215bf"><td class="memSeparator" colspan="2"> </td></tr>
151 <tr class="memitem:a5a8e903c2373c4d65724c79cdea8b3d9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a5a8e903c2373c4d65724c79cdea8b3d9">Y4</a>   15</td></tr>
152 <tr class="separator:a5a8e903c2373c4d65724c79cdea8b3d9"><td class="memSeparator" colspan="2"> </td></tr>
153 <tr class="memitem:a770267173956bf918cf3ca1247b6de12"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a770267173956bf918cf3ca1247b6de12">Y5</a>   6</td></tr>
154 <tr class="separator:a770267173956bf918cf3ca1247b6de12"><td class="memSeparator" colspan="2"> </td></tr>
155 <tr class="memitem:abcdba0de8723fe6f2d2eb284d7e98a41"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#abcdba0de8723fe6f2d2eb284d7e98a41">Y6</a>   1</td></tr>
156 <tr class="separator:abcdba0de8723fe6f2d2eb284d7e98a41"><td class="memSeparator" colspan="2"> </td></tr>
157 <tr class="memitem:ad40297671e8a51899c6114386492006b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">SOBEL1x1_HOR</a>(src, gx, gy, idx)</td></tr>
158 <tr class="separator:ad40297671e8a51899c6114386492006b"><td class="memSeparator" colspan="2"> </td></tr>
159 <tr class="memitem:a400b86850d6a242a7f48804a097c6403"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">SOBEL1x1_VERT</a>(src, g, direction, idx)</td></tr>
160 <tr class="separator:a400b86850d6a242a7f48804a097c6403"><td class="memSeparator" colspan="2"> </td></tr>
161 <tr class="memitem:a7f602251e0a1f8710f8aab3aef09a36b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a7f602251e0a1f8710f8aab3aef09a36b">SOBEL1x7</a>(ptr, gx, gy)</td></tr>
162 <tr class="separator:a7f602251e0a1f8710f8aab3aef09a36b"><td class="memSeparator" colspan="2"> </td></tr>
163 <tr class="memitem:a59f291bf2b268f9b850fa81a3fbf776a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a59f291bf2b268f9b850fa81a3fbf776a">SOBEL7x1</a>(ptr, g, direction)</td></tr>
164 <tr class="separator:a59f291bf2b268f9b850fa81a3fbf776a"><td class="memSeparator" colspan="2"> </td></tr>
165 </table><table class="memberdecls">
166 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
167 Functions</h2></td></tr>
168 <tr class="memitem:ad48e3b9dda20b039199eaea842350975"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#ad48e3b9dda20b039199eaea842350975">sobel3x3</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_gx_ptr, uint dst_gx_stride_x, uint dst_gx_step_x, uint dst_gx_stride_y, uint dst_gx_step_y, uint dst_gx_offset_first_element_in_bytes, __global uchar *dst_gy_ptr, uint dst_gy_stride_x, uint dst_gy_step_x, uint dst_gy_stride_y, uint dst_gy_step_y, uint dst_gy_offset_first_element_in_bytes)</td></tr>
169 <tr class="memdesc:ad48e3b9dda20b039199eaea842350975"><td class="mdescLeft"> </td><td class="mdescRight">This OpenCL kernel that computes a Sobel3x3 filter. <a href="#ad48e3b9dda20b039199eaea842350975">More...</a><br /></td></tr>
170 <tr class="separator:ad48e3b9dda20b039199eaea842350975"><td class="memSeparator" colspan="2"> </td></tr>
171 <tr class="memitem:a4fac2cb52458aa4666af5b521d2a3910"><td class="memItemLeft" align="right" valign="top">short16 </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a4fac2cb52458aa4666af5b521d2a3910">sobel1x5</a> (<a class="el" href="struct_image.xhtml">Image</a> *src, const short left1_coeff_gx, const short left2_coeff_gx, const short middle_coeff_gx, const short right1_coeff_gx, const short right2_coeff_gx, const short left1_coeff_gy, const short left2_coeff_gy, const short middle_coeff_gy, const short right1_coeff_gy, const short right2_coeff_gy)</td></tr>
172 <tr class="memdesc:a4fac2cb52458aa4666af5b521d2a3910"><td class="mdescLeft"> </td><td class="mdescRight">Compute a 1D horizontal sobel filter 1x5 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#a4fac2cb52458aa4666af5b521d2a3910">More...</a><br /></td></tr>
173 <tr class="separator:a4fac2cb52458aa4666af5b521d2a3910"><td class="memSeparator" colspan="2"> </td></tr>
174 <tr class="memitem:a1cfe58175749124762fe0dea315d3c21"><td class="memItemLeft" align="right" valign="top">short8 </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a1cfe58175749124762fe0dea315d3c21">sobel5x1</a> (<a class="el" href="struct_image.xhtml">Image</a> *src, const short up1_coeff, const short up2_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff)</td></tr>
175 <tr class="memdesc:a1cfe58175749124762fe0dea315d3c21"><td class="mdescLeft"> </td><td class="mdescRight">Compute a 1D vertical sobel filter 5x1 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#a1cfe58175749124762fe0dea315d3c21">More...</a><br /></td></tr>
176 <tr class="separator:a1cfe58175749124762fe0dea315d3c21"><td class="memSeparator" colspan="2"> </td></tr>
177 <tr class="memitem:a7a74e414f0e90638939a7a0506576625"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a7a74e414f0e90638939a7a0506576625">sobel_separable1x5</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_gx_ptr, uint dst_gx_stride_x, uint dst_gx_step_x, uint dst_gx_stride_y, uint dst_gx_step_y, uint dst_gx_offset_first_element_in_bytes, __global uchar *dst_gy_ptr, uint dst_gy_stride_x, uint dst_gy_step_x, uint dst_gy_stride_y, uint dst_gy_step_y, uint dst_gy_offset_first_element_in_bytes)</td></tr>
178 <tr class="memdesc:a7a74e414f0e90638939a7a0506576625"><td class="mdescLeft"> </td><td class="mdescRight">Apply a 1x5 sobel matrix to a single channel U8 input image and output two temporary channel S16 images. <a href="#a7a74e414f0e90638939a7a0506576625">More...</a><br /></td></tr>
179 <tr class="separator:a7a74e414f0e90638939a7a0506576625"><td class="memSeparator" colspan="2"> </td></tr>
180 <tr class="memitem:a2cc1fcdd12f2c3cdd31b83fd59597e40"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a2cc1fcdd12f2c3cdd31b83fd59597e40">sobel_separable5x1</a> (__global uchar *src_x_ptr, uint src_x_stride_x, uint src_x_step_x, uint src_x_stride_y, uint src_x_step_y, uint src_x_offset_first_element_in_bytes, __global uchar *dst_gx_ptr, uint dst_gx_stride_x, uint dst_gx_step_x, uint dst_gx_stride_y, uint dst_gx_step_y, uint dst_gx_offset_first_element_in_bytes, __global uchar *src_y_ptr, uint src_y_stride_x, uint src_y_step_x, uint src_y_stride_y, uint src_y_step_y, uint src_y_offset_first_element_in_bytes, __global uchar *dst_gy_ptr, uint dst_gy_stride_x, uint dst_gy_step_x, uint dst_gy_stride_y, uint dst_gy_step_y, uint dst_gy_offset_first_element_in_bytes, int dummy)</td></tr>
181 <tr class="memdesc:a2cc1fcdd12f2c3cdd31b83fd59597e40"><td class="mdescLeft"> </td><td class="mdescRight">Apply a 5x1 convolution matrix to two single channel S16 input temporary images and output two single channel S16 images. <a href="#a2cc1fcdd12f2c3cdd31b83fd59597e40">More...</a><br /></td></tr>
182 <tr class="separator:a2cc1fcdd12f2c3cdd31b83fd59597e40"><td class="memSeparator" colspan="2"> </td></tr>
183 <tr class="memitem:ad8be5e69836ab70ac229279a7d7edaf7"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#ad8be5e69836ab70ac229279a7d7edaf7">sobel_separable1x7</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_gx_ptr, uint dst_gx_stride_x, uint dst_gx_step_x, uint dst_gx_stride_y, uint dst_gx_step_y, uint dst_gx_offset_first_element_in_bytes, __global uchar *dst_gy_ptr, uint dst_gy_stride_x, uint dst_gy_step_x, uint dst_gy_stride_y, uint dst_gy_step_y, uint dst_gy_offset_first_element_in_bytes)</td></tr>
184 <tr class="memdesc:ad8be5e69836ab70ac229279a7d7edaf7"><td class="mdescLeft"> </td><td class="mdescRight">Apply a 1x7 sobel matrix to a single channel U8 input image and output two temporary channel S16 images and leave the borders undefined. <a href="#ad8be5e69836ab70ac229279a7d7edaf7">More...</a><br /></td></tr>
185 <tr class="separator:ad8be5e69836ab70ac229279a7d7edaf7"><td class="memSeparator" colspan="2"> </td></tr>
186 <tr class="memitem:a8cdc6e6df9d40cec1e857917d14ee75f"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="sobel__filter_8cl.xhtml#a8cdc6e6df9d40cec1e857917d14ee75f">sobel_separable7x1</a> (__global uchar *src_x_ptr, uint src_x_stride_x, uint src_x_step_x, uint src_x_stride_y, uint src_x_step_y, uint src_x_offset_first_element_in_bytes, __global uchar *dst_gx_ptr, uint dst_gx_stride_x, uint dst_gx_step_x, uint dst_gx_stride_y, uint dst_gx_step_y, uint dst_gx_offset_first_element_in_bytes, __global uchar *src_y_ptr, uint src_y_stride_x, uint src_y_step_x, uint src_y_stride_y, uint src_y_step_y, uint src_y_offset_first_element_in_bytes, __global uchar *dst_gy_ptr, uint dst_gy_stride_x, uint dst_gy_step_x, uint dst_gy_stride_y, uint dst_gy_step_y, uint dst_gy_offset_first_element_in_bytes, int dummy)</td></tr>
187 <tr class="memdesc:a8cdc6e6df9d40cec1e857917d14ee75f"><td class="mdescLeft"> </td><td class="mdescRight">Apply a 7x1 convolution matrix to two single channel S16 input temporary images and output two single channel S16 images and leave the borders undefined. <a href="#a8cdc6e6df9d40cec1e857917d14ee75f">More...</a><br /></td></tr>
188 <tr class="separator:a8cdc6e6df9d40cec1e857917d14ee75f"><td class="memSeparator" colspan="2"> </td></tr>
190 <h2 class="groupheader">Macro Definition Documentation</h2>
191 <a class="anchor" id="ad40297671e8a51899c6114386492006b"></a>
192 <div class="memitem">
193 <div class="memproto">
194 <table class="memname">
196 <td class="memname">#define SOBEL1x1_HOR</td>
198 <td class="paramtype"> </td>
199 <td class="paramname">src, </td>
202 <td class="paramkey"></td>
204 <td class="paramtype"> </td>
205 <td class="paramname">gx, </td>
208 <td class="paramkey"></td>
210 <td class="paramtype"> </td>
211 <td class="paramname">gy, </td>
214 <td class="paramkey"></td>
216 <td class="paramtype"> </td>
217 <td class="paramname">idx </td>
225 </div><div class="memdoc">
226 <b>Value:</b><div class="fragment"><div class="line">{ \</div><div class="line"> int8 val = convert_int8(vload8(0, <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>, idx - 3, 0))); \</div><div class="line"> gx += val * X##idx; \</div><div class="line"> gy += val * <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa57cec4137b614c87cb4e24a3d003a3e0">Y</a>##idx; \</div><div class="line"> }</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
227 <div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa57cec4137b614c87cb4e24a3d003a3e0"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa57cec4137b614c87cb4e24a3d003a3e0">arm_compute::Channel::Y</a></div><div class="ttdoc">Luma channel. </div></div>
228 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
229 </div><!-- fragment -->
230 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00384">384</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
234 <a class="anchor" id="a400b86850d6a242a7f48804a097c6403"></a>
235 <div class="memitem">
236 <div class="memproto">
237 <table class="memname">
239 <td class="memname">#define SOBEL1x1_VERT</td>
241 <td class="paramtype"> </td>
242 <td class="paramname">src, </td>
245 <td class="paramkey"></td>
247 <td class="paramtype"> </td>
248 <td class="paramname">g, </td>
251 <td class="paramkey"></td>
253 <td class="paramtype"> </td>
254 <td class="paramname">direction, </td>
257 <td class="paramkey"></td>
259 <td class="paramtype"> </td>
260 <td class="paramname">idx </td>
268 </div><div class="memdoc">
269 <b>Value:</b><div class="fragment"><div class="line">{ \</div><div class="line"> int8 val = vload8(0, (__global <span class="keywordtype">int</span> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>, 0, idx - 3)); \</div><div class="line"> g += val * (int8)direction##idx; \</div><div class="line"> }</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
270 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
271 </div><!-- fragment -->
272 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00392">392</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
276 <a class="anchor" id="a7f602251e0a1f8710f8aab3aef09a36b"></a>
277 <div class="memitem">
278 <div class="memproto">
279 <table class="memname">
281 <td class="memname">#define SOBEL1x7</td>
283 <td class="paramtype"> </td>
284 <td class="paramname">ptr, </td>
287 <td class="paramkey"></td>
289 <td class="paramtype"> </td>
290 <td class="paramname">gx, </td>
293 <td class="paramkey"></td>
295 <td class="paramtype"> </td>
296 <td class="paramname">gy </td>
304 </div><div class="memdoc">
305 <b>Value:</b><div class="fragment"><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">SOBEL1x1_HOR</a>(ptr, gx, gy, 0) <a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b"> SOBEL1x1_HOR</a>(ptr, gx, gy, 1) <a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b"> SOBEL1x1_HOR</a>(ptr, gx, gy, 2) <a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b"> SOBEL1x1_HOR</a>(ptr, gx, gy, 3) <a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b"> SOBEL1x1_HOR</a>(ptr, gx, gy, 4) <a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b"> SOBEL1x1_HOR</a>(ptr, gx, gy, 5) <a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b"> SOBEL1x1_HOR</a>(ptr, gx, gy, 6)</div><div class="ttc" id="sobel__filter_8cl_xhtml_ad40297671e8a51899c6114386492006b"><div class="ttname"><a href="sobel__filter_8cl.xhtml#ad40297671e8a51899c6114386492006b">SOBEL1x1_HOR</a></div><div class="ttdeci">#define SOBEL1x1_HOR(src, gx, gy, idx)</div><div class="ttdef"><b>Definition:</b> <a href="sobel__filter_8cl_source.xhtml#l00384">sobel_filter.cl:384</a></div></div>
306 </div><!-- fragment -->
307 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00399">399</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
309 <p>Referenced by <a class="el" href="sobel__filter_8cl_source.xhtml#l00442">sobel_separable1x7()</a>.</p>
313 <a class="anchor" id="a59f291bf2b268f9b850fa81a3fbf776a"></a>
314 <div class="memitem">
315 <div class="memproto">
316 <table class="memname">
318 <td class="memname">#define SOBEL7x1</td>
320 <td class="paramtype"> </td>
321 <td class="paramname">ptr, </td>
324 <td class="paramkey"></td>
326 <td class="paramtype"> </td>
327 <td class="paramname">g, </td>
330 <td class="paramkey"></td>
332 <td class="paramtype"> </td>
333 <td class="paramname">direction </td>
341 </div><div class="memdoc">
342 <b>Value:</b><div class="fragment"><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">SOBEL1x1_VERT</a>(ptr, g, direction, 0) <a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403"> SOBEL1x1_VERT</a>(ptr, g, direction, 1) <a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403"> SOBEL1x1_VERT</a>(ptr, g, direction, 2) <a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403"> SOBEL1x1_VERT</a>(ptr, g, direction, 3) <a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403"> SOBEL1x1_VERT</a>(ptr, g, direction, 4) <a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403"> SOBEL1x1_VERT</a>(ptr, g, direction, 5) <a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">\</a></div><div class="line"><a class="code" href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403"> SOBEL1x1_VERT</a>(ptr, g, direction, 6)</div><div class="ttc" id="sobel__filter_8cl_xhtml_a400b86850d6a242a7f48804a097c6403"><div class="ttname"><a href="sobel__filter_8cl.xhtml#a400b86850d6a242a7f48804a097c6403">SOBEL1x1_VERT</a></div><div class="ttdeci">#define SOBEL1x1_VERT(src, g, direction, idx)</div><div class="ttdef"><b>Definition:</b> <a href="sobel__filter_8cl_source.xhtml#l00392">sobel_filter.cl:392</a></div></div>
343 </div><!-- fragment -->
344 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00409">409</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
346 <p>Referenced by <a class="el" href="sobel__filter_8cl_source.xhtml#l00506">sobel_separable7x1()</a>.</p>
350 <a class="anchor" id="a8476f4a8de2c191433342c9ce896986a"></a>
351 <div class="memitem">
352 <div class="memproto">
353 <table class="memname">
355 <td class="memname">#define X0   -1</td>
358 </div><div class="memdoc">
360 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00366">366</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
364 <a class="anchor" id="a1964818ccd90a6173ea48cecb652feeb"></a>
365 <div class="memitem">
366 <div class="memproto">
367 <table class="memname">
369 <td class="memname">#define X1   -4</td>
372 </div><div class="memdoc">
374 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00367">367</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
378 <a class="anchor" id="a79ae03a0214cb30e57b9e8835f2a0019"></a>
379 <div class="memitem">
380 <div class="memproto">
381 <table class="memname">
383 <td class="memname">#define X2   -5</td>
386 </div><div class="memdoc">
388 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00368">368</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
392 <a class="anchor" id="adb6fd3d004959525c6a684b82ef50860"></a>
393 <div class="memitem">
394 <div class="memproto">
395 <table class="memname">
397 <td class="memname">#define X3   0</td>
400 </div><div class="memdoc">
402 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00369">369</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
406 <a class="anchor" id="a0f79fa7387c308a89a30682d905aa40a"></a>
407 <div class="memitem">
408 <div class="memproto">
409 <table class="memname">
411 <td class="memname">#define X4   5</td>
414 </div><div class="memdoc">
416 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00370">370</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
420 <a class="anchor" id="a921884524c9038883b25f03d3bd1b078"></a>
421 <div class="memitem">
422 <div class="memproto">
423 <table class="memname">
425 <td class="memname">#define X5   4</td>
428 </div><div class="memdoc">
430 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00371">371</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
434 <a class="anchor" id="a0e11bba5150b8ae2a8831f6f4532e352"></a>
435 <div class="memitem">
436 <div class="memproto">
437 <table class="memname">
439 <td class="memname">#define X6   1</td>
442 </div><div class="memdoc">
444 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00372">372</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
448 <a class="anchor" id="a0b0dcdd1ffa302474e907d3d7ad9dbfe"></a>
449 <div class="memitem">
450 <div class="memproto">
451 <table class="memname">
453 <td class="memname">#define Y0   1</td>
456 </div><div class="memdoc">
458 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00375">375</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
462 <a class="anchor" id="a294189cdea31dda8faf609b9b3e2000a"></a>
463 <div class="memitem">
464 <div class="memproto">
465 <table class="memname">
467 <td class="memname">#define Y1   6</td>
470 </div><div class="memdoc">
472 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00376">376</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
476 <a class="anchor" id="a3128cc29e366777d66d8b049451ca8a0"></a>
477 <div class="memitem">
478 <div class="memproto">
479 <table class="memname">
481 <td class="memname">#define Y2   15</td>
484 </div><div class="memdoc">
486 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00377">377</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
490 <a class="anchor" id="a676acf01638364a90adf5d09d2a215bf"></a>
491 <div class="memitem">
492 <div class="memproto">
493 <table class="memname">
495 <td class="memname">#define Y3   20</td>
498 </div><div class="memdoc">
500 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00378">378</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
504 <a class="anchor" id="a5a8e903c2373c4d65724c79cdea8b3d9"></a>
505 <div class="memitem">
506 <div class="memproto">
507 <table class="memname">
509 <td class="memname">#define Y4   15</td>
512 </div><div class="memdoc">
514 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00379">379</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
518 <a class="anchor" id="a770267173956bf918cf3ca1247b6de12"></a>
519 <div class="memitem">
520 <div class="memproto">
521 <table class="memname">
523 <td class="memname">#define Y5   6</td>
526 </div><div class="memdoc">
528 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00380">380</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
532 <a class="anchor" id="abcdba0de8723fe6f2d2eb284d7e98a41"></a>
533 <div class="memitem">
534 <div class="memproto">
535 <table class="memname">
537 <td class="memname">#define Y6   1</td>
540 </div><div class="memdoc">
542 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00381">381</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
546 <h2 class="groupheader">Function Documentation</h2>
547 <a class="anchor" id="a4fac2cb52458aa4666af5b521d2a3910"></a>
548 <div class="memitem">
549 <div class="memproto">
550 <table class="memname">
552 <td class="memname">short16 sobel1x5 </td>
554 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> * </td>
555 <td class="paramname"><em>src</em>, </td>
558 <td class="paramkey"></td>
560 <td class="paramtype">const short </td>
561 <td class="paramname"><em>left1_coeff_gx</em>, </td>
564 <td class="paramkey"></td>
566 <td class="paramtype">const short </td>
567 <td class="paramname"><em>left2_coeff_gx</em>, </td>
570 <td class="paramkey"></td>
572 <td class="paramtype">const short </td>
573 <td class="paramname"><em>middle_coeff_gx</em>, </td>
576 <td class="paramkey"></td>
578 <td class="paramtype">const short </td>
579 <td class="paramname"><em>right1_coeff_gx</em>, </td>
582 <td class="paramkey"></td>
584 <td class="paramtype">const short </td>
585 <td class="paramname"><em>right2_coeff_gx</em>, </td>
588 <td class="paramkey"></td>
590 <td class="paramtype">const short </td>
591 <td class="paramname"><em>left1_coeff_gy</em>, </td>
594 <td class="paramkey"></td>
596 <td class="paramtype">const short </td>
597 <td class="paramname"><em>left2_coeff_gy</em>, </td>
600 <td class="paramkey"></td>
602 <td class="paramtype">const short </td>
603 <td class="paramname"><em>middle_coeff_gy</em>, </td>
606 <td class="paramkey"></td>
608 <td class="paramtype">const short </td>
609 <td class="paramname"><em>right1_coeff_gy</em>, </td>
612 <td class="paramkey"></td>
614 <td class="paramtype">const short </td>
615 <td class="paramname"><em>right2_coeff_gy</em> </td>
623 </div><div class="memdoc">
625 <p>Compute a 1D horizontal sobel filter 1x5 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
626 <dl class="params"><dt>Parameters</dt><dd>
627 <table class="params">
628 <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to source image. </td></tr>
629 <tr><td class="paramdir">[in]</td><td class="paramname">left1_coeff_gx</td><td>Weight of the most left pixel for gx </td></tr>
630 <tr><td class="paramdir">[in]</td><td class="paramname">left2_coeff_gx</td><td>Weight of the left pixel for gx </td></tr>
631 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff_gx</td><td>Weight of the middle pixel for gx </td></tr>
632 <tr><td class="paramdir">[in]</td><td class="paramname">right1_coeff_gx</td><td>Weight of the right pixel for gx </td></tr>
633 <tr><td class="paramdir">[in]</td><td class="paramname">right2_coeff_gx</td><td>Weight of the most right pixel for gx </td></tr>
634 <tr><td class="paramdir">[in]</td><td class="paramname">left1_coeff_gy</td><td>Weight of the most left pixel for gy </td></tr>
635 <tr><td class="paramdir">[in]</td><td class="paramname">left2_coeff_gy</td><td>Weight of the left pixel for gy </td></tr>
636 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff_gy</td><td>Weight of the middle pixel for gy </td></tr>
637 <tr><td class="paramdir">[in]</td><td class="paramname">right1_coeff_gy</td><td>Weight of the right pixel for gy </td></tr>
638 <tr><td class="paramdir">[in]</td><td class="paramname">right2_coeff_gy</td><td>Weight of the most right pixel for gy</td></tr>
642 <dl class="section return"><dt>Returns</dt><dd>a short16 containing short8 gx and short8 gy values. </dd></dl>
644 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00154">154</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
646 <p>References <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>.</p>
648 <p>Referenced by <a class="el" href="sobel__filter_8cl_source.xhtml#l00259">sobel_separable1x5()</a>.</p>
649 <div class="fragment"><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> {</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  uchar16 temp = vload16(0, <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -2, 0));</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  short8 gx = 0;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  short8 gy = 0;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  short8 val;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  val = convert_short8(temp.s01234567);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  gx += val * (short8)left1_coeff_gx;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  gy += val * (short8)left1_coeff_gy;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  val = convert_short8(temp.s12345678);</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  gx += val * (short8)left2_coeff_gx;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  gy += val * (short8)left2_coeff_gy;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  val = convert_short8(temp.s23456789);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  gx += val * (short8)middle_coeff_gx;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  gy += val * (short8)middle_coeff_gy;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  val = convert_short8(temp.s3456789a);</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  gx += val * (short8)right1_coeff_gx;</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  gy += val * (short8)right1_coeff_gy;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span> </div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  val = convert_short8(temp.s456789ab);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  gx += val * (short8)right2_coeff_gx;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  gy += val * (short8)right2_coeff_gy;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">return</span> (short16)(gx, gy);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> }</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
650 </div><!-- fragment -->
653 <a class="anchor" id="ad48e3b9dda20b039199eaea842350975"></a>
654 <div class="memitem">
655 <div class="memproto">
656 <table class="memname">
658 <td class="memname">__kernel void sobel3x3 </td>
660 <td class="paramtype">__global uchar * </td>
661 <td class="paramname"><em>src_ptr</em>, </td>
664 <td class="paramkey"></td>
666 <td class="paramtype">uint </td>
667 <td class="paramname"><em>src_stride_x</em>, </td>
670 <td class="paramkey"></td>
672 <td class="paramtype">uint </td>
673 <td class="paramname"><em>src_step_x</em>, </td>
676 <td class="paramkey"></td>
678 <td class="paramtype">uint </td>
679 <td class="paramname"><em>src_stride_y</em>, </td>
682 <td class="paramkey"></td>
684 <td class="paramtype">uint </td>
685 <td class="paramname"><em>src_step_y</em>, </td>
688 <td class="paramkey"></td>
690 <td class="paramtype">uint </td>
691 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
694 <td class="paramkey"></td>
696 <td class="paramtype">__global uchar * </td>
697 <td class="paramname"><em>dst_gx_ptr</em>, </td>
700 <td class="paramkey"></td>
702 <td class="paramtype">uint </td>
703 <td class="paramname"><em>dst_gx_stride_x</em>, </td>
706 <td class="paramkey"></td>
708 <td class="paramtype">uint </td>
709 <td class="paramname"><em>dst_gx_step_x</em>, </td>
712 <td class="paramkey"></td>
714 <td class="paramtype">uint </td>
715 <td class="paramname"><em>dst_gx_stride_y</em>, </td>
718 <td class="paramkey"></td>
720 <td class="paramtype">uint </td>
721 <td class="paramname"><em>dst_gx_step_y</em>, </td>
724 <td class="paramkey"></td>
726 <td class="paramtype">uint </td>
727 <td class="paramname"><em>dst_gx_offset_first_element_in_bytes</em>, </td>
730 <td class="paramkey"></td>
732 <td class="paramtype">__global uchar * </td>
733 <td class="paramname"><em>dst_gy_ptr</em>, </td>
736 <td class="paramkey"></td>
738 <td class="paramtype">uint </td>
739 <td class="paramname"><em>dst_gy_stride_x</em>, </td>
742 <td class="paramkey"></td>
744 <td class="paramtype">uint </td>
745 <td class="paramname"><em>dst_gy_step_x</em>, </td>
748 <td class="paramkey"></td>
750 <td class="paramtype">uint </td>
751 <td class="paramname"><em>dst_gy_stride_y</em>, </td>
754 <td class="paramkey"></td>
756 <td class="paramtype">uint </td>
757 <td class="paramname"><em>dst_gy_step_y</em>, </td>
760 <td class="paramkey"></td>
762 <td class="paramtype">uint </td>
763 <td class="paramname"><em>dst_gy_offset_first_element_in_bytes</em> </td>
771 </div><div class="memdoc">
773 <p>This OpenCL kernel that computes a Sobel3x3 filter. </p>
774 <dl class="section attention"><dt>Attention</dt><dd>To enable computation of the X gradient -DGRAD_X must be passed at compile time, while computation of the Y gradient is performed when -DGRAD_Y is used. You can use both when computation of both gradients is required.</dd></dl>
775 <dl class="params"><dt>Parameters</dt><dd>
776 <table class="params">
777 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr>
778 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
779 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
780 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
781 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
782 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
783 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gx_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
784 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
785 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
786 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
787 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
788 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
789 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gy_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
790 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
791 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_x</td><td>dst_gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
792 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
793 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_y</td><td>dst_gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
794 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
799 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00054">54</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
801 <p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
802 <div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gx);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gy);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  <span class="comment">// Output pixels</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  short8 gx = (short8)0;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  short8 gy = (short8)0;</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="comment">// Row0</span></div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  uchar16 temp = vload16(0, <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&src, -1, -1));</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  short8 left = convert_short8(temp.s01234567);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  short8 middle = convert_short8(temp.s12345678);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  short8 right = convert_short8(temp.s23456789);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  gx += left * (short8)(-1);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  gx += right * (short8)(+1);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  gy += left * (short8)(-1);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  gy += middle * (short8)(-2);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  gy += right * (short8)(-1);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">// Row1</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  temp = vload16(0, <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&src, -1, 0));</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  left = convert_short8(temp.s01234567);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  right = convert_short8(temp.s23456789);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  gx += left * (short8)(-2);</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  gx += right * (short8)(+2);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="comment">// Row2</span></div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  temp = vload16(0, <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&src, -1, 1));</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  left = convert_short8(temp.s01234567);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  middle = convert_short8(temp.s12345678);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  right = convert_short8(temp.s23456789);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  gx += left * (short8)(-1);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  gx += right * (short8)(+1);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  gy += left * (short8)(+1);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  gy += middle * (short8)(+2);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  gy += right * (short8)(+1);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="comment">// Store results</span></div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  vstore8(gx, 0, ((__global <span class="keywordtype">short</span> *)dst_gx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  vstore8(gy, 0, ((__global <span class="keywordtype">short</span> *)dst_gy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> }</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
803 <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#l00102">helpers.h:102</a></div></div>
804 <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#l00140">helpers.h:140</a></div></div>
805 <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#l00142">helpers.h:142</a></div></div>
806 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
807 </div><!-- fragment -->
810 <a class="anchor" id="a1cfe58175749124762fe0dea315d3c21"></a>
811 <div class="memitem">
812 <div class="memproto">
813 <table class="memname">
815 <td class="memname">short8 sobel5x1 </td>
817 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> * </td>
818 <td class="paramname"><em>src</em>, </td>
821 <td class="paramkey"></td>
823 <td class="paramtype">const short </td>
824 <td class="paramname"><em>up1_coeff</em>, </td>
827 <td class="paramkey"></td>
829 <td class="paramtype">const short </td>
830 <td class="paramname"><em>up2_coeff</em>, </td>
833 <td class="paramkey"></td>
835 <td class="paramtype">const short </td>
836 <td class="paramname"><em>middle_coeff</em>, </td>
839 <td class="paramkey"></td>
841 <td class="paramtype">const short </td>
842 <td class="paramname"><em>down1_coeff</em>, </td>
845 <td class="paramkey"></td>
847 <td class="paramtype">const short </td>
848 <td class="paramname"><em>down2_coeff</em> </td>
856 </div><div class="memdoc">
858 <p>Compute a 1D vertical sobel filter 5x1 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
859 <dl class="params"><dt>Parameters</dt><dd>
860 <table class="params">
861 <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to source image. </td></tr>
862 <tr><td class="paramdir">[in]</td><td class="paramname">up1_coeff</td><td>Weight of the most up pixel </td></tr>
863 <tr><td class="paramdir">[in]</td><td class="paramname">up2_coeff</td><td>Weight of the up pixel </td></tr>
864 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr>
865 <tr><td class="paramdir">[in]</td><td class="paramname">down1_coeff</td><td>Weight of the down pixel </td></tr>
866 <tr><td class="paramdir">[in]</td><td class="paramname">down2_coeff</td><td>Weight of the most down pixel</td></tr>
870 <dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl>
872 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00206">206</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
874 <p>References <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>.</p>
876 <p>Referenced by <a class="el" href="sobel__filter_8cl_source.xhtml#l00325">sobel_separable5x1()</a>.</p>
877 <div class="fragment"><div class="line"><a name="l00213"></a><span class="lineno"> 213</span> {</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  short8 val;</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  short8 out = (short8)0;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  val = vload8(0, (__global <span class="keywordtype">short</span> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -2));</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  out += val * (short8)up1_coeff;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span> </div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  val = vload8(0, (__global <span class="keywordtype">short</span> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -1));</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  out += val * (short8)up2_coeff;</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span> </div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  val = vload8(0, (__global <span class="keywordtype">short</span> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 0));</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  out += val * (short8)middle_coeff;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  val = vload8(0, (__global <span class="keywordtype">short</span> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 1));</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  out += val * (short8)down1_coeff;</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  val = vload8(0, (__global <span class="keywordtype">short</span> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 2));</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  out += val * (short8)down2_coeff;</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span> </div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">return</span> (short8)(out);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> }</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
878 </div><!-- fragment -->
881 <a class="anchor" id="a7a74e414f0e90638939a7a0506576625"></a>
882 <div class="memitem">
883 <div class="memproto">
884 <table class="memname">
886 <td class="memname">__kernel void sobel_separable1x5 </td>
888 <td class="paramtype">__global uchar * </td>
889 <td class="paramname"><em>src_ptr</em>, </td>
892 <td class="paramkey"></td>
894 <td class="paramtype">uint </td>
895 <td class="paramname"><em>src_stride_x</em>, </td>
898 <td class="paramkey"></td>
900 <td class="paramtype">uint </td>
901 <td class="paramname"><em>src_step_x</em>, </td>
904 <td class="paramkey"></td>
906 <td class="paramtype">uint </td>
907 <td class="paramname"><em>src_stride_y</em>, </td>
910 <td class="paramkey"></td>
912 <td class="paramtype">uint </td>
913 <td class="paramname"><em>src_step_y</em>, </td>
916 <td class="paramkey"></td>
918 <td class="paramtype">uint </td>
919 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
922 <td class="paramkey"></td>
924 <td class="paramtype">__global uchar * </td>
925 <td class="paramname"><em>dst_gx_ptr</em>, </td>
928 <td class="paramkey"></td>
930 <td class="paramtype">uint </td>
931 <td class="paramname"><em>dst_gx_stride_x</em>, </td>
934 <td class="paramkey"></td>
936 <td class="paramtype">uint </td>
937 <td class="paramname"><em>dst_gx_step_x</em>, </td>
940 <td class="paramkey"></td>
942 <td class="paramtype">uint </td>
943 <td class="paramname"><em>dst_gx_stride_y</em>, </td>
946 <td class="paramkey"></td>
948 <td class="paramtype">uint </td>
949 <td class="paramname"><em>dst_gx_step_y</em>, </td>
952 <td class="paramkey"></td>
954 <td class="paramtype">uint </td>
955 <td class="paramname"><em>dst_gx_offset_first_element_in_bytes</em>, </td>
958 <td class="paramkey"></td>
960 <td class="paramtype">__global uchar * </td>
961 <td class="paramname"><em>dst_gy_ptr</em>, </td>
964 <td class="paramkey"></td>
966 <td class="paramtype">uint </td>
967 <td class="paramname"><em>dst_gy_stride_x</em>, </td>
970 <td class="paramkey"></td>
972 <td class="paramtype">uint </td>
973 <td class="paramname"><em>dst_gy_step_x</em>, </td>
976 <td class="paramkey"></td>
978 <td class="paramtype">uint </td>
979 <td class="paramname"><em>dst_gy_stride_y</em>, </td>
982 <td class="paramkey"></td>
984 <td class="paramtype">uint </td>
985 <td class="paramname"><em>dst_gy_step_y</em>, </td>
988 <td class="paramkey"></td>
990 <td class="paramtype">uint </td>
991 <td class="paramname"><em>dst_gy_offset_first_element_in_bytes</em> </td>
999 </div><div class="memdoc">
1001 <p>Apply a 1x5 sobel matrix to a single channel U8 input image and output two temporary channel S16 images. </p>
1002 <dl class="section attention"><dt>Attention</dt><dd>To enable computation of the X gradient -DGRAD_X must be passed at compile time, while computation of the Y gradient is performed when -DGRAD_Y is used. You can use both when computation of both gradients is required.</dd></dl>
1003 <dl class="params"><dt>Parameters</dt><dd>
1004 <table class="params">
1005 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image.. Supported data types: U8 </td></tr>
1006 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
1007 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1008 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
1009 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1010 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
1011 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gx_ptr</td><td>Pointer to the destination image.. Supported data types: S16 </td></tr>
1012 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1013 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1014 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1015 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1016 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1017 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gy_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
1018 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1019 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_x</td><td>dst_gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1020 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1021 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_y</td><td>dst_gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1022 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1027 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00259">259</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
1029 <p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, <a class="el" href="sobel__filter_8cl_source.xhtml#l00154">sobel1x5()</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
1030 <div class="fragment"><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> {</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gx);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gy);</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> </div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="comment">// Output pixels</span></div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  short16 gx_gy = <a class="code" href="sobel__filter_8cl.xhtml#a4fac2cb52458aa4666af5b521d2a3910">sobel1x5</a>(&src,</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  -1, -2, 0, 2, 1,</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  1, 4, 6, 4, 1);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> </div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="comment">// Store result in dst</span></div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  vstore8(gx_gy.s01234567, 0, ((__global <span class="keywordtype">short</span> *)dst_gx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  vstore8(gx_gy.s89ABCDEF, 0, ((__global <span class="keywordtype">short</span> *)dst_gy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span> }</div><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#l00102">helpers.h:102</a></div></div>
1031 <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#l00140">helpers.h:140</a></div></div>
1032 <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#l00142">helpers.h:142</a></div></div>
1033 <div class="ttc" id="sobel__filter_8cl_xhtml_a4fac2cb52458aa4666af5b521d2a3910"><div class="ttname"><a href="sobel__filter_8cl.xhtml#a4fac2cb52458aa4666af5b521d2a3910">sobel1x5</a></div><div class="ttdeci">short16 sobel1x5(Image *src, const short left1_coeff_gx, const short left2_coeff_gx, const short middle_coeff_gx, const short right1_coeff_gx, const short right2_coeff_gx, const short left1_coeff_gy, const short left2_coeff_gy, const short middle_coeff_gy, const short right1_coeff_gy, const short right2_coeff_gy)</div><div class="ttdoc">Compute a 1D horizontal sobel filter 1x5 for 8 bytes assuming the input is made of 1 channel of 1 byt...</div><div class="ttdef"><b>Definition:</b> <a href="sobel__filter_8cl_source.xhtml#l00154">sobel_filter.cl:154</a></div></div>
1034 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
1035 </div><!-- fragment -->
1038 <a class="anchor" id="ad8be5e69836ab70ac229279a7d7edaf7"></a>
1039 <div class="memitem">
1040 <div class="memproto">
1041 <table class="memname">
1043 <td class="memname">__kernel void sobel_separable1x7 </td>
1045 <td class="paramtype">__global uchar * </td>
1046 <td class="paramname"><em>src_ptr</em>, </td>
1049 <td class="paramkey"></td>
1051 <td class="paramtype">uint </td>
1052 <td class="paramname"><em>src_stride_x</em>, </td>
1055 <td class="paramkey"></td>
1057 <td class="paramtype">uint </td>
1058 <td class="paramname"><em>src_step_x</em>, </td>
1061 <td class="paramkey"></td>
1063 <td class="paramtype">uint </td>
1064 <td class="paramname"><em>src_stride_y</em>, </td>
1067 <td class="paramkey"></td>
1069 <td class="paramtype">uint </td>
1070 <td class="paramname"><em>src_step_y</em>, </td>
1073 <td class="paramkey"></td>
1075 <td class="paramtype">uint </td>
1076 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
1079 <td class="paramkey"></td>
1081 <td class="paramtype">__global uchar * </td>
1082 <td class="paramname"><em>dst_gx_ptr</em>, </td>
1085 <td class="paramkey"></td>
1087 <td class="paramtype">uint </td>
1088 <td class="paramname"><em>dst_gx_stride_x</em>, </td>
1091 <td class="paramkey"></td>
1093 <td class="paramtype">uint </td>
1094 <td class="paramname"><em>dst_gx_step_x</em>, </td>
1097 <td class="paramkey"></td>
1099 <td class="paramtype">uint </td>
1100 <td class="paramname"><em>dst_gx_stride_y</em>, </td>
1103 <td class="paramkey"></td>
1105 <td class="paramtype">uint </td>
1106 <td class="paramname"><em>dst_gx_step_y</em>, </td>
1109 <td class="paramkey"></td>
1111 <td class="paramtype">uint </td>
1112 <td class="paramname"><em>dst_gx_offset_first_element_in_bytes</em>, </td>
1115 <td class="paramkey"></td>
1117 <td class="paramtype">__global uchar * </td>
1118 <td class="paramname"><em>dst_gy_ptr</em>, </td>
1121 <td class="paramkey"></td>
1123 <td class="paramtype">uint </td>
1124 <td class="paramname"><em>dst_gy_stride_x</em>, </td>
1127 <td class="paramkey"></td>
1129 <td class="paramtype">uint </td>
1130 <td class="paramname"><em>dst_gy_step_x</em>, </td>
1133 <td class="paramkey"></td>
1135 <td class="paramtype">uint </td>
1136 <td class="paramname"><em>dst_gy_stride_y</em>, </td>
1139 <td class="paramkey"></td>
1141 <td class="paramtype">uint </td>
1142 <td class="paramname"><em>dst_gy_step_y</em>, </td>
1145 <td class="paramkey"></td>
1147 <td class="paramtype">uint </td>
1148 <td class="paramname"><em>dst_gy_offset_first_element_in_bytes</em> </td>
1156 </div><div class="memdoc">
1158 <p>Apply a 1x7 sobel matrix to a single channel U8 input image and output two temporary channel S16 images and leave the borders undefined. </p>
1159 <dl class="section attention"><dt>Attention</dt><dd>To enable computation of the X gradient -DGRAD_X must be passed at compile time, while computation of the Y gradient is performed when -DGRAD_Y is used. You can use both when computation of both gradients is required.</dd></dl>
1160 <dl class="params"><dt>Parameters</dt><dd>
1161 <table class="params">
1162 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr>
1163 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
1164 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1165 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
1166 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1167 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
1168 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gx_ptr</td><td>Pointer to the destination image. Supported data types: S32 </td></tr>
1169 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1170 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1171 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1172 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1173 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1174 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gy_ptr</td><td>Pointer to the destination image. Supported data types: S32 </td></tr>
1175 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1176 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_x</td><td>dst_gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1177 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1178 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_y</td><td>dst_gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1179 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1184 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00442">442</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
1186 <p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, <a class="el" href="sobel__filter_8cl_source.xhtml#l00399">SOBEL1x7</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
1187 <div class="fragment"><div class="line"><a name="l00453"></a><span class="lineno"> 453</span> {</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gx);</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gy);</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  int8 gx = (int8)0;</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  int8 gy = (int8)0;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span> </div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <a class="code" href="sobel__filter_8cl.xhtml#a7f602251e0a1f8710f8aab3aef09a36b">SOBEL1x7</a>(&src, gx, gy);</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span> </div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  <span class="comment">// Store result in dst</span></div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  vstore8(gx, 0, ((__global <span class="keywordtype">int</span> *)dst_gx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  vstore8(gy, 0, ((__global <span class="keywordtype">int</span> *)dst_gy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span> }</div><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#l00102">helpers.h:102</a></div></div>
1188 <div class="ttc" id="sobel__filter_8cl_xhtml_a7f602251e0a1f8710f8aab3aef09a36b"><div class="ttname"><a href="sobel__filter_8cl.xhtml#a7f602251e0a1f8710f8aab3aef09a36b">SOBEL1x7</a></div><div class="ttdeci">#define SOBEL1x7(ptr, gx, gy)</div><div class="ttdef"><b>Definition:</b> <a href="sobel__filter_8cl_source.xhtml#l00399">sobel_filter.cl:399</a></div></div>
1189 <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#l00140">helpers.h:140</a></div></div>
1190 <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#l00142">helpers.h:142</a></div></div>
1191 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
1192 </div><!-- fragment -->
1195 <a class="anchor" id="a2cc1fcdd12f2c3cdd31b83fd59597e40"></a>
1196 <div class="memitem">
1197 <div class="memproto">
1198 <table class="memname">
1200 <td class="memname">__kernel void sobel_separable5x1 </td>
1202 <td class="paramtype">__global uchar * </td>
1203 <td class="paramname"><em>src_x_ptr</em>, </td>
1206 <td class="paramkey"></td>
1208 <td class="paramtype">uint </td>
1209 <td class="paramname"><em>src_x_stride_x</em>, </td>
1212 <td class="paramkey"></td>
1214 <td class="paramtype">uint </td>
1215 <td class="paramname"><em>src_x_step_x</em>, </td>
1218 <td class="paramkey"></td>
1220 <td class="paramtype">uint </td>
1221 <td class="paramname"><em>src_x_stride_y</em>, </td>
1224 <td class="paramkey"></td>
1226 <td class="paramtype">uint </td>
1227 <td class="paramname"><em>src_x_step_y</em>, </td>
1230 <td class="paramkey"></td>
1232 <td class="paramtype">uint </td>
1233 <td class="paramname"><em>src_x_offset_first_element_in_bytes</em>, </td>
1236 <td class="paramkey"></td>
1238 <td class="paramtype">__global uchar * </td>
1239 <td class="paramname"><em>dst_gx_ptr</em>, </td>
1242 <td class="paramkey"></td>
1244 <td class="paramtype">uint </td>
1245 <td class="paramname"><em>dst_gx_stride_x</em>, </td>
1248 <td class="paramkey"></td>
1250 <td class="paramtype">uint </td>
1251 <td class="paramname"><em>dst_gx_step_x</em>, </td>
1254 <td class="paramkey"></td>
1256 <td class="paramtype">uint </td>
1257 <td class="paramname"><em>dst_gx_stride_y</em>, </td>
1260 <td class="paramkey"></td>
1262 <td class="paramtype">uint </td>
1263 <td class="paramname"><em>dst_gx_step_y</em>, </td>
1266 <td class="paramkey"></td>
1268 <td class="paramtype">uint </td>
1269 <td class="paramname"><em>dst_gx_offset_first_element_in_bytes</em>, </td>
1272 <td class="paramkey"></td>
1274 <td class="paramtype">__global uchar * </td>
1275 <td class="paramname"><em>src_y_ptr</em>, </td>
1278 <td class="paramkey"></td>
1280 <td class="paramtype">uint </td>
1281 <td class="paramname"><em>src_y_stride_x</em>, </td>
1284 <td class="paramkey"></td>
1286 <td class="paramtype">uint </td>
1287 <td class="paramname"><em>src_y_step_x</em>, </td>
1290 <td class="paramkey"></td>
1292 <td class="paramtype">uint </td>
1293 <td class="paramname"><em>src_y_stride_y</em>, </td>
1296 <td class="paramkey"></td>
1298 <td class="paramtype">uint </td>
1299 <td class="paramname"><em>src_y_step_y</em>, </td>
1302 <td class="paramkey"></td>
1304 <td class="paramtype">uint </td>
1305 <td class="paramname"><em>src_y_offset_first_element_in_bytes</em>, </td>
1308 <td class="paramkey"></td>
1310 <td class="paramtype">__global uchar * </td>
1311 <td class="paramname"><em>dst_gy_ptr</em>, </td>
1314 <td class="paramkey"></td>
1316 <td class="paramtype">uint </td>
1317 <td class="paramname"><em>dst_gy_stride_x</em>, </td>
1320 <td class="paramkey"></td>
1322 <td class="paramtype">uint </td>
1323 <td class="paramname"><em>dst_gy_step_x</em>, </td>
1326 <td class="paramkey"></td>
1328 <td class="paramtype">uint </td>
1329 <td class="paramname"><em>dst_gy_stride_y</em>, </td>
1332 <td class="paramkey"></td>
1334 <td class="paramtype">uint </td>
1335 <td class="paramname"><em>dst_gy_step_y</em>, </td>
1338 <td class="paramkey"></td>
1340 <td class="paramtype">uint </td>
1341 <td class="paramname"><em>dst_gy_offset_first_element_in_bytes</em>, </td>
1344 <td class="paramkey"></td>
1346 <td class="paramtype">int </td>
1347 <td class="paramname"><em>dummy</em> </td>
1355 </div><div class="memdoc">
1357 <p>Apply a 5x1 convolution matrix to two single channel S16 input temporary images and output two single channel S16 images. </p>
1358 <dl class="section attention"><dt>Attention</dt><dd>To enable computation of the X gradient -DGRAD_X must be passed at compile time, while computation of the Y gradient is performed when -DGRAD_Y is used. You can use both when computation of both gradients is required.</dd></dl>
1359 <dl class="params"><dt>Parameters</dt><dd>
1360 <table class="params">
1361 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_ptr</td><td>Pointer to the source image.. Supported data types: S16 </td></tr>
1362 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
1363 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_step_x</td><td>src_x_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1364 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
1365 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_step_y</td><td>src_x_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1366 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
1367 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gx_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
1368 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1369 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1370 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1371 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1372 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1373 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_ptr</td><td>Pointer to the source image. Supported data types: S16 </td></tr>
1374 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
1375 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_step_x</td><td>src_y_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1376 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
1377 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_step_y</td><td>src_y_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1378 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
1379 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gy_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
1380 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1381 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_x</td><td>dst_gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1382 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1383 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_y</td><td>dst_gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1384 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1385 <tr><td class="paramdir">[in]</td><td class="paramname">dummy</td><td>Dummy parameter to easy conditional inclusion </td></tr>
1390 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00325">325</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
1392 <p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="sobel__filter_8cl_source.xhtml#l00206">sobel5x1()</a>.</p>
1393 <div class="fragment"><div class="line"><a name="l00335"></a><span class="lineno"> 335</span> {</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <a class="code" href="struct_image.xhtml">Image</a> src_x = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src_x);</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gx);</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <a class="code" href="struct_image.xhtml">Image</a> src_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src_y);</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gy);</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span> </div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  short8 gx = <a class="code" href="sobel__filter_8cl.xhtml#a1cfe58175749124762fe0dea315d3c21">sobel5x1</a>(&src_x,</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  1, 4, 6, 4, 1);</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  vstore8(gx, 0, ((__global <span class="keywordtype">short</span> *)dst_gx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  short8 gy = <a class="code" href="sobel__filter_8cl.xhtml#a1cfe58175749124762fe0dea315d3c21">sobel5x1</a>(&src_y,</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  -1, -2, 0, 2, 1);</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  vstore8(gy, 0, ((__global <span class="keywordtype">short</span> *)dst_gy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span> }</div><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#l00102">helpers.h:102</a></div></div>
1394 <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#l00140">helpers.h:140</a></div></div>
1395 <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#l00142">helpers.h:142</a></div></div>
1396 <div class="ttc" id="sobel__filter_8cl_xhtml_a1cfe58175749124762fe0dea315d3c21"><div class="ttname"><a href="sobel__filter_8cl.xhtml#a1cfe58175749124762fe0dea315d3c21">sobel5x1</a></div><div class="ttdeci">short8 sobel5x1(Image *src, const short up1_coeff, const short up2_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff)</div><div class="ttdoc">Compute a 1D vertical sobel filter 5x1 for 8 bytes assuming the input is made of 1 channel of 1 byte ...</div><div class="ttdef"><b>Definition:</b> <a href="sobel__filter_8cl_source.xhtml#l00206">sobel_filter.cl:206</a></div></div>
1397 </div><!-- fragment -->
1400 <a class="anchor" id="a8cdc6e6df9d40cec1e857917d14ee75f"></a>
1401 <div class="memitem">
1402 <div class="memproto">
1403 <table class="memname">
1405 <td class="memname">__kernel void sobel_separable7x1 </td>
1407 <td class="paramtype">__global uchar * </td>
1408 <td class="paramname"><em>src_x_ptr</em>, </td>
1411 <td class="paramkey"></td>
1413 <td class="paramtype">uint </td>
1414 <td class="paramname"><em>src_x_stride_x</em>, </td>
1417 <td class="paramkey"></td>
1419 <td class="paramtype">uint </td>
1420 <td class="paramname"><em>src_x_step_x</em>, </td>
1423 <td class="paramkey"></td>
1425 <td class="paramtype">uint </td>
1426 <td class="paramname"><em>src_x_stride_y</em>, </td>
1429 <td class="paramkey"></td>
1431 <td class="paramtype">uint </td>
1432 <td class="paramname"><em>src_x_step_y</em>, </td>
1435 <td class="paramkey"></td>
1437 <td class="paramtype">uint </td>
1438 <td class="paramname"><em>src_x_offset_first_element_in_bytes</em>, </td>
1441 <td class="paramkey"></td>
1443 <td class="paramtype">__global uchar * </td>
1444 <td class="paramname"><em>dst_gx_ptr</em>, </td>
1447 <td class="paramkey"></td>
1449 <td class="paramtype">uint </td>
1450 <td class="paramname"><em>dst_gx_stride_x</em>, </td>
1453 <td class="paramkey"></td>
1455 <td class="paramtype">uint </td>
1456 <td class="paramname"><em>dst_gx_step_x</em>, </td>
1459 <td class="paramkey"></td>
1461 <td class="paramtype">uint </td>
1462 <td class="paramname"><em>dst_gx_stride_y</em>, </td>
1465 <td class="paramkey"></td>
1467 <td class="paramtype">uint </td>
1468 <td class="paramname"><em>dst_gx_step_y</em>, </td>
1471 <td class="paramkey"></td>
1473 <td class="paramtype">uint </td>
1474 <td class="paramname"><em>dst_gx_offset_first_element_in_bytes</em>, </td>
1477 <td class="paramkey"></td>
1479 <td class="paramtype">__global uchar * </td>
1480 <td class="paramname"><em>src_y_ptr</em>, </td>
1483 <td class="paramkey"></td>
1485 <td class="paramtype">uint </td>
1486 <td class="paramname"><em>src_y_stride_x</em>, </td>
1489 <td class="paramkey"></td>
1491 <td class="paramtype">uint </td>
1492 <td class="paramname"><em>src_y_step_x</em>, </td>
1495 <td class="paramkey"></td>
1497 <td class="paramtype">uint </td>
1498 <td class="paramname"><em>src_y_stride_y</em>, </td>
1501 <td class="paramkey"></td>
1503 <td class="paramtype">uint </td>
1504 <td class="paramname"><em>src_y_step_y</em>, </td>
1507 <td class="paramkey"></td>
1509 <td class="paramtype">uint </td>
1510 <td class="paramname"><em>src_y_offset_first_element_in_bytes</em>, </td>
1513 <td class="paramkey"></td>
1515 <td class="paramtype">__global uchar * </td>
1516 <td class="paramname"><em>dst_gy_ptr</em>, </td>
1519 <td class="paramkey"></td>
1521 <td class="paramtype">uint </td>
1522 <td class="paramname"><em>dst_gy_stride_x</em>, </td>
1525 <td class="paramkey"></td>
1527 <td class="paramtype">uint </td>
1528 <td class="paramname"><em>dst_gy_step_x</em>, </td>
1531 <td class="paramkey"></td>
1533 <td class="paramtype">uint </td>
1534 <td class="paramname"><em>dst_gy_stride_y</em>, </td>
1537 <td class="paramkey"></td>
1539 <td class="paramtype">uint </td>
1540 <td class="paramname"><em>dst_gy_step_y</em>, </td>
1543 <td class="paramkey"></td>
1545 <td class="paramtype">uint </td>
1546 <td class="paramname"><em>dst_gy_offset_first_element_in_bytes</em>, </td>
1549 <td class="paramkey"></td>
1551 <td class="paramtype">int </td>
1552 <td class="paramname"><em>dummy</em> </td>
1560 </div><div class="memdoc">
1562 <p>Apply a 7x1 convolution matrix to two single channel S16 input temporary images and output two single channel S16 images and leave the borders undefined. </p>
1563 <dl class="section attention"><dt>Attention</dt><dd>To enable computation of the X gradient -DGRAD_X must be passed at compile time, while computation of the Y gradient is performed when -DGRAD_Y is used. You can use both when computation of both gradients is required.</dd></dl>
1564 <dl class="params"><dt>Parameters</dt><dd>
1565 <table class="params">
1566 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_ptr</td><td>Pointer to the source image. Supported data types: S32 </td></tr>
1567 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
1568 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_step_x</td><td>src_x_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1569 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
1570 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_step_y</td><td>src_x_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1571 <tr><td class="paramdir">[in]</td><td class="paramname">src_x_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
1572 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gx_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
1573 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1574 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1575 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1576 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1577 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gx_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1578 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_ptr</td><td>Pointer to the source image. Supported data types: S32 </td></tr>
1579 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
1580 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_step_x</td><td>src_y_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1581 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
1582 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_step_y</td><td>src_y_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1583 <tr><td class="paramdir">[in]</td><td class="paramname">src_y_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
1584 <tr><td class="paramdir">[out]</td><td class="paramname">dst_gy_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr>
1585 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
1586 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_x</td><td>dst_gy_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
1587 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
1588 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_step_y</td><td>dst_gy_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
1589 <tr><td class="paramdir">[in]</td><td class="paramname">dst_gy_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
1590 <tr><td class="paramdir">[in]</td><td class="paramname">dummy</td><td>Dummy parameter to easy conditional inclusion </td></tr>
1595 <p>Definition at line <a class="el" href="sobel__filter_8cl_source.xhtml#l00506">506</a> of file <a class="el" href="sobel__filter_8cl_source.xhtml">sobel_filter.cl</a>.</p>
1597 <p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="sobel__filter_8cl_source.xhtml#l00409">SOBEL7x1</a>.</p>
1598 <div class="fragment"><div class="line"><a name="l00516"></a><span class="lineno"> 516</span> {</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>  <a class="code" href="struct_image.xhtml">Image</a> src_x = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src_x);</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gx);</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <a class="code" href="struct_image.xhtml">Image</a> src_y = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src_y);</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  <a class="code" href="struct_image.xhtml">Image</a> dst_gy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst_gy);</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span> </div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>  <span class="comment">// Output pixels</span></div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span> <span class="preprocessor">#ifdef GRAD_X</span></div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  int8 gx = 0;</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  <a class="code" href="sobel__filter_8cl.xhtml#a59f291bf2b268f9b850fa81a3fbf776a">SOBEL7x1</a>(&src_x, gx, Y);</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>  vstore8(gx, 0, (__global <span class="keywordtype">int</span> *)dst_gx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_X */</span><span class="preprocessor"></span></div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span> <span class="preprocessor">#ifdef GRAD_Y</span></div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>  int8 gy = 0;</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <a class="code" href="sobel__filter_8cl.xhtml#a59f291bf2b268f9b850fa81a3fbf776a">SOBEL7x1</a>(&src_y, gy, X);</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  vstore8(gy, 0, (__global <span class="keywordtype">int</span> *)dst_gy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span> <span class="preprocessor">#endif </span><span class="comment">/* GRAD_Y */</span><span class="preprocessor"></span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span> }</div><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#l00102">helpers.h:102</a></div></div>
1599 <div class="ttc" id="sobel__filter_8cl_xhtml_a59f291bf2b268f9b850fa81a3fbf776a"><div class="ttname"><a href="sobel__filter_8cl.xhtml#a59f291bf2b268f9b850fa81a3fbf776a">SOBEL7x1</a></div><div class="ttdeci">#define SOBEL7x1(ptr, g, direction)</div><div class="ttdef"><b>Definition:</b> <a href="sobel__filter_8cl_source.xhtml#l00409">sobel_filter.cl:409</a></div></div>
1600 <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#l00140">helpers.h:140</a></div></div>
1601 <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#l00142">helpers.h:142</a></div></div>
1602 </div><!-- fragment -->
1605 </div><!-- contents -->
1606 </div><!-- doc-content -->
1607 <!-- start footer part -->
1608 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
1610 <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="sobel__filter_8cl.xhtml">sobel_filter.cl</a></li>
1611 <li class="footer">Generated on Thu Feb 22 2018 15:45:22 for Compute Library by
1612 <a href="http://www.doxygen.org/index.html">
1613 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>