blob: b2f3041686f4e58ae9c6b7a5a85433c519a25a8b [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +00001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Jenkinsb9abeae2018-11-22 11:58:08 +00007<meta name="generator" content="Doxygen 1.8.13"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: src/core/CL/cl_kernels/convolution3x3.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
Anthony Barbier871448e2017-03-24 14:54:29 +000019</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000021<script type="text/javascript" src="search/searchdata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000022<script type="text/javascript" src="search/search.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000023<script type="text/x-mathjax-config">
24 MathJax.Hub.Config({
25 extensions: ["tex2jax.js"],
26 jax: ["input/TeX","output/HTML-CSS"],
27});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000028</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000029<link href="doxygen.css" rel="stylesheet" type="text/css" />
30</head>
31<body>
32<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
33<div id="titlearea">
34<table cellspacing="0" cellpadding="0">
35 <tbody>
36 <tr style="height: 56px;">
37 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010038 <div id="projectname">Compute Library
Jenkinsb9abeae2018-11-22 11:58:08 +000039 &#160;<span id="projectnumber">18.11</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000040 </div>
41 </td>
42 </tr>
43 </tbody>
44</table>
45</div>
46<!-- end header part -->
Jenkinsb9abeae2018-11-22 11:58:08 +000047<!-- Generated by Doxygen 1.8.13 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000048<script type="text/javascript">
49var searchBox = new SearchBox("searchBox", "search",false,'Search');
50</script>
Jenkinsb9abeae2018-11-22 11:58:08 +000051<script type="text/javascript" src="menudata.js"></script>
52<script type="text/javascript" src="menu.js"></script>
53<script type="text/javascript">
54$(function() {
55 initMenu('',true,false,'search.php','Search');
56 $(document).ready(function() { init_search(); });
57});
58</script>
59<div id="main-nav"></div>
Anthony Barbier871448e2017-03-24 14:54:29 +000060</div><!-- top -->
61<div id="side-nav" class="ui-resizable side-nav-resizable">
62 <div id="nav-tree">
63 <div id="nav-tree-contents">
64 <div id="nav-sync" class="sync"></div>
65 </div>
66 </div>
67 <div id="splitbar" style="-moz-user-select:none;"
68 class="ui-resizable-handle">
69 </div>
70</div>
71<script type="text/javascript">
72$(document).ready(function(){initNavTree('convolution3x3_8cl.xhtml','');});
73</script>
74<div id="doc-content">
75<!-- window showing the filter options -->
76<div id="MSearchSelectWindow"
77 onmouseover="return searchBox.OnSearchSelectShow()"
78 onmouseout="return searchBox.OnSearchSelectHide()"
79 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000080</div>
Anthony Barbier871448e2017-03-24 14:54:29 +000081
82<!-- iframe showing the search results (closed by default) -->
83<div id="MSearchResultsWindow">
84<iframe src="javascript:void(0)" frameborder="0"
85 name="MSearchResults" id="MSearchResults">
86</iframe>
87</div>
88
89<div class="header">
90 <div class="summary">
91<a href="#define-members">Macros</a> &#124;
92<a href="#func-members">Functions</a> </div>
93 <div class="headertitle">
94<div class="title">convolution3x3.cl File Reference</div> </div>
95</div><!--header-->
96<div class="contents">
Jenkinsb9abeae2018-11-22 11:58:08 +000097<div class="textblock"><code>#include &quot;<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
Anthony Barbier871448e2017-03-24 14:54:29 +000098</div>
99<p><a href="convolution3x3_8cl_source.xhtml">Go to the source code of this file.</a></p>
100<table class="memberdecls">
101<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
102Macros</h2></td></tr>
103<tr class="memitem:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;&#160;&#160;short</td></tr>
104<tr class="separator:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>&#160;&#160;&#160;uchar</td></tr>
106<tr class="separator:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memSeparator" colspan="2">&#160;</td></tr>
107</table><table class="memberdecls">
108<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
109Functions</h2></td></tr>
110<tr class="memitem:a92702074338198e81a46c3e309d9b04f"><td class="memItemLeft" align="right" valign="top">short8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a> (__global const uchar *left_pixel, const short left_coeff, const short middle_coeff, const short right_coeff)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000111<tr class="memdesc:a92702074338198e81a46c3e309d9b04f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute a 1D horizontal convolution of size 3 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#a92702074338198e81a46c3e309d9b04f">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000112<tr class="separator:a92702074338198e81a46c3e309d9b04f"><td class="memSeparator" colspan="2">&#160;</td></tr>
113<tr class="memitem:afc5fefe72e66f0ae5191fd5b708fade9"><td class="memItemLeft" align="right" valign="top">short8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#afc5fefe72e66f0ae5191fd5b708fade9">convolution3x3</a> (<a class="el" href="struct_image.xhtml">Image</a> *src, const short mat0, const short mat1, const short mat2, const short mat3, const short mat4, const short mat5, const short mat6, const short mat7, const short mat8, uint scale)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000114<tr class="memdesc:afc5fefe72e66f0ae5191fd5b708fade9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 3x3 convolution matrix to a single channel U8 input image and return the result. <a href="#afc5fefe72e66f0ae5191fd5b708fade9">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000115<tr class="separator:afc5fefe72e66f0ae5191fd5b708fade9"><td class="memSeparator" colspan="2">&#160;</td></tr>
116<tr class="memitem:aa0b80492bb4faef0b052d95a8aa147e4"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#aa0b80492bb4faef0b052d95a8aa147e4">convolution3x3_static</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_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000117<tr class="memdesc:aa0b80492bb4faef0b052d95a8aa147e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 3x3 static convolution matrix to a single channel U8 input image and output a single channel image. <a href="#aa0b80492bb4faef0b052d95a8aa147e4">More...</a><br /></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000118<tr class="separator:aa0b80492bb4faef0b052d95a8aa147e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
119</table>
120<h2 class="groupheader">Macro Definition Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000121<a id="afb8c72ce35c4a1f4a2588d6573e54aa1"></a>
122<h2 class="memtitle"><span class="permalink"><a href="#afb8c72ce35c4a1f4a2588d6573e54aa1">&#9670;&nbsp;</a></span>DATA_TYPE</h2>
123
Anthony Barbier871448e2017-03-24 14:54:29 +0000124<div class="memitem">
125<div class="memproto">
126 <table class="memname">
127 <tr>
128 <td class="memname">#define DATA_TYPE&#160;&#160;&#160;short</td>
129 </tr>
130 </table>
131</div><div class="memdoc">
132
Jenkinsb9abeae2018-11-22 11:58:08 +0000133<p class="definition">Definition at line <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">27</a> of file <a class="el" href="convolution3x3_8cl_source.xhtml">convolution3x3.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000134
Jenkinsb9abeae2018-11-22 11:58:08 +0000135<p class="reference">Referenced by <a class="el" href="warp__helpers_8h_source.xhtml#l00095">bilinear_interpolate_with_border()</a>, <a class="el" href="warp__helpers__quantized_8h_source.xhtml#l00084">bilinear_interpolate_with_border_quantized()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00043">convolution1x3()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00082">convolution3x3()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00123">convolution3x3_static()</a>, <a class="el" href="convolution__rectangle_8cl_source.xhtml#l00064">convolution_rectangle()</a>, <a class="el" href="copy__tensor_8cl_source.xhtml#l00099">copy_tensor()</a>, <a class="el" href="deconvolution__layer_8cl_source.xhtml#l00045">deconvolution_upsample()</a>, <a class="el" href="fill__border_8cl_source.xhtml#l00122">fill_image_borders_constant()</a>, <a class="el" href="fill__border_8cl_source.xhtml#l00046">fill_image_borders_replicate()</a>, <a class="el" href="floor_8cl_source.xhtml#l00049">floor_layer()</a>, <a class="el" href="harris__corners_8cl_source.xhtml#l00138">harris_score_1x5()</a>, <a class="el" href="harris__corners_8cl_source.xhtml#l00253">harris_score_1x7()</a>, <a class="el" href="harris__corners_8cl_source.xhtml#l00053">harris_score_3x3()</a>, <a class="el" href="l2__normalize_8cl_source.xhtml#l00045">l2_normalize_x()</a>, <a class="el" href="l2__normalize_8cl_source.xhtml#l00088">l2_normalize_y()</a>, <a class="el" href="l2__normalize_8cl_source.xhtml#l00139">l2_normalize_z()</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00045">magnitude_l2()</a>, <a class="el" href="magnitude__phase_8cl_source.xhtml#l00130">magnitude_phase()</a>, <a class="el" href="minmaxloc_8cl_source.xhtml#l00143">minmaxloc()</a>, <a class="el" href="nonmax_8cl_source.xhtml#l00041">non_max_suppression()</a>, <a class="el" href="normalization__layer_8cl_source.xhtml#l00060">normalization_layer_cross_map()</a>, <a class="el" href="pooling__layer_8cl_source.xhtml#l00204">pooling_layer_2()</a>, <a class="el" href="pooling__layer_8cl_source.xhtml#l00268">pooling_layer_3()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00059">read_texels4()</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00085">reduction_operation_x()</a>, <a class="el" href="reshape__layer_8cl_source.xhtml#l00049">reshape_layer()</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00061">roi_pool_1x1()</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00123">roi_pooling_layer()</a>, <a class="el" href="scale_8cl_source.xhtml#l00122">scale_bilinear_nchw()</a>, <a class="el" href="scale_8cl_source.xhtml#l00207">scale_bilinear_nhwc()</a>, <a class="el" href="scale__quantized_8cl_source.xhtml#l00073">scale_bilinear_quantized_nchw()</a>, <a class="el" href="scale__quantized_8cl_source.xhtml#l00116">scale_bilinear_quantized_nhwc()</a>, <a class="el" href="scale_8cl_source.xhtml#l00086">scale_nearest_neighbour_nchw()</a>, <a class="el" href="scale_8cl_source.xhtml#l00162">scale_nearest_neighbour_nhwc()</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00032">square_sum()</a>, <a class="el" href="slice__ops_8cl_source.xhtml#l00056">strided_slice()</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00052">sum()</a>, <a class="el" href="transpose_8cl_source.xhtml#l00148">transpose()</a>, <a class="el" href="upsample__layer_8cl_source.xhtml#l00052">upsample_layer_nchw()</a>, <a class="el" href="upsample__layer_8cl_source.xhtml#l00107">upsample_layer_nhwc()</a>, <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00036">vec4_max()</a>, and <a class="el" href="roi__pooling__layer_8cl_source.xhtml#l00043">vec8_max()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000136
137</div>
138</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000139<a id="ac06f3e24d3fffd3c465d8b2a6e7c985e"></a>
140<h2 class="memtitle"><span class="permalink"><a href="#ac06f3e24d3fffd3c465d8b2a6e7c985e">&#9670;&nbsp;</a></span>DATA_TYPE_OUT</h2>
141
Anthony Barbier871448e2017-03-24 14:54:29 +0000142<div class="memitem">
143<div class="memproto">
144 <table class="memname">
145 <tr>
146 <td class="memname">#define DATA_TYPE_OUT&#160;&#160;&#160;uchar</td>
147 </tr>
148 </table>
149</div><div class="memdoc">
150
Jenkinsb9abeae2018-11-22 11:58:08 +0000151<p class="definition">Definition at line <a class="el" href="convolution3x3_8cl_source.xhtml#l00031">31</a> of file <a class="el" href="convolution3x3_8cl_source.xhtml">convolution3x3.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000152
Jenkinsb9abeae2018-11-22 11:58:08 +0000153<p class="reference">Referenced by <a class="el" href="absdiff_8cl_source.xhtml#l00050">absdiff()</a>, <a class="el" href="arithmetic__op_8cl_source.xhtml#l00172">arithmetic_div()</a>, <a class="el" href="arithmetic__op_8cl_source.xhtml#l00122">arithmetic_sub()</a>, <a class="el" href="canny_8cl_source.xhtml#l00057">combine_gradients_L1()</a>, <a class="el" href="canny_8cl_source.xhtml#l00121">combine_gradients_L2()</a>, <a class="el" href="depth__convert_8cl_source.xhtml#l00058">convert_depth_down()</a>, <a class="el" href="depth__convert_8cl_source.xhtml#l00098">convert_depth_up()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00123">convolution3x3_static()</a>, <a class="el" href="convolution__rectangle_8cl_source.xhtml#l00064">convolution_rectangle()</a>, and <a class="el" href="canny_8cl_source.xhtml#l00189">suppress_non_maximum()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000154
155</div>
156</div>
157<h2 class="groupheader">Function Documentation</h2>
Jenkinsb9abeae2018-11-22 11:58:08 +0000158<a id="a92702074338198e81a46c3e309d9b04f"></a>
159<h2 class="memtitle"><span class="permalink"><a href="#a92702074338198e81a46c3e309d9b04f">&#9670;&nbsp;</a></span>convolution1x3()</h2>
160
Anthony Barbier871448e2017-03-24 14:54:29 +0000161<div class="memitem">
162<div class="memproto">
163<table class="mlabels">
164 <tr>
165 <td class="mlabels-left">
166 <table class="memname">
167 <tr>
168 <td class="memname">short8 convolution1x3 </td>
169 <td>(</td>
170 <td class="paramtype">__global const uchar *&#160;</td>
171 <td class="paramname"><em>left_pixel</em>, </td>
172 </tr>
173 <tr>
174 <td class="paramkey"></td>
175 <td></td>
176 <td class="paramtype">const short&#160;</td>
177 <td class="paramname"><em>left_coeff</em>, </td>
178 </tr>
179 <tr>
180 <td class="paramkey"></td>
181 <td></td>
182 <td class="paramtype">const short&#160;</td>
183 <td class="paramname"><em>middle_coeff</em>, </td>
184 </tr>
185 <tr>
186 <td class="paramkey"></td>
187 <td></td>
188 <td class="paramtype">const short&#160;</td>
189 <td class="paramname"><em>right_coeff</em>&#160;</td>
190 </tr>
191 <tr>
192 <td></td>
193 <td>)</td>
194 <td></td><td></td>
195 </tr>
196 </table>
197 </td>
198 <td class="mlabels-right">
199<span class="mlabels"><span class="mlabel">inline</span></span> </td>
200 </tr>
201</table>
202</div><div class="memdoc">
203
204<p>Compute a 1D horizontal convolution of size 3 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
205<dl class="params"><dt>Parameters</dt><dd>
206 <table class="params">
207 <tr><td class="paramdir">[in]</td><td class="paramname">left_pixel</td><td>Pointer to the left pixel. </td></tr>
208 <tr><td class="paramdir">[in]</td><td class="paramname">left_coeff</td><td>Weight of the left pixel </td></tr>
209 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr>
210 <tr><td class="paramdir">[in]</td><td class="paramname">right_coeff</td><td>Weight of the right pixel</td></tr>
211 </table>
212 </dd>
213</dl>
214<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl>
215
Jenkinsb9abeae2018-11-22 11:58:08 +0000216<p class="definition">Definition at line <a class="el" href="convolution3x3_8cl_source.xhtml#l00043">43</a> of file <a class="el" href="convolution3x3_8cl_source.xhtml">convolution3x3.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000217
Jenkinsb9abeae2018-11-22 11:58:08 +0000218<p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00060">CONVERT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000219
Jenkinsb9abeae2018-11-22 11:58:08 +0000220<p class="reference">Referenced by <a class="el" href="convolution3x3_8cl_source.xhtml#l00082">convolution3x3()</a>, and <a class="el" href="convolution__rectangle_8cl_source.xhtml#l00064">convolution_rectangle()</a>.</p>
221<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; uchar16 temp = vload16(0, left_pixel);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; left = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s01234567, <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8));</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; middle = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s12345678, <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; right = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s23456789, <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; return left * (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left_coeff + middle * (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))middle_coeff + right * (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right_coeff;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00060">helpers.h:60</a></div></div>
222<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
223<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">helpers.h:54</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000224</div><!-- fragment -->
225</div>
226</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000227<a id="afc5fefe72e66f0ae5191fd5b708fade9"></a>
228<h2 class="memtitle"><span class="permalink"><a href="#afc5fefe72e66f0ae5191fd5b708fade9">&#9670;&nbsp;</a></span>convolution3x3()</h2>
229
Anthony Barbier871448e2017-03-24 14:54:29 +0000230<div class="memitem">
231<div class="memproto">
232<table class="mlabels">
233 <tr>
234 <td class="mlabels-left">
235 <table class="memname">
236 <tr>
237 <td class="memname">short8 convolution3x3 </td>
238 <td>(</td>
239 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
240 <td class="paramname"><em>src</em>, </td>
241 </tr>
242 <tr>
243 <td class="paramkey"></td>
244 <td></td>
245 <td class="paramtype">const short&#160;</td>
246 <td class="paramname"><em>mat0</em>, </td>
247 </tr>
248 <tr>
249 <td class="paramkey"></td>
250 <td></td>
251 <td class="paramtype">const short&#160;</td>
252 <td class="paramname"><em>mat1</em>, </td>
253 </tr>
254 <tr>
255 <td class="paramkey"></td>
256 <td></td>
257 <td class="paramtype">const short&#160;</td>
258 <td class="paramname"><em>mat2</em>, </td>
259 </tr>
260 <tr>
261 <td class="paramkey"></td>
262 <td></td>
263 <td class="paramtype">const short&#160;</td>
264 <td class="paramname"><em>mat3</em>, </td>
265 </tr>
266 <tr>
267 <td class="paramkey"></td>
268 <td></td>
269 <td class="paramtype">const short&#160;</td>
270 <td class="paramname"><em>mat4</em>, </td>
271 </tr>
272 <tr>
273 <td class="paramkey"></td>
274 <td></td>
275 <td class="paramtype">const short&#160;</td>
276 <td class="paramname"><em>mat5</em>, </td>
277 </tr>
278 <tr>
279 <td class="paramkey"></td>
280 <td></td>
281 <td class="paramtype">const short&#160;</td>
282 <td class="paramname"><em>mat6</em>, </td>
283 </tr>
284 <tr>
285 <td class="paramkey"></td>
286 <td></td>
287 <td class="paramtype">const short&#160;</td>
288 <td class="paramname"><em>mat7</em>, </td>
289 </tr>
290 <tr>
291 <td class="paramkey"></td>
292 <td></td>
293 <td class="paramtype">const short&#160;</td>
294 <td class="paramname"><em>mat8</em>, </td>
295 </tr>
296 <tr>
297 <td class="paramkey"></td>
298 <td></td>
299 <td class="paramtype">uint&#160;</td>
300 <td class="paramname"><em>scale</em>&#160;</td>
301 </tr>
302 <tr>
303 <td></td>
304 <td>)</td>
305 <td></td><td></td>
306 </tr>
307 </table>
308 </td>
309 <td class="mlabels-right">
310<span class="mlabels"><span class="mlabel">inline</span></span> </td>
311 </tr>
312</table>
313</div><div class="memdoc">
314
315<p>Apply a 3x3 convolution matrix to a single channel U8 input image and return the result. </p>
316<p>Convolution matrix layout:</p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000317<p>[ mat0, mat1, mat2 ]<br />
318[ mat3, mat4, mat5 ]<br />
319[ mat6, mat7, mat8 ]<br />
320 </p><dl class="params"><dt>Parameters</dt><dd>
Anthony Barbier871448e2017-03-24 14:54:29 +0000321 <table class="params">
322 <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>A pointer to source <a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> structure </td></tr>
323 <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr>
324 <tr><td class="paramdir">[in]</td><td class="paramname">mat1</td><td>Coefficient from the convolution matrix </td></tr>
325 <tr><td class="paramdir">[in]</td><td class="paramname">mat2</td><td>Coefficient from the convolution matrix </td></tr>
326 <tr><td class="paramdir">[in]</td><td class="paramname">mat3</td><td>Coefficient from the convolution matrix </td></tr>
327 <tr><td class="paramdir">[in]</td><td class="paramname">mat4</td><td>Coefficient from the convolution matrix </td></tr>
328 <tr><td class="paramdir">[in]</td><td class="paramname">mat5</td><td>Coefficient from the convolution matrix </td></tr>
329 <tr><td class="paramdir">[in]</td><td class="paramname">mat6</td><td>Coefficient from the convolution matrix </td></tr>
330 <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr>
331 <tr><td class="paramdir">[in]</td><td class="paramname">mat7</td><td>Coefficient from the convolution matrix </td></tr>
332 <tr><td class="paramdir">[in]</td><td class="paramname">mat8</td><td>Coefficient from the convolution matrix </td></tr>
333 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Convolution matrix scale (Sum of the coefficients, or 1 if the sum is 0)</td></tr>
334 </table>
335 </dd>
336</dl>
337<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted and scaled values. </dd></dl>
338
Jenkinsb9abeae2018-11-22 11:58:08 +0000339<p class="definition">Definition at line <a class="el" href="convolution3x3_8cl_source.xhtml#l00082">82</a> of file <a class="el" href="convolution3x3_8cl_source.xhtml">convolution3x3.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000340
Jenkinsb9abeae2018-11-22 11:58:08 +0000341<p class="reference">References <a class="el" href="convolution3x3_8cl_source.xhtml#l00043">convolution1x3()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00309">offset()</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000342
Jenkinsb9abeae2018-11-22 11:58:08 +0000343<p class="reference">Referenced by <a class="el" href="convolution3x3_8cl_source.xhtml#l00123">convolution3x3_static()</a>.</p>
344<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;{</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="comment">// Output pixels</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; pixels;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="comment">// Row 0</span></div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; pixels = <a class="code" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a>(<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -1, -1), mat0, mat1, mat2);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="comment">// Row</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; pixels += <a class="code" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a>(<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -1, 0), mat3, mat4, mat5);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// Row 2</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; pixels += <a class="code" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a>(<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -1, 1), mat6, mat7, mat8);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// Divide by the scale</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; return pixels / (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8))<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">scale</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00309">helpers.h:309</a></div></div>
345<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000346<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acec6d8ad52a28972fa74e071c1a63b6a"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acec6d8ad52a28972fa74e071c1a63b6a">arm_compute::test::validation::scale</a></div><div class="ttdeci">scale</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_pixel_wise_multiplication_8cpp_source.xhtml#l00168">PixelWiseMultiplication.cpp:168</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000347<div class="ttc" id="convolution3x3_8cl_xhtml_a92702074338198e81a46c3e309d9b04f"><div class="ttname"><a href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a></div><div class="ttdeci">short8 convolution1x3(__global const uchar *left_pixel, const short left_coeff, const short middle_coeff, const short right_coeff)</div><div class="ttdoc">Compute a 1D horizontal convolution of size 3 for 8 bytes assuming the input is made of 1 channel of ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00043">convolution3x3.cl:43</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000348<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">helpers.h:54</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000349</div><!-- fragment -->
350</div>
351</div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000352<a id="aa0b80492bb4faef0b052d95a8aa147e4"></a>
353<h2 class="memtitle"><span class="permalink"><a href="#aa0b80492bb4faef0b052d95a8aa147e4">&#9670;&nbsp;</a></span>convolution3x3_static()</h2>
354
Anthony Barbier871448e2017-03-24 14:54:29 +0000355<div class="memitem">
356<div class="memproto">
357 <table class="memname">
358 <tr>
359 <td class="memname">__kernel void convolution3x3_static </td>
360 <td>(</td>
361 <td class="paramtype">__global uchar *&#160;</td>
362 <td class="paramname"><em>src_ptr</em>, </td>
363 </tr>
364 <tr>
365 <td class="paramkey"></td>
366 <td></td>
367 <td class="paramtype">uint&#160;</td>
368 <td class="paramname"><em>src_stride_x</em>, </td>
369 </tr>
370 <tr>
371 <td class="paramkey"></td>
372 <td></td>
373 <td class="paramtype">uint&#160;</td>
374 <td class="paramname"><em>src_step_x</em>, </td>
375 </tr>
376 <tr>
377 <td class="paramkey"></td>
378 <td></td>
379 <td class="paramtype">uint&#160;</td>
380 <td class="paramname"><em>src_stride_y</em>, </td>
381 </tr>
382 <tr>
383 <td class="paramkey"></td>
384 <td></td>
385 <td class="paramtype">uint&#160;</td>
386 <td class="paramname"><em>src_step_y</em>, </td>
387 </tr>
388 <tr>
389 <td class="paramkey"></td>
390 <td></td>
391 <td class="paramtype">uint&#160;</td>
392 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
393 </tr>
394 <tr>
395 <td class="paramkey"></td>
396 <td></td>
397 <td class="paramtype">__global uchar *&#160;</td>
398 <td class="paramname"><em>dst_ptr</em>, </td>
399 </tr>
400 <tr>
401 <td class="paramkey"></td>
402 <td></td>
403 <td class="paramtype">uint&#160;</td>
404 <td class="paramname"><em>dst_stride_x</em>, </td>
405 </tr>
406 <tr>
407 <td class="paramkey"></td>
408 <td></td>
409 <td class="paramtype">uint&#160;</td>
410 <td class="paramname"><em>dst_step_x</em>, </td>
411 </tr>
412 <tr>
413 <td class="paramkey"></td>
414 <td></td>
415 <td class="paramtype">uint&#160;</td>
416 <td class="paramname"><em>dst_stride_y</em>, </td>
417 </tr>
418 <tr>
419 <td class="paramkey"></td>
420 <td></td>
421 <td class="paramtype">uint&#160;</td>
422 <td class="paramname"><em>dst_step_y</em>, </td>
423 </tr>
424 <tr>
425 <td class="paramkey"></td>
426 <td></td>
427 <td class="paramtype">uint&#160;</td>
428 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
429 </tr>
430 <tr>
431 <td></td>
432 <td>)</td>
433 <td></td><td></td>
434 </tr>
435 </table>
436</div><div class="memdoc">
437
438<p>Apply a 3x3 static convolution matrix to a single channel U8 input image and output a single channel image. </p>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000439<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients(MAT0, MAT1, ... MAT8, SCALE), DATA_TYPE, and DATA_TYPE_OUT need to be passed at compile time.<br />
Anthony Barbier871448e2017-03-24 14:54:29 +0000440e.g. -DMAT0=1 -DMAT2=2, ...-DMAT8=8, -DSCALE=1, -DDATA_TYPE=int, -DDATA_TYPE_OUT=int</dd></dl>
441<dl class="params"><dt>Parameters</dt><dd>
442 <table class="params">
443 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image </td></tr>
444 <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>
445 <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>
446 <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>
447 <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>
448 <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>
449 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported data types: U8, S16 </td></tr>
450 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
451 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
452 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
453 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
454 <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
455 </table>
456 </dd>
457</dl>
458
Jenkinsb9abeae2018-11-22 11:58:08 +0000459<p class="definition">Definition at line <a class="el" href="convolution3x3_8cl_source.xhtml#l00123">123</a> of file <a class="el" href="convolution3x3_8cl_source.xhtml">convolution3x3.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000460
Jenkinsb9abeae2018-11-22 11:58:08 +0000461<p class="reference">References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00030">CONVERT_SAT</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00082">convolution3x3()</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00031">DATA_TYPE_OUT</a>, <a class="el" href="_c_l_2_arithmetic_division_8cpp_source.xhtml#l00100">arm_compute::test::validation::dst</a>, <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00150">Image::ptr</a>, <a class="el" href="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>, and <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">VEC_DATA_TYPE</a>.</p>
462<div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;{</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; pixels = <a class="code" href="convolution3x3_8cl.xhtml#afc5fefe72e66f0ae5191fd5b708fade9">convolution3x3</a>(&amp;src,</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8, SCALE);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160; <span class="comment">// Store the result as is in dst</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; vstore8(<a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>(pixels, <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 8)), 0, (__global DATA_TYPE_OUT *)dst.ptr);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;}</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00110">helpers.h:110</a></div></div>
463<div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000464<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00030">direct_convolution1x1.cl:30</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000465<div class="ttc" id="convolution3x3_8cl_xhtml_afc5fefe72e66f0ae5191fd5b708fade9"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afc5fefe72e66f0ae5191fd5b708fade9">convolution3x3</a></div><div class="ttdeci">short8 convolution3x3(Image *src, const short mat0, const short mat1, const short mat2, const short mat3, const short mat4, const short mat5, const short mat6, const short mat7, const short mat8, uint scale)</div><div class="ttdoc">Apply a 3x3 convolution matrix to a single channel U8 input image and return the result. </div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00082">convolution3x3.cl:82</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000466<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_arithmetic_division_8cpp_source.xhtml#l00100">ArithmeticDivision.cpp:100</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000467<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00148">helpers.h:148</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000468<div class="ttc" id="convolution3x3_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00031">convolution3x3.cl:31</a></div></div>
Jenkins52ba29e2018-08-29 15:32:11 +0000469<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 &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
Jenkinsb9abeae2018-11-22 11:58:08 +0000470<div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00054">helpers.h:54</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000471</div><!-- fragment -->
472</div>
473</div>
474</div><!-- contents -->
475</div><!-- doc-content -->
476<!-- start footer part -->
477<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
478 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000479 <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="convolution3x3_8cl.xhtml">convolution3x3.cl</a></li>
Jenkinsb9abeae2018-11-22 11:58:08 +0000480 <li class="footer">Generated on Thu Nov 22 2018 11:57:43 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000481 <a href="http://www.doxygen.org/index.html">
Jenkinsb9abeae2018-11-22 11:58:08 +0000482 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000483 </ul>
484</div>
485</body>
486</html>