blob: 736e136155468d35536c6e82cef701dea6c9cbbf [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"/>
Kaizen8938bd32017-09-28 14:38:23 +01007<meta name="generator" content="Doxygen 1.8.6"/>
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/tablelookup.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 Barbier871448e2017-03-24 14:54:29 +000015<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 Barbier871448e2017-03-24 14:54:29 +000021<script type="text/javascript" src="search/search.js"></script>
22<script type="text/javascript">
Kaizen8938bd32017-09-28 14:38:23 +010023 $(document).ready(function() { searchBox.OnSelectItem(0); });
Anthony Barbier871448e2017-03-24 14:54:29 +000024</script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Kaizen8938bd32017-09-28 14:38:23 +010030</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000031<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 Barbierdbdab852017-06-23 15:42:00 +010040 <div id="projectname">Compute Library
Kaizen8938bd32017-09-28 14:38:23 +010041 &#160;<span id="projectnumber">17.09</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000042 </div>
43 </td>
44 </tr>
45 </tbody>
46</table>
47</div>
48<!-- end header part -->
Kaizen8938bd32017-09-28 14:38:23 +010049<!-- Generated by Doxygen 1.8.6 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000050<script type="text/javascript">
51var 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&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010056 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000057 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li><a href="annotated.xhtml"><span>Data&#160;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&#160;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)">
Kaizen8938bd32017-09-28 14:38:23 +0100104<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000105
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">
Kaizen8938bd32017-09-28 14:38:23 +0100120<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br/>
Anthony Barbier871448e2017-03-24 14:54:29 +0000121</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>
125Functions</h2></td></tr>
126<tr class="memitem:ad64728d0b577942fb98aca553bca7f77"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</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>
Kaizen8938bd32017-09-28 14:38:23 +0100127<tr class="memdesc:ad64728d0b577942fb98aca553bca7f77"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs table lookup on U8 input/output images. <a href="#ad64728d0b577942fb98aca553bca7f77">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000128<tr class="separator:ad64728d0b577942fb98aca553bca7f77"><td class="memSeparator" colspan="2">&#160;</td></tr>
129<tr class="memitem:ad175448ea70f6a23e63b6d68f09d5f61"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</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>
Kaizen8938bd32017-09-28 14:38:23 +0100130<tr class="memdesc:ad175448ea70f6a23e63b6d68f09d5f61"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs table lookup on S16 input/output images. <a href="#ad175448ea70f6a23e63b6d68f09d5f61">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000131<tr class="separator:ad175448ea70f6a23e63b6d68f09d5f61"><td class="memSeparator" colspan="2">&#160;</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 *&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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 *&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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 *&#160;</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&#160;</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&#160;</td>
226 <td class="paramname"><em>count</em>&#160;</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
Kaizen8938bd32017-09-28 14:38:23 +0100261<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>&#160;{</div>
263<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <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>&#160; <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>&#160;</div>
266<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="comment">/* Load input data */</span></div>
267<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; 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>&#160;</div>
269<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="comment">/* Load output data */</span></div>
270<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; 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>&#160;</div>
272<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">/* Calculate index */</span></div>
273<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; 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>&#160; int8 cond = (index &gt;= 0 &amp;&amp; index &lt; (int8)count);</div>
275<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; index = select(0, index, cond);</div>
276<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div>
277<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">/* Load lut data */</span></div>
278<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; 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>&#160; 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>&#160;</div>
281<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="comment">/* Select output data depending on condition */</span></div>
282<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; lut_data = select(out_data, lut_data, cond);</div>
283<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
284<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">/* Store result */</span></div>
285<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; 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>&#160;}</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 Barbier871448e2017-03-24 14:54:29 +0000291</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 *&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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 *&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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&#160;</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 *&#160;</td>
374 <td class="paramname"><em>lut</em>&#160;</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
Kaizen8938bd32017-09-28 14:38:23 +0100407<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>&#160;{</div>
409<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <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>&#160; <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>&#160;</div>
412<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="comment">/* Load input data */</span></div>
413<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; 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>&#160;</div>
415<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="comment">/* Load lut data */</span></div>
416<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; 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>&#160; 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>&#160;</div>
419<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="comment">/* Store result */</span></div>
420<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; 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>&#160;}</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 Barbier871448e2017-03-24 14:54:29 +0000425</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>
Kaizen8938bd32017-09-28 14:38:23 +0100433 <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 Barbier871448e2017-03-24 14:54:29 +0000435 <a href="http://www.doxygen.org/index.html">
Kaizen8938bd32017-09-28 14:38:23 +0100436 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000437 </ul>
438</div>
439</body>
440</html>