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/tablelookup.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 | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 41 |  <span id="projectnumber">17.09</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('tablelookup_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="#func-members">Functions</a> </div> |
| 116 | <div class="headertitle"> |
| 117 | <div class="title">tablelookup.cl File Reference</div> </div> |
| 118 | </div><!--header--> |
| 119 | <div class="contents"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 120 | <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] | 121 | </div> |
| 122 | <p><a href="tablelookup_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| 123 | <table class="memberdecls"> |
| 124 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 125 | Functions</h2></td></tr> |
| 126 | <tr class="memitem:ad64728d0b577942fb98aca553bca7f77"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="tablelookup_8cl.xhtml#ad64728d0b577942fb98aca553bca7f77">tablelookup_U8</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, __global uchar *lut)</td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 127 | <tr class="memdesc:ad64728d0b577942fb98aca553bca7f77"><td class="mdescLeft"> </td><td class="mdescRight">This function performs table lookup on U8 input/output images. <a href="#ad64728d0b577942fb98aca553bca7f77">More...</a><br/></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 128 | <tr class="separator:ad64728d0b577942fb98aca553bca7f77"><td class="memSeparator" colspan="2"> </td></tr> |
| 129 | <tr class="memitem:ad175448ea70f6a23e63b6d68f09d5f61"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="tablelookup_8cl.xhtml#ad175448ea70f6a23e63b6d68f09d5f61">tablelookup_S16</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, __global short *lut, uint <a class="el" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>, uint count)</td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 130 | <tr class="memdesc:ad175448ea70f6a23e63b6d68f09d5f61"><td class="mdescLeft"> </td><td class="mdescRight">This function performs table lookup on S16 input/output images. <a href="#ad175448ea70f6a23e63b6d68f09d5f61">More...</a><br/></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 131 | <tr class="separator:ad175448ea70f6a23e63b6d68f09d5f61"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | </table> |
| 133 | <h2 class="groupheader">Function Documentation</h2> |
| 134 | <a class="anchor" id="ad175448ea70f6a23e63b6d68f09d5f61"></a> |
| 135 | <div class="memitem"> |
| 136 | <div class="memproto"> |
| 137 | <table class="memname"> |
| 138 | <tr> |
| 139 | <td class="memname">__kernel void tablelookup_S16 </td> |
| 140 | <td>(</td> |
| 141 | <td class="paramtype">__global uchar * </td> |
| 142 | <td class="paramname"><em>src_ptr</em>, </td> |
| 143 | </tr> |
| 144 | <tr> |
| 145 | <td class="paramkey"></td> |
| 146 | <td></td> |
| 147 | <td class="paramtype">uint </td> |
| 148 | <td class="paramname"><em>src_stride_x</em>, </td> |
| 149 | </tr> |
| 150 | <tr> |
| 151 | <td class="paramkey"></td> |
| 152 | <td></td> |
| 153 | <td class="paramtype">uint </td> |
| 154 | <td class="paramname"><em>src_step_x</em>, </td> |
| 155 | </tr> |
| 156 | <tr> |
| 157 | <td class="paramkey"></td> |
| 158 | <td></td> |
| 159 | <td class="paramtype">uint </td> |
| 160 | <td class="paramname"><em>src_stride_y</em>, </td> |
| 161 | </tr> |
| 162 | <tr> |
| 163 | <td class="paramkey"></td> |
| 164 | <td></td> |
| 165 | <td class="paramtype">uint </td> |
| 166 | <td class="paramname"><em>src_step_y</em>, </td> |
| 167 | </tr> |
| 168 | <tr> |
| 169 | <td class="paramkey"></td> |
| 170 | <td></td> |
| 171 | <td class="paramtype">uint </td> |
| 172 | <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| 173 | </tr> |
| 174 | <tr> |
| 175 | <td class="paramkey"></td> |
| 176 | <td></td> |
| 177 | <td class="paramtype">__global uchar * </td> |
| 178 | <td class="paramname"><em>dst_ptr</em>, </td> |
| 179 | </tr> |
| 180 | <tr> |
| 181 | <td class="paramkey"></td> |
| 182 | <td></td> |
| 183 | <td class="paramtype">uint </td> |
| 184 | <td class="paramname"><em>dst_stride_x</em>, </td> |
| 185 | </tr> |
| 186 | <tr> |
| 187 | <td class="paramkey"></td> |
| 188 | <td></td> |
| 189 | <td class="paramtype">uint </td> |
| 190 | <td class="paramname"><em>dst_step_x</em>, </td> |
| 191 | </tr> |
| 192 | <tr> |
| 193 | <td class="paramkey"></td> |
| 194 | <td></td> |
| 195 | <td class="paramtype">uint </td> |
| 196 | <td class="paramname"><em>dst_stride_y</em>, </td> |
| 197 | </tr> |
| 198 | <tr> |
| 199 | <td class="paramkey"></td> |
| 200 | <td></td> |
| 201 | <td class="paramtype">uint </td> |
| 202 | <td class="paramname"><em>dst_step_y</em>, </td> |
| 203 | </tr> |
| 204 | <tr> |
| 205 | <td class="paramkey"></td> |
| 206 | <td></td> |
| 207 | <td class="paramtype">uint </td> |
| 208 | <td class="paramname"><em>dst_offset_first_element_in_bytes</em>, </td> |
| 209 | </tr> |
| 210 | <tr> |
| 211 | <td class="paramkey"></td> |
| 212 | <td></td> |
| 213 | <td class="paramtype">__global short * </td> |
| 214 | <td class="paramname"><em>lut</em>, </td> |
| 215 | </tr> |
| 216 | <tr> |
| 217 | <td class="paramkey"></td> |
| 218 | <td></td> |
| 219 | <td class="paramtype">uint </td> |
| 220 | <td class="paramname"><em>offset</em>, </td> |
| 221 | </tr> |
| 222 | <tr> |
| 223 | <td class="paramkey"></td> |
| 224 | <td></td> |
| 225 | <td class="paramtype">uint </td> |
| 226 | <td class="paramname"><em>count</em> </td> |
| 227 | </tr> |
| 228 | <tr> |
| 229 | <td></td> |
| 230 | <td>)</td> |
| 231 | <td></td><td></td> |
| 232 | </tr> |
| 233 | </table> |
| 234 | </div><div class="memdoc"> |
| 235 | |
| 236 | <p>This function performs table lookup on S16 input/output images. </p> |
| 237 | <p>Global Workgroup Size [ DIV_CEIL(width, 8), height ]</p> |
| 238 | <dl class="params"><dt>Parameters</dt><dd> |
| 239 | <table class="params"> |
| 240 | <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: S16 </td></tr> |
| 241 | <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> |
| 242 | <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> |
| 243 | <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> |
| 244 | <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> |
| 245 | <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> |
| 246 | <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported data types: S16 </td></tr> |
| 247 | <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> |
| 248 | <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> |
| 249 | <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> |
| 250 | <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> |
| 251 | <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> |
| 252 | <tr><td class="paramdir">[in]</td><td class="paramname">lut</td><td>LUT table. Supported data types: S16 </td></tr> |
| 253 | <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>LUT offset </td></tr> |
| 254 | <tr><td class="paramdir">[in]</td><td class="paramname">count</td><td>Number of elements in the LUT </td></tr> |
| 255 | </table> |
| 256 | </dd> |
| 257 | </dl> |
| 258 | |
| 259 | <p>Definition at line <a class="el" href="tablelookup_8cl_source.xhtml#l00084">84</a> of file <a class="el" href="tablelookup_8cl_source.xhtml">tablelookup.cl</a>.</p> |
| 260 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 261 | <p>References <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>.</p> |
| 262 | <div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> {</div> |
| 263 | <div class="line"><a name="l00091"></a><span class="lineno"> 91</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> |
| 264 | <div class="line"><a name="l00092"></a><span class="lineno"> 92</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> |
| 265 | <div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div> |
| 266 | <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">/* Load input data */</span></div> |
| 267 | <div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  short8 data = vload8(0, (__global <span class="keywordtype">short</span> *)src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div> |
| 268 | <div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div> |
| 269 | <div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">/* Load output data */</span></div> |
| 270 | <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  int8 out_data = convert_int8(vload8(0, (__global <span class="keywordtype">short</span> *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>));</div> |
| 271 | <div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div> |
| 272 | <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="comment">/* Calculate index */</span></div> |
| 273 | <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  int8 index = convert_int8(data) + (int8)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>);</div> |
| 274 | <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  int8 cond = (index >= 0 && index < (int8)count);</div> |
| 275 | <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  index = select(0, index, cond);</div> |
| 276 | <div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div> |
| 277 | <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="comment">/* Load lut data */</span></div> |
| 278 | <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  int8 lut_data = (int8)(lut[index.s0], lut[index.s1], lut[index.s2], lut[index.s3],</div> |
| 279 | <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  lut[index.s4], lut[index.s5], lut[index.s6], lut[index.s7]);</div> |
| 280 | <div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div> |
| 281 | <div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="comment">/* Select output data depending on condition */</span></div> |
| 282 | <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  lut_data = select(out_data, lut_data, cond);</div> |
| 283 | <div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div> |
| 284 | <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="comment">/* Store result */</span></div> |
| 285 | <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  vstore8(convert_short8(lut_data), 0, (__global <span class="keywordtype">short</span> *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div> |
| 286 | <div class="line"><a name="l00114"></a><span class="lineno"> 114</span> }</div> |
| 287 | <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#l00292">helpers.h:292</a></div></div> |
| 288 | <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#l00093">helpers.h:93</a></div></div> |
| 289 | <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#l00131">helpers.h:131</a></div></div> |
| 290 | <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00133">helpers.h:133</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 291 | </div><!-- fragment --> |
| 292 | </div> |
| 293 | </div> |
| 294 | <a class="anchor" id="ad64728d0b577942fb98aca553bca7f77"></a> |
| 295 | <div class="memitem"> |
| 296 | <div class="memproto"> |
| 297 | <table class="memname"> |
| 298 | <tr> |
| 299 | <td class="memname">__kernel void tablelookup_U8 </td> |
| 300 | <td>(</td> |
| 301 | <td class="paramtype">__global uchar * </td> |
| 302 | <td class="paramname"><em>src_ptr</em>, </td> |
| 303 | </tr> |
| 304 | <tr> |
| 305 | <td class="paramkey"></td> |
| 306 | <td></td> |
| 307 | <td class="paramtype">uint </td> |
| 308 | <td class="paramname"><em>src_stride_x</em>, </td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td class="paramkey"></td> |
| 312 | <td></td> |
| 313 | <td class="paramtype">uint </td> |
| 314 | <td class="paramname"><em>src_step_x</em>, </td> |
| 315 | </tr> |
| 316 | <tr> |
| 317 | <td class="paramkey"></td> |
| 318 | <td></td> |
| 319 | <td class="paramtype">uint </td> |
| 320 | <td class="paramname"><em>src_stride_y</em>, </td> |
| 321 | </tr> |
| 322 | <tr> |
| 323 | <td class="paramkey"></td> |
| 324 | <td></td> |
| 325 | <td class="paramtype">uint </td> |
| 326 | <td class="paramname"><em>src_step_y</em>, </td> |
| 327 | </tr> |
| 328 | <tr> |
| 329 | <td class="paramkey"></td> |
| 330 | <td></td> |
| 331 | <td class="paramtype">uint </td> |
| 332 | <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| 333 | </tr> |
| 334 | <tr> |
| 335 | <td class="paramkey"></td> |
| 336 | <td></td> |
| 337 | <td class="paramtype">__global uchar * </td> |
| 338 | <td class="paramname"><em>dst_ptr</em>, </td> |
| 339 | </tr> |
| 340 | <tr> |
| 341 | <td class="paramkey"></td> |
| 342 | <td></td> |
| 343 | <td class="paramtype">uint </td> |
| 344 | <td class="paramname"><em>dst_stride_x</em>, </td> |
| 345 | </tr> |
| 346 | <tr> |
| 347 | <td class="paramkey"></td> |
| 348 | <td></td> |
| 349 | <td class="paramtype">uint </td> |
| 350 | <td class="paramname"><em>dst_step_x</em>, </td> |
| 351 | </tr> |
| 352 | <tr> |
| 353 | <td class="paramkey"></td> |
| 354 | <td></td> |
| 355 | <td class="paramtype">uint </td> |
| 356 | <td class="paramname"><em>dst_stride_y</em>, </td> |
| 357 | </tr> |
| 358 | <tr> |
| 359 | <td class="paramkey"></td> |
| 360 | <td></td> |
| 361 | <td class="paramtype">uint </td> |
| 362 | <td class="paramname"><em>dst_step_y</em>, </td> |
| 363 | </tr> |
| 364 | <tr> |
| 365 | <td class="paramkey"></td> |
| 366 | <td></td> |
| 367 | <td class="paramtype">uint </td> |
| 368 | <td class="paramname"><em>dst_offset_first_element_in_bytes</em>, </td> |
| 369 | </tr> |
| 370 | <tr> |
| 371 | <td class="paramkey"></td> |
| 372 | <td></td> |
| 373 | <td class="paramtype">__global uchar * </td> |
| 374 | <td class="paramname"><em>lut</em> </td> |
| 375 | </tr> |
| 376 | <tr> |
| 377 | <td></td> |
| 378 | <td>)</td> |
| 379 | <td></td><td></td> |
| 380 | </tr> |
| 381 | </table> |
| 382 | </div><div class="memdoc"> |
| 383 | |
| 384 | <p>This function performs table lookup on U8 input/output images. </p> |
| 385 | <p>Global Workgroup Size [ DIV_CEIL(width, 8), height ]</p> |
| 386 | <dl class="params"><dt>Parameters</dt><dd> |
| 387 | <table class="params"> |
| 388 | <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr> |
| 389 | <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> |
| 390 | <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> |
| 391 | <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> |
| 392 | <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> |
| 393 | <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> |
| 394 | <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported data types: U8 </td></tr> |
| 395 | <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> |
| 396 | <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> |
| 397 | <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> |
| 398 | <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> |
| 399 | <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> |
| 400 | <tr><td class="paramdir">[in]</td><td class="paramname">lut</td><td>LUT table. Supported data types: U8 </td></tr> |
| 401 | </table> |
| 402 | </dd> |
| 403 | </dl> |
| 404 | |
| 405 | <p>Definition at line <a class="el" href="tablelookup_8cl_source.xhtml#l00045">45</a> of file <a class="el" href="tablelookup_8cl_source.xhtml">tablelookup.cl</a>.</p> |
| 406 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 407 | <p>References <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>.</p> |
| 408 | <div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> {</div> |
| 409 | <div class="line"><a name="l00050"></a><span class="lineno"> 50</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> |
| 410 | <div class="line"><a name="l00051"></a><span class="lineno"> 51</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> |
| 411 | <div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div> |
| 412 | <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">/* Load input data */</span></div> |
| 413 | <div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  uchar8 data = vload8(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div> |
| 414 | <div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div> |
| 415 | <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="comment">/* Load lut data */</span></div> |
| 416 | <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  uchar8 lut_data = (uchar8)(lut[data.s0], lut[data.s1], lut[data.s2], lut[data.s3],</div> |
| 417 | <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  lut[data.s4], lut[data.s5], lut[data.s6], lut[data.s7]);</div> |
| 418 | <div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div> |
| 419 | <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">/* Store result */</span></div> |
| 420 | <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  vstore8(lut_data, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div> |
| 421 | <div class="line"><a name="l00062"></a><span class="lineno"> 62</span> }</div> |
| 422 | <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#l00093">helpers.h:93</a></div></div> |
| 423 | <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#l00131">helpers.h:131</a></div></div> |
| 424 | <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00133">helpers.h:133</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 425 | </div><!-- fragment --> |
| 426 | </div> |
| 427 | </div> |
| 428 | </div><!-- contents --> |
| 429 | </div><!-- doc-content --> |
| 430 | <!-- start footer part --> |
| 431 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 432 | <ul> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 433 | <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="tablelookup_8cl.xhtml">tablelookup.cl</a></li> |
| 434 | <li class="footer">Generated on Thu Sep 28 2017 14:37:54 for Compute Library by |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 435 | <a href="http://www.doxygen.org/index.html"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame^] | 436 | <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] | 437 | </ul> |
| 438 | </div> |
| 439 | </body> |
| 440 | </html> |