Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 1 | <!-- HTML header for doxygen 1.8.9.1--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 7 | <meta name="generator" content="Doxygen 1.8.6"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 9 | <title>Compute Library: src/core/CL/cl_kernels/convolution3x3.cl File Reference</title> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | $(window).load(resizeHeight); |
| 19 | </script> |
| 20 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <script type="text/javascript"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 23 | $(document).ready(function() { searchBox.OnSelectItem(0); }); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 24 | </script> |
| 25 | <script type="text/x-mathjax-config"> |
| 26 | MathJax.Hub.Config({ |
| 27 | extensions: ["tex2jax.js"], |
| 28 | jax: ["input/TeX","output/HTML-CSS"], |
| 29 | }); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 30 | </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 31 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 32 | </head> |
| 33 | <body> |
| 34 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 35 | <div id="titlearea"> |
| 36 | <table cellspacing="0" cellpadding="0"> |
| 37 | <tbody> |
| 38 | <tr style="height: 56px;"> |
| 39 | <td style="padding-left: 0.5em;"> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 40 | <div id="projectname">Compute Library |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 41 |  <span id="projectnumber">17.10</span> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 42 | </div> |
| 43 | </td> |
| 44 | </tr> |
| 45 | </tbody> |
| 46 | </table> |
| 47 | </div> |
| 48 | <!-- end header part --> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 49 | <!-- Generated by Doxygen 1.8.6 --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 50 | <script type="text/javascript"> |
| 51 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 52 | </script> |
| 53 | <div id="navrow1" class="tabs"> |
| 54 | <ul class="tablist"> |
| 55 | <li><a href="index.xhtml"><span>Main Page</span></a></li> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 56 | <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 57 | <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| 58 | <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| 59 | <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| 60 | <li> |
| 61 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 62 | <span class="left"> |
| 63 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 64 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 65 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 66 | alt=""/> |
| 67 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 68 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 69 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 70 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 71 | </span><span class="right"> |
| 72 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 73 | </span> |
| 74 | </div> |
| 75 | </li> |
| 76 | </ul> |
| 77 | </div> |
| 78 | <div id="navrow2" class="tabs2"> |
| 79 | <ul class="tablist"> |
| 80 | <li><a href="files.xhtml"><span>File List</span></a></li> |
| 81 | <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| 82 | </ul> |
| 83 | </div> |
| 84 | </div><!-- top --> |
| 85 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 86 | <div id="nav-tree"> |
| 87 | <div id="nav-tree-contents"> |
| 88 | <div id="nav-sync" class="sync"></div> |
| 89 | </div> |
| 90 | </div> |
| 91 | <div id="splitbar" style="-moz-user-select:none;" |
| 92 | class="ui-resizable-handle"> |
| 93 | </div> |
| 94 | </div> |
| 95 | <script type="text/javascript"> |
| 96 | $(document).ready(function(){initNavTree('convolution3x3_8cl.xhtml','');}); |
| 97 | </script> |
| 98 | <div id="doc-content"> |
| 99 | <!-- window showing the filter options --> |
| 100 | <div id="MSearchSelectWindow" |
| 101 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 102 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 103 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 104 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 105 | |
| 106 | <!-- iframe showing the search results (closed by default) --> |
| 107 | <div id="MSearchResultsWindow"> |
| 108 | <iframe src="javascript:void(0)" frameborder="0" |
| 109 | name="MSearchResults" id="MSearchResults"> |
| 110 | </iframe> |
| 111 | </div> |
| 112 | |
| 113 | <div class="header"> |
| 114 | <div class="summary"> |
| 115 | <a href="#define-members">Macros</a> | |
| 116 | <a href="#func-members">Functions</a> </div> |
| 117 | <div class="headertitle"> |
| 118 | <div class="title">convolution3x3.cl File Reference</div> </div> |
| 119 | </div><!--header--> |
| 120 | <div class="contents"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 121 | <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 122 | </div> |
| 123 | <p><a href="convolution3x3_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| 124 | <table class="memberdecls"> |
| 125 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 126 | Macros</h2></td></tr> |
| 127 | <tr class="memitem:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>   short</td></tr> |
| 128 | <tr class="separator:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memSeparator" colspan="2"> </td></tr> |
| 129 | <tr class="memitem:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>   uchar</td></tr> |
| 130 | <tr class="separator:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | </table><table class="memberdecls"> |
| 132 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 133 | Functions</h2></td></tr> |
| 134 | <tr class="memitem:a92702074338198e81a46c3e309d9b04f"><td class="memItemLeft" align="right" valign="top">short8 </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 135 | <tr class="memdesc:a92702074338198e81a46c3e309d9b04f"><td class="mdescLeft"> </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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 136 | <tr class="separator:a92702074338198e81a46c3e309d9b04f"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:afc5fefe72e66f0ae5191fd5b708fade9"><td class="memItemLeft" align="right" valign="top">short8 </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 138 | <tr class="memdesc:afc5fefe72e66f0ae5191fd5b708fade9"><td class="mdescLeft"> </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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 139 | <tr class="separator:afc5fefe72e66f0ae5191fd5b708fade9"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <tr class="memitem:aa0b80492bb4faef0b052d95a8aa147e4"><td class="memItemLeft" align="right" valign="top">__kernel void </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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 141 | <tr class="memdesc:aa0b80492bb4faef0b052d95a8aa147e4"><td class="mdescLeft"> </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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 142 | <tr class="separator:aa0b80492bb4faef0b052d95a8aa147e4"><td class="memSeparator" colspan="2"> </td></tr> |
| 143 | </table> |
| 144 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 145 | <a class="anchor" id="afb8c72ce35c4a1f4a2588d6573e54aa1"></a> |
| 146 | <div class="memitem"> |
| 147 | <div class="memproto"> |
| 148 | <table class="memname"> |
| 149 | <tr> |
| 150 | <td class="memname">#define DATA_TYPE   short</td> |
| 151 | </tr> |
| 152 | </table> |
| 153 | </div><div class="memdoc"> |
| 154 | |
| 155 | <p>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> |
| 156 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 157 | <p>Referenced by <a class="el" href="activation__layer_8cl_source.xhtml#l00145">activation_layer()</a>, <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">batchnormalization_layer()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00080">bilinear_interpolate()</a>, <a class="el" href="concatenate_8cl_source.xhtml#l00046">concatenate_depth()</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="fill__border_8cl_source.xhtml#l00126">fill_image_borders_constant()</a>, <a class="el" href="fill__border_8cl_source.xhtml#l00050">fill_image_borders_replicate()</a>, <a class="el" href="floor_8cl_source.xhtml#l00049">floor_layer()</a>, <a class="el" href="gemv_8cl_source.xhtml#l00049">gemm_mv()</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="convolution__layer_8cl_source.xhtml#l00309">im2col_reduced()</a>, <a class="el" href="l2__normalize_8cl_source.xhtml#l00045">l2_normalize()</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#l00079">normalization_layer_cross_map()</a>, <a class="el" href="normalization__layer_8cl_source.xhtml#l00140">normalization_layer_in_map_1D()</a>, <a class="el" href="pooling__layer_8cl_source.xhtml#l00222">pooling_layer_2()</a>, <a class="el" href="pooling__layer_8cl_source.xhtml#l00286">pooling_layer_3()</a>, <a class="el" href="pooling__layer_8cl_source.xhtml#l00424">pooling_layer_7()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00045">read_texels4()</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00080">reduction_operation()</a>, <a class="el" href="reshape__layer_8cl_source.xhtml#l00049">reshape_layer()</a>, <a class="el" href="convolution__layer_8cl_source.xhtml#l00057">reshape_to_columns()</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#l00110">scale_bilinear()</a>, <a class="el" href="scale_8cl_source.xhtml#l00076">scale_nearest_neighbour()</a>, <a class="el" href="softmax__layer_8cl_source.xhtml#l00250">softmax_layer_norm()</a>, <a class="el" href="softmax__layer_8cl_source.xhtml#l00166">softmax_layer_shift_exp_sum()</a>, <a class="el" href="reduction__operation_8cl_source.xhtml#l00032">square_sum()</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="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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 158 | |
| 159 | </div> |
| 160 | </div> |
| 161 | <a class="anchor" id="ac06f3e24d3fffd3c465d8b2a6e7c985e"></a> |
| 162 | <div class="memitem"> |
| 163 | <div class="memproto"> |
| 164 | <table class="memname"> |
| 165 | <tr> |
| 166 | <td class="memname">#define DATA_TYPE_OUT   uchar</td> |
| 167 | </tr> |
| 168 | </table> |
| 169 | </div><div class="memdoc"> |
| 170 | |
| 171 | <p>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> |
| 172 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 173 | <p>Referenced by <a class="el" href="absdiff_8cl_source.xhtml#l00050">absdiff()</a>, <a class="el" href="arithmetic__op_8cl_source.xhtml#l00063">arithmetic_add()</a>, <a class="el" href="arithmetic__op_8cl_source.xhtml#l00108">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#l00074">convert_depth_down()</a>, <a class="el" href="depth__convert_8cl_source.xhtml#l00115">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>, <a class="el" href="pixelwise__mul__float_8cl_source.xhtml#l00067">pixelwise_mul_float()</a>, <a class="el" href="pixelwise__mul__int_8cl_source.xhtml#l00083">pixelwise_mul_int()</a>, and <a class="el" href="canny_8cl_source.xhtml#l00191">suppress_non_maximum()</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 174 | |
| 175 | </div> |
| 176 | </div> |
| 177 | <h2 class="groupheader">Function Documentation</h2> |
| 178 | <a class="anchor" id="a92702074338198e81a46c3e309d9b04f"></a> |
| 179 | <div class="memitem"> |
| 180 | <div class="memproto"> |
| 181 | <table class="mlabels"> |
| 182 | <tr> |
| 183 | <td class="mlabels-left"> |
| 184 | <table class="memname"> |
| 185 | <tr> |
| 186 | <td class="memname">short8 convolution1x3 </td> |
| 187 | <td>(</td> |
| 188 | <td class="paramtype">__global const uchar * </td> |
| 189 | <td class="paramname"><em>left_pixel</em>, </td> |
| 190 | </tr> |
| 191 | <tr> |
| 192 | <td class="paramkey"></td> |
| 193 | <td></td> |
| 194 | <td class="paramtype">const short </td> |
| 195 | <td class="paramname"><em>left_coeff</em>, </td> |
| 196 | </tr> |
| 197 | <tr> |
| 198 | <td class="paramkey"></td> |
| 199 | <td></td> |
| 200 | <td class="paramtype">const short </td> |
| 201 | <td class="paramname"><em>middle_coeff</em>, </td> |
| 202 | </tr> |
| 203 | <tr> |
| 204 | <td class="paramkey"></td> |
| 205 | <td></td> |
| 206 | <td class="paramtype">const short </td> |
| 207 | <td class="paramname"><em>right_coeff</em> </td> |
| 208 | </tr> |
| 209 | <tr> |
| 210 | <td></td> |
| 211 | <td>)</td> |
| 212 | <td></td><td></td> |
| 213 | </tr> |
| 214 | </table> |
| 215 | </td> |
| 216 | <td class="mlabels-right"> |
| 217 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 218 | </tr> |
| 219 | </table> |
| 220 | </div><div class="memdoc"> |
| 221 | |
| 222 | <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> |
| 223 | <dl class="params"><dt>Parameters</dt><dd> |
| 224 | <table class="params"> |
| 225 | <tr><td class="paramdir">[in]</td><td class="paramname">left_pixel</td><td>Pointer to the left pixel. </td></tr> |
| 226 | <tr><td class="paramdir">[in]</td><td class="paramname">left_coeff</td><td>Weight of the left pixel </td></tr> |
| 227 | <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr> |
| 228 | <tr><td class="paramdir">[in]</td><td class="paramname">right_coeff</td><td>Weight of the right pixel</td></tr> |
| 229 | </table> |
| 230 | </dd> |
| 231 | </dl> |
| 232 | <dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl> |
| 233 | |
| 234 | <p>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> |
| 235 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 236 | <p>References <a class="el" href="fixed__point_8h_source.xhtml#l00098">CONVERT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 237 | |
| 238 | <p>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> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 239 | <div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div> |
| 240 | <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  uchar16 temp = vload16(0, left_pixel);</div> |
| 241 | <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div> |
| 242 | <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  left = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s01234567, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8));</div> |
| 243 | <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div> |
| 244 | <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  middle = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s12345678, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div> |
| 245 | <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div> |
| 246 | <div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  right = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s23456789, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div> |
| 247 | <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div> |
| 248 | <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  return left * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left_coeff + middle * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))middle_coeff + right * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right_coeff;</div> |
| 249 | <div class="line"><a name="l00057"></a><span class="lineno"> 57</span> }</div> |
| 250 | <div class="ttc" id="fixed__point_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00098">fixed_point.h:98</a></div></div> |
| 251 | <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> |
| 252 | <div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 253 | </div><!-- fragment --> |
| 254 | </div> |
| 255 | </div> |
| 256 | <a class="anchor" id="afc5fefe72e66f0ae5191fd5b708fade9"></a> |
| 257 | <div class="memitem"> |
| 258 | <div class="memproto"> |
| 259 | <table class="mlabels"> |
| 260 | <tr> |
| 261 | <td class="mlabels-left"> |
| 262 | <table class="memname"> |
| 263 | <tr> |
| 264 | <td class="memname">short8 convolution3x3 </td> |
| 265 | <td>(</td> |
| 266 | <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> * </td> |
| 267 | <td class="paramname"><em>src</em>, </td> |
| 268 | </tr> |
| 269 | <tr> |
| 270 | <td class="paramkey"></td> |
| 271 | <td></td> |
| 272 | <td class="paramtype">const short </td> |
| 273 | <td class="paramname"><em>mat0</em>, </td> |
| 274 | </tr> |
| 275 | <tr> |
| 276 | <td class="paramkey"></td> |
| 277 | <td></td> |
| 278 | <td class="paramtype">const short </td> |
| 279 | <td class="paramname"><em>mat1</em>, </td> |
| 280 | </tr> |
| 281 | <tr> |
| 282 | <td class="paramkey"></td> |
| 283 | <td></td> |
| 284 | <td class="paramtype">const short </td> |
| 285 | <td class="paramname"><em>mat2</em>, </td> |
| 286 | </tr> |
| 287 | <tr> |
| 288 | <td class="paramkey"></td> |
| 289 | <td></td> |
| 290 | <td class="paramtype">const short </td> |
| 291 | <td class="paramname"><em>mat3</em>, </td> |
| 292 | </tr> |
| 293 | <tr> |
| 294 | <td class="paramkey"></td> |
| 295 | <td></td> |
| 296 | <td class="paramtype">const short </td> |
| 297 | <td class="paramname"><em>mat4</em>, </td> |
| 298 | </tr> |
| 299 | <tr> |
| 300 | <td class="paramkey"></td> |
| 301 | <td></td> |
| 302 | <td class="paramtype">const short </td> |
| 303 | <td class="paramname"><em>mat5</em>, </td> |
| 304 | </tr> |
| 305 | <tr> |
| 306 | <td class="paramkey"></td> |
| 307 | <td></td> |
| 308 | <td class="paramtype">const short </td> |
| 309 | <td class="paramname"><em>mat6</em>, </td> |
| 310 | </tr> |
| 311 | <tr> |
| 312 | <td class="paramkey"></td> |
| 313 | <td></td> |
| 314 | <td class="paramtype">const short </td> |
| 315 | <td class="paramname"><em>mat7</em>, </td> |
| 316 | </tr> |
| 317 | <tr> |
| 318 | <td class="paramkey"></td> |
| 319 | <td></td> |
| 320 | <td class="paramtype">const short </td> |
| 321 | <td class="paramname"><em>mat8</em>, </td> |
| 322 | </tr> |
| 323 | <tr> |
| 324 | <td class="paramkey"></td> |
| 325 | <td></td> |
| 326 | <td class="paramtype">uint </td> |
| 327 | <td class="paramname"><em>scale</em> </td> |
| 328 | </tr> |
| 329 | <tr> |
| 330 | <td></td> |
| 331 | <td>)</td> |
| 332 | <td></td><td></td> |
| 333 | </tr> |
| 334 | </table> |
| 335 | </td> |
| 336 | <td class="mlabels-right"> |
| 337 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 338 | </tr> |
| 339 | </table> |
| 340 | </div><div class="memdoc"> |
| 341 | |
| 342 | <p>Apply a 3x3 convolution matrix to a single channel U8 input image and return the result. </p> |
| 343 | <p>Convolution matrix layout:</p> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 344 | <p>[ mat0, mat1, mat2 ]<br/> |
| 345 | [ mat3, mat4, mat5 ]<br/> |
| 346 | [ mat6, mat7, mat8 ]<br/> |
| 347 | </p> |
| 348 | <dl class="params"><dt>Parameters</dt><dd> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 349 | <table class="params"> |
| 350 | <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> |
| 351 | <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr> |
| 352 | <tr><td class="paramdir">[in]</td><td class="paramname">mat1</td><td>Coefficient from the convolution matrix </td></tr> |
| 353 | <tr><td class="paramdir">[in]</td><td class="paramname">mat2</td><td>Coefficient from the convolution matrix </td></tr> |
| 354 | <tr><td class="paramdir">[in]</td><td class="paramname">mat3</td><td>Coefficient from the convolution matrix </td></tr> |
| 355 | <tr><td class="paramdir">[in]</td><td class="paramname">mat4</td><td>Coefficient from the convolution matrix </td></tr> |
| 356 | <tr><td class="paramdir">[in]</td><td class="paramname">mat5</td><td>Coefficient from the convolution matrix </td></tr> |
| 357 | <tr><td class="paramdir">[in]</td><td class="paramname">mat6</td><td>Coefficient from the convolution matrix </td></tr> |
| 358 | <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr> |
| 359 | <tr><td class="paramdir">[in]</td><td class="paramname">mat7</td><td>Coefficient from the convolution matrix </td></tr> |
| 360 | <tr><td class="paramdir">[in]</td><td class="paramname">mat8</td><td>Coefficient from the convolution matrix </td></tr> |
| 361 | <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> |
| 362 | </table> |
| 363 | </dd> |
| 364 | </dl> |
| 365 | <dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted and scaled values. </dd></dl> |
| 366 | |
| 367 | <p>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> |
| 368 | |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 369 | <p>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="helpers_8h_source.xhtml#l00295">offset()</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 370 | |
| 371 | <p>Referenced by <a class="el" href="convolution3x3_8cl_source.xhtml#l00123">convolution3x3_static()</a>.</p> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 372 | <div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> {</div> |
| 373 | <div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="comment">// Output pixels</span></div> |
| 374 | <div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div> |
| 375 | <div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  pixels;</div> |
| 376 | <div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div> |
| 377 | <div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="comment">// Row 0</span></div> |
| 378 | <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  pixels = <a class="code" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -1, -1), mat0, mat1, mat2);</div> |
| 379 | <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">// Row</span></div> |
| 380 | <div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  pixels += <a class="code" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -1, 0), mat3, mat4, mat5);</div> |
| 381 | <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">// Row 2</span></div> |
| 382 | <div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  pixels += <a class="code" href="convolution3x3_8cl.xhtml#a92702074338198e81a46c3e309d9b04f">convolution1x3</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -1, 1), mat6, mat7, mat8);</div> |
| 383 | <div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div> |
| 384 | <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="comment">// Divide by the scale</span></div> |
| 385 | <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  return pixels / (<a class="code" href="fixed__point_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_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">scale</a>;</div> |
| 386 | <div class="line"><a name="l00101"></a><span class="lineno"> 101</span> }</div> |
| 387 | <div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 388 | <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#l00295">helpers.h:295</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 389 | <div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div> |
| 390 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a2c08fc82f2e4b9733cd0dacd6eabe579"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">arm_compute::test::validation::reference::scale</a></div><div class="ttdeci">SimpleTensor< T > scale(const SimpleTensor< T > &in, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value)</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_scale_8cpp_source.xhtml#l00039">Scale.cpp:39</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 391 | <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> |
| 392 | </div><!-- fragment --> |
| 393 | </div> |
| 394 | </div> |
| 395 | <a class="anchor" id="aa0b80492bb4faef0b052d95a8aa147e4"></a> |
| 396 | <div class="memitem"> |
| 397 | <div class="memproto"> |
| 398 | <table class="memname"> |
| 399 | <tr> |
| 400 | <td class="memname">__kernel void convolution3x3_static </td> |
| 401 | <td>(</td> |
| 402 | <td class="paramtype">__global uchar * </td> |
| 403 | <td class="paramname"><em>src_ptr</em>, </td> |
| 404 | </tr> |
| 405 | <tr> |
| 406 | <td class="paramkey"></td> |
| 407 | <td></td> |
| 408 | <td class="paramtype">uint </td> |
| 409 | <td class="paramname"><em>src_stride_x</em>, </td> |
| 410 | </tr> |
| 411 | <tr> |
| 412 | <td class="paramkey"></td> |
| 413 | <td></td> |
| 414 | <td class="paramtype">uint </td> |
| 415 | <td class="paramname"><em>src_step_x</em>, </td> |
| 416 | </tr> |
| 417 | <tr> |
| 418 | <td class="paramkey"></td> |
| 419 | <td></td> |
| 420 | <td class="paramtype">uint </td> |
| 421 | <td class="paramname"><em>src_stride_y</em>, </td> |
| 422 | </tr> |
| 423 | <tr> |
| 424 | <td class="paramkey"></td> |
| 425 | <td></td> |
| 426 | <td class="paramtype">uint </td> |
| 427 | <td class="paramname"><em>src_step_y</em>, </td> |
| 428 | </tr> |
| 429 | <tr> |
| 430 | <td class="paramkey"></td> |
| 431 | <td></td> |
| 432 | <td class="paramtype">uint </td> |
| 433 | <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| 434 | </tr> |
| 435 | <tr> |
| 436 | <td class="paramkey"></td> |
| 437 | <td></td> |
| 438 | <td class="paramtype">__global uchar * </td> |
| 439 | <td class="paramname"><em>dst_ptr</em>, </td> |
| 440 | </tr> |
| 441 | <tr> |
| 442 | <td class="paramkey"></td> |
| 443 | <td></td> |
| 444 | <td class="paramtype">uint </td> |
| 445 | <td class="paramname"><em>dst_stride_x</em>, </td> |
| 446 | </tr> |
| 447 | <tr> |
| 448 | <td class="paramkey"></td> |
| 449 | <td></td> |
| 450 | <td class="paramtype">uint </td> |
| 451 | <td class="paramname"><em>dst_step_x</em>, </td> |
| 452 | </tr> |
| 453 | <tr> |
| 454 | <td class="paramkey"></td> |
| 455 | <td></td> |
| 456 | <td class="paramtype">uint </td> |
| 457 | <td class="paramname"><em>dst_stride_y</em>, </td> |
| 458 | </tr> |
| 459 | <tr> |
| 460 | <td class="paramkey"></td> |
| 461 | <td></td> |
| 462 | <td class="paramtype">uint </td> |
| 463 | <td class="paramname"><em>dst_step_y</em>, </td> |
| 464 | </tr> |
| 465 | <tr> |
| 466 | <td class="paramkey"></td> |
| 467 | <td></td> |
| 468 | <td class="paramtype">uint </td> |
| 469 | <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| 470 | </tr> |
| 471 | <tr> |
| 472 | <td></td> |
| 473 | <td>)</td> |
| 474 | <td></td><td></td> |
| 475 | </tr> |
| 476 | </table> |
| 477 | </div><div class="memdoc"> |
| 478 | |
| 479 | <p>Apply a 3x3 static convolution matrix to a single channel U8 input image and output a single channel image. </p> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 480 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 481 | e.g. -DMAT0=1 -DMAT2=2, ...-DMAT8=8, -DSCALE=1, -DDATA_TYPE=int, -DDATA_TYPE_OUT=int</dd></dl> |
| 482 | <dl class="params"><dt>Parameters</dt><dd> |
| 483 | <table class="params"> |
| 484 | <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image </td></tr> |
| 485 | <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> |
| 486 | <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> |
| 487 | <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> |
| 488 | <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> |
| 489 | <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> |
| 490 | <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> |
| 491 | <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> |
| 492 | <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> |
| 493 | <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> |
| 494 | <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> |
| 495 | <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> |
| 496 | </table> |
| 497 | </dd> |
| 498 | </dl> |
| 499 | |
| 500 | <p>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> |
| 501 | |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 502 | <p>References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">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="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 503 | <div class="fragment"><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> {</div> |
| 504 | <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <a class="code" href="struct_image.xhtml">Image</a> src = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div> |
| 505 | <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="struct_image.xhtml">Image</a> dst = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div> |
| 506 | <div class="line"><a name="l00129"></a><span class="lineno"> 129</span> </div> |
| 507 | <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div> |
| 508 | <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  pixels = <a class="code" href="convolution3x3_8cl.xhtml#afc5fefe72e66f0ae5191fd5b708fade9">convolution3x3</a>(&src,</div> |
| 509 | <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8, SCALE);</div> |
| 510 | <div class="line"><a name="l00133"></a><span class="lineno"> 133</span> </div> |
| 511 | <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="comment">// Store the result as is in dst</span></div> |
| 512 | <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  vstore8(<a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>(pixels, <a class="code" href="fixed__point_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> |
| 513 | <div class="line"><a name="l00136"></a><span class="lineno"> 136</span> }</div> |
| 514 | <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> |
| 515 | <div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00040">direct_convolution1x1.cl:40</a></div></div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 516 | <div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00096">helpers.h:96</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 517 | <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> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 518 | <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00134">helpers.h:134</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 519 | <div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 520 | <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> |
| 521 | </div><!-- fragment --> |
| 522 | </div> |
| 523 | </div> |
| 524 | </div><!-- contents --> |
| 525 | </div><!-- doc-content --> |
| 526 | <!-- start footer part --> |
| 527 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 528 | <ul> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 529 | <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="convolution3x3_8cl.xhtml">convolution3x3.cl</a></li> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 530 | <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 531 | <a href="http://www.doxygen.org/index.html"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 532 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 533 | </ul> |
| 534 | </div> |
| 535 | </body> |
| 536 | </html> |