blob: 6b254aad798ba32b1a7590f53b3462fe150d3c2d [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"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +00007<meta name="generator" content="Doxygen 1.8.11"/>
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/gemm.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000015<script type="text/javascript" src="navtreedata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000016<script type="text/javascript" src="navtree.js"></script>
17<script type="text/javascript">
18 $(document).ready(initResizable);
19 $(window).load(resizeHeight);
20</script>
21<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier8140e1e2017-12-14 23:48:46 +000022<script type="text/javascript" src="search/searchdata.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000023<script type="text/javascript" src="search/search.js"></script>
24<script type="text/javascript">
Anthony Barbier8140e1e2017-12-14 23:48:46 +000025 $(document).ready(function() { init_search(); });
Anthony Barbier871448e2017-03-24 14:54:29 +000026</script>
27<script type="text/x-mathjax-config">
28 MathJax.Hub.Config({
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
31});
Anthony Barbier8140e1e2017-12-14 23:48:46 +000032</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000033<link href="doxygen.css" rel="stylesheet" type="text/css" />
34</head>
35<body>
36<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37<div id="titlearea">
38<table cellspacing="0" cellpadding="0">
39 <tbody>
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010042 <div id="projectname">Compute Library
Anthony Barbierf45d5a92018-01-24 16:23:15 +000043 &#160;<span id="projectnumber">18.01</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
Anthony Barbier8140e1e2017-12-14 23:48:46 +000051<!-- Generated by Doxygen 1.8.11 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000052<script type="text/javascript">
53var searchBox = new SearchBox("searchBox", "search",false,'Search');
54</script>
55 <div id="navrow1" class="tabs">
56 <ul class="tablist">
57 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010058 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000059 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
61 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62 <li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
64 <span class="left">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 alt=""/>
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75 </span>
76 </div>
77 </li>
78 </ul>
79 </div>
80 <div id="navrow2" class="tabs2">
81 <ul class="tablist">
82 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
83 <li><a href="globals.xhtml"><span>Globals</span></a></li>
84 </ul>
85 </div>
86</div><!-- top -->
87<div id="side-nav" class="ui-resizable side-nav-resizable">
88 <div id="nav-tree">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
91 </div>
92 </div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
95 </div>
96</div>
97<script type="text/javascript">
98$(document).ready(function(){initNavTree('gemm_8cl.xhtml','');});
99</script>
100<div id="doc-content">
101<!-- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000106</div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="javascript:void(0)" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<div class="header">
116 <div class="summary">
117<a href="#func-members">Functions</a> </div>
118 <div class="headertitle">
119<div class="title">gemm.cl File Reference</div> </div>
120</div><!--header-->
121<div class="contents">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000122<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 +0000123</div>
124<p><a href="gemm_8cl_source.xhtml">Go to the source code of this file.</a></p>
125<table class="memberdecls">
126<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
127Functions</h2></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100128<tr class="memitem:ac5eba21b9ac015e1454044aeba93546c"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gemm_8cl.xhtml#ac5eba21b9ac015e1454044aeba93546c">gemm_transpose1x4</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000129<tr class="memdesc:ac5eba21b9ac015e1454044aeba93546c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This OpenCL kernel computes the "vector" 1x4 transposition of input matrix. <a href="#ac5eba21b9ac015e1454044aeba93546c">More...</a><br /></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100130<tr class="separator:ac5eba21b9ac015e1454044aeba93546c"><td class="memSeparator" colspan="2">&#160;</td></tr>
131<tr class="memitem:a75c35ac120f123e9cce56c43ba3f48d2"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gemm_8cl.xhtml#a75c35ac120f123e9cce56c43ba3f48d2">gemm_transpose1x8</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000132<tr class="memdesc:a75c35ac120f123e9cce56c43ba3f48d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">This OpenCL kernel computes the "vector" 1x8 transposition of input matrix. <a href="#a75c35ac120f123e9cce56c43ba3f48d2">More...</a><br /></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100133<tr class="separator:a75c35ac120f123e9cce56c43ba3f48d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
134<tr class="memitem:a97a299ffb620aa98fe5e39bb8ab0833f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gemm_8cl.xhtml#a97a299ffb620aa98fe5e39bb8ab0833f">gemm_transpose1x16</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000135<tr class="memdesc:a97a299ffb620aa98fe5e39bb8ab0833f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This OpenCL kernel computes the "vector" 1x16 transposition of input matrix. <a href="#a97a299ffb620aa98fe5e39bb8ab0833f">More...</a><br /></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100136<tr class="separator:a97a299ffb620aa98fe5e39bb8ab0833f"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100137<tr class="memitem:a560b2d50aa886edc0f5daf4fe729717f"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gemm_8cl.xhtml#a560b2d50aa886edc0f5daf4fe729717f">gemm_interleave4x4_32bit</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000138<tr class="memdesc:a560b2d50aa886edc0f5daf4fe729717f"><td class="mdescLeft">&#160;</td><td class="mdescRight">This OpenCL kernel reshapes the input matrix transposing each 4x4 block and interleaving the values. <a href="#a560b2d50aa886edc0f5daf4fe729717f">More...</a><br /></td></tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100139<tr class="separator:a560b2d50aa886edc0f5daf4fe729717f"><td class="memSeparator" colspan="2">&#160;</td></tr>
140<tr class="memitem:a2f32d740e780059f68da8aa589ed0a5b"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gemm_8cl.xhtml#a2f32d740e780059f68da8aa589ed0a5b">gemm_interleave4x4_16bit</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000141<tr class="memdesc:a2f32d740e780059f68da8aa589ed0a5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This OpenCL kernel reshapes the input matrix transposing each 4x4 block and interleaving the values. <a href="#a2f32d740e780059f68da8aa589ed0a5b">More...</a><br /></td></tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100142<tr class="separator:a2f32d740e780059f68da8aa589ed0a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
143<tr class="memitem:aa66a7b6b0420e54ec173743e6c5bfc45"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="gemm_8cl.xhtml#aa66a7b6b0420e54ec173743e6c5bfc45">gemm_interleave4x4_8bit</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000144<tr class="memdesc:aa66a7b6b0420e54ec173743e6c5bfc45"><td class="mdescLeft">&#160;</td><td class="mdescRight">This OpenCL kernel reshapes the input matrix transposing each 4x4 block and interleaving the values. <a href="#aa66a7b6b0420e54ec173743e6c5bfc45">More...</a><br /></td></tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100145<tr class="separator:aa66a7b6b0420e54ec173743e6c5bfc45"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000146</table>
147<h2 class="groupheader">Function Documentation</h2>
Anthony Barbier46d59272017-05-04 09:15:15 +0100148<a class="anchor" id="a2f32d740e780059f68da8aa589ed0a5b"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000149<div class="memitem">
150<div class="memproto">
151 <table class="memname">
152 <tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100153 <td class="memname">__kernel void gemm_interleave4x4_16bit </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000154 <td>(</td>
155 <td class="paramtype">__global uchar *&#160;</td>
156 <td class="paramname"><em>src_ptr</em>, </td>
157 </tr>
158 <tr>
159 <td class="paramkey"></td>
160 <td></td>
161 <td class="paramtype">uint&#160;</td>
162 <td class="paramname"><em>src_stride_x</em>, </td>
163 </tr>
164 <tr>
165 <td class="paramkey"></td>
166 <td></td>
167 <td class="paramtype">uint&#160;</td>
168 <td class="paramname"><em>src_step_x</em>, </td>
169 </tr>
170 <tr>
171 <td class="paramkey"></td>
172 <td></td>
173 <td class="paramtype">uint&#160;</td>
174 <td class="paramname"><em>src_stride_y</em>, </td>
175 </tr>
176 <tr>
177 <td class="paramkey"></td>
178 <td></td>
179 <td class="paramtype">uint&#160;</td>
180 <td class="paramname"><em>src_step_y</em>, </td>
181 </tr>
182 <tr>
183 <td class="paramkey"></td>
184 <td></td>
185 <td class="paramtype">uint&#160;</td>
186 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
187 </tr>
188 <tr>
189 <td class="paramkey"></td>
190 <td></td>
191 <td class="paramtype">__global uchar *&#160;</td>
192 <td class="paramname"><em>dst_ptr</em>, </td>
193 </tr>
194 <tr>
195 <td class="paramkey"></td>
196 <td></td>
197 <td class="paramtype">uint&#160;</td>
198 <td class="paramname"><em>dst_stride_x</em>, </td>
199 </tr>
200 <tr>
201 <td class="paramkey"></td>
202 <td></td>
203 <td class="paramtype">uint&#160;</td>
204 <td class="paramname"><em>dst_step_x</em>, </td>
205 </tr>
206 <tr>
207 <td class="paramkey"></td>
208 <td></td>
209 <td class="paramtype">uint&#160;</td>
210 <td class="paramname"><em>dst_stride_y</em>, </td>
211 </tr>
212 <tr>
213 <td class="paramkey"></td>
214 <td></td>
215 <td class="paramtype">uint&#160;</td>
216 <td class="paramname"><em>dst_step_y</em>, </td>
217 </tr>
218 <tr>
219 <td class="paramkey"></td>
220 <td></td>
221 <td class="paramtype">uint&#160;</td>
222 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
223 </tr>
224 <tr>
225 <td></td>
226 <td>)</td>
227 <td></td><td></td>
228 </tr>
229 </table>
230</div><div class="memdoc">
231
232<p>This OpenCL kernel reshapes the input matrix transposing each 4x4 block and interleaving the values. </p>
233<dl class="params"><dt>Parameters</dt><dd>
234 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100235 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source matrix. Supported data types: U16/S16/QS16/F16 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000236 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source matrix in X dimension (in bytes) </td></tr>
237 <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>
238 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source matrix in Y dimension (in bytes) </td></tr>
239 <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>
240 <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 matrix </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100241 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination matrix Supported data types: same as <code>src_ptr</code> </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000242 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination matrix in X dimension (in bytes) </td></tr>
243 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
244 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination matrix in Y dimension (in bytes) </td></tr>
245 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
246 <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 matrix </td></tr>
247 </table>
248 </dd>
249</dl>
250
Kaizen8938bd32017-09-28 14:38:23 +0100251<p>Definition at line <a class="el" href="gemm_8cl_source.xhtml#l00182">182</a> of file <a class="el" href="gemm_8cl_source.xhtml">gemm.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000252
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000253<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00123">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>.</p>
254<div class="fragment"><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;{</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="comment">// Compute source and destination addresses</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; <span class="comment">// Load values from Matrix A</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; ushort8 a0 = vload8(0, (__global ushort *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 0)));</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; ushort8 a1 = vload8(0, (__global ushort *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 1)));</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; ushort8 a2 = vload8(0, (__global ushort *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 2)));</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; ushort8 a3 = vload8(0, (__global ushort *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 3)));</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; ushort8 val0 = (ushort8)((ushort4)(a0.s0, a1.s0, a2.s0, a3.s0), (ushort4)(a0.s1, a1.s1, a2.s1, a3.s1));</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; vstore8(val0, 0, ((__global ushort *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 0);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; val0 = (ushort8)((ushort4)(a0.s2, a1.s2, a2.s2, a3.s2), (ushort4)(a0.s3, a1.s3, a2.s3, a3.s3));</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; vstore8(val0, 0, ((__global ushort *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 8);</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; val0 = (ushort8)((ushort4)(a0.s4, a1.s4, a2.s4, a3.s4), (ushort4)(a0.s5, a1.s5, a2.s5, a3.s5));</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; vstore8(val0, 0, ((__global ushort *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 16);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; val0 = (ushort8)((ushort4)(a0.s6, a1.s6, a2.s6, a3.s6), (ushort4)(a0.s7, a1.s7, a2.s7, a3.s7));</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; vstore8(val0, 0, ((__global ushort *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 24);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000255<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000256<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00123">Convolution.cpp:123</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000257<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
258<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000259<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000260</div><!-- fragment -->
261</div>
262</div>
Anthony Barbier46d59272017-05-04 09:15:15 +0100263<a class="anchor" id="a560b2d50aa886edc0f5daf4fe729717f"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000264<div class="memitem">
265<div class="memproto">
266 <table class="memname">
267 <tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100268 <td class="memname">__kernel void gemm_interleave4x4_32bit </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000269 <td>(</td>
270 <td class="paramtype">__global uchar *&#160;</td>
271 <td class="paramname"><em>src_ptr</em>, </td>
272 </tr>
273 <tr>
274 <td class="paramkey"></td>
275 <td></td>
276 <td class="paramtype">uint&#160;</td>
277 <td class="paramname"><em>src_stride_x</em>, </td>
278 </tr>
279 <tr>
280 <td class="paramkey"></td>
281 <td></td>
282 <td class="paramtype">uint&#160;</td>
283 <td class="paramname"><em>src_step_x</em>, </td>
284 </tr>
285 <tr>
286 <td class="paramkey"></td>
287 <td></td>
288 <td class="paramtype">uint&#160;</td>
289 <td class="paramname"><em>src_stride_y</em>, </td>
290 </tr>
291 <tr>
292 <td class="paramkey"></td>
293 <td></td>
294 <td class="paramtype">uint&#160;</td>
295 <td class="paramname"><em>src_step_y</em>, </td>
296 </tr>
297 <tr>
298 <td class="paramkey"></td>
299 <td></td>
300 <td class="paramtype">uint&#160;</td>
301 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
302 </tr>
303 <tr>
304 <td class="paramkey"></td>
305 <td></td>
306 <td class="paramtype">__global uchar *&#160;</td>
307 <td class="paramname"><em>dst_ptr</em>, </td>
308 </tr>
309 <tr>
310 <td class="paramkey"></td>
311 <td></td>
312 <td class="paramtype">uint&#160;</td>
313 <td class="paramname"><em>dst_stride_x</em>, </td>
314 </tr>
315 <tr>
316 <td class="paramkey"></td>
317 <td></td>
318 <td class="paramtype">uint&#160;</td>
319 <td class="paramname"><em>dst_step_x</em>, </td>
320 </tr>
321 <tr>
322 <td class="paramkey"></td>
323 <td></td>
324 <td class="paramtype">uint&#160;</td>
325 <td class="paramname"><em>dst_stride_y</em>, </td>
326 </tr>
327 <tr>
328 <td class="paramkey"></td>
329 <td></td>
330 <td class="paramtype">uint&#160;</td>
331 <td class="paramname"><em>dst_step_y</em>, </td>
332 </tr>
333 <tr>
334 <td class="paramkey"></td>
335 <td></td>
336 <td class="paramtype">uint&#160;</td>
337 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
338 </tr>
339 <tr>
340 <td></td>
341 <td>)</td>
342 <td></td><td></td>
343 </tr>
344 </table>
345</div><div class="memdoc">
346
347<p>This OpenCL kernel reshapes the input matrix transposing each 4x4 block and interleaving the values. </p>
348<dl class="params"><dt>Parameters</dt><dd>
349 <table class="params">
Anthony Barbier46d59272017-05-04 09:15:15 +0100350 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source matrix. Supported data types: U32/S32/F32 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000351 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source matrix in X dimension (in bytes) </td></tr>
352 <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>
353 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source matrix in Y dimension (in bytes) </td></tr>
354 <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>
355 <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 matrix </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100356 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination matrix Supported data types: same as <code>src_ptr</code> </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000357 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination matrix in X dimension (in bytes) </td></tr>
358 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
359 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination matrix in Y dimension (in bytes) </td></tr>
360 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
361 <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 matrix </td></tr>
362 </table>
363 </dd>
364</dl>
365
Kaizen8938bd32017-09-28 14:38:23 +0100366<p>Definition at line <a class="el" href="gemm_8cl_source.xhtml#l00141">141</a> of file <a class="el" href="gemm_8cl_source.xhtml">gemm.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000367
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000368<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00123">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>.</p>
369<div class="fragment"><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="comment">// Compute source and destination addresses</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="comment">// Load values from Matrix A</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; uint4 a0 = vload4(0, (__global uint *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 0)));</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; uint4 a1 = vload4(0, (__global uint *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 1)));</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; uint4 a2 = vload4(0, (__global uint *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 2)));</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; uint4 a3 = vload4(0, (__global uint *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 3)));</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; uint4 val0 = (uint4)(a0.s0, a1.s0, a2.s0, a3.s0);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; vstore4(val0, 0, ((__global uint *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 0);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; val0 = (uint4)(a0.s1, a1.s1, a2.s1, a3.s1);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; vstore4(val0, 0, ((__global uint *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 4);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; val0 = (uint4)(a0.s2, a1.s2, a2.s2, a3.s2);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; vstore4(val0, 0, ((__global uint *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 8);</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; val0 = (uint4)(a0.s3, a1.s3, a2.s3, a3.s3);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; vstore4(val0, 0, ((__global uint *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 12);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000370<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000371<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00123">Convolution.cpp:123</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000372<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
373<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000374<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000375</div><!-- fragment -->
376</div>
377</div>
Anthony Barbier46d59272017-05-04 09:15:15 +0100378<a class="anchor" id="aa66a7b6b0420e54ec173743e6c5bfc45"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000379<div class="memitem">
380<div class="memproto">
381 <table class="memname">
382 <tr>
Anthony Barbier46d59272017-05-04 09:15:15 +0100383 <td class="memname">__kernel void gemm_interleave4x4_8bit </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000384 <td>(</td>
385 <td class="paramtype">__global uchar *&#160;</td>
386 <td class="paramname"><em>src_ptr</em>, </td>
387 </tr>
388 <tr>
389 <td class="paramkey"></td>
390 <td></td>
391 <td class="paramtype">uint&#160;</td>
392 <td class="paramname"><em>src_stride_x</em>, </td>
393 </tr>
394 <tr>
395 <td class="paramkey"></td>
396 <td></td>
397 <td class="paramtype">uint&#160;</td>
398 <td class="paramname"><em>src_step_x</em>, </td>
399 </tr>
400 <tr>
401 <td class="paramkey"></td>
402 <td></td>
403 <td class="paramtype">uint&#160;</td>
404 <td class="paramname"><em>src_stride_y</em>, </td>
405 </tr>
406 <tr>
407 <td class="paramkey"></td>
408 <td></td>
409 <td class="paramtype">uint&#160;</td>
410 <td class="paramname"><em>src_step_y</em>, </td>
411 </tr>
412 <tr>
413 <td class="paramkey"></td>
414 <td></td>
415 <td class="paramtype">uint&#160;</td>
416 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
417 </tr>
418 <tr>
419 <td class="paramkey"></td>
420 <td></td>
421 <td class="paramtype">__global uchar *&#160;</td>
422 <td class="paramname"><em>dst_ptr</em>, </td>
423 </tr>
424 <tr>
425 <td class="paramkey"></td>
426 <td></td>
427 <td class="paramtype">uint&#160;</td>
428 <td class="paramname"><em>dst_stride_x</em>, </td>
429 </tr>
430 <tr>
431 <td class="paramkey"></td>
432 <td></td>
433 <td class="paramtype">uint&#160;</td>
434 <td class="paramname"><em>dst_step_x</em>, </td>
435 </tr>
436 <tr>
437 <td class="paramkey"></td>
438 <td></td>
439 <td class="paramtype">uint&#160;</td>
440 <td class="paramname"><em>dst_stride_y</em>, </td>
441 </tr>
442 <tr>
443 <td class="paramkey"></td>
444 <td></td>
445 <td class="paramtype">uint&#160;</td>
446 <td class="paramname"><em>dst_step_y</em>, </td>
447 </tr>
448 <tr>
449 <td class="paramkey"></td>
450 <td></td>
451 <td class="paramtype">uint&#160;</td>
452 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
453 </tr>
454 <tr>
455 <td></td>
456 <td>)</td>
457 <td></td><td></td>
458 </tr>
459 </table>
460</div><div class="memdoc">
461
462<p>This OpenCL kernel reshapes the input matrix transposing each 4x4 block and interleaving the values. </p>
463<dl class="params"><dt>Parameters</dt><dd>
464 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100465 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source matrix. Supported data types: U8/S8/QS8 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000466 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source matrix in X dimension (in bytes) </td></tr>
467 <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>
468 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source matrix in Y dimension (in bytes) </td></tr>
469 <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>
470 <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 matrix </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100471 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination matrix Supported data types: same as <code>src_ptr</code> </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000472 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination matrix in X dimension (in bytes) </td></tr>
473 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
474 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination matrix in Y dimension (in bytes) </td></tr>
475 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
476 <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 matrix </td></tr>
477 </table>
478 </dd>
479</dl>
480
Kaizen8938bd32017-09-28 14:38:23 +0100481<p>Definition at line <a class="el" href="gemm_8cl_source.xhtml#l00223">223</a> of file <a class="el" href="gemm_8cl_source.xhtml">gemm.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000482
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000483<p>References <a class="el" href="fixed__point_8h_source.xhtml#l00178">ADD_SAT_OP_EXPAND</a>, <a class="el" href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00120">arm_compute::test::validation::c</a>, <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_VECTOR_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00123">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00066">IMAGE_DECLARATION</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00276">mla_sat_qs16x8()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00275">mla_sat_qs8x16()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00296">mlal_sat_qs16x8()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00295">mlal_sat_qs8x8()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00254">mul_sat_qs16x8()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00249">mul_sat_qs8x16()</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00134">Vector::ptr</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>, <a class="el" href="helpers_8h_source.xhtml#l00074">TENSOR3D_DECLARATION</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00060">VECTOR_DECLARATION</a>, <a class="el" href="softmax__layer_8cl_source.xhtml#l00079">VECTOR_SIZE</a>, <a class="el" href="helpers_8h_source.xhtml#l00040">VLOAD</a>, and <a class="el" href="helpers_8h_source.xhtml#l00043">VSTORE</a>.</p>
484<div class="fragment"><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;{</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="comment">// Compute source and destination addresses</span></div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; <span class="comment">// Load values from Matrix A</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; uchar16 a0 = vload16(0, (__global uchar *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 0)));</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; uchar16 a1 = vload16(0, (__global uchar *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 1)));</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; uchar16 a2 = vload16(0, (__global uchar *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 2)));</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; uchar16 a3 = vload16(0, (__global uchar *)(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, 0, 3)));</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160; uchar16 val0 = (uchar16)((uchar4)(a0.s0, a1.s0, a2.s0, a3.s0), (uchar4)(a0.s1, a1.s1, a2.s1, a3.s1),</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; (uchar4)(a0.s2, a1.s2, a2.s2, a3.s2), (uchar4)(a0.s3, a1.s3, a2.s3, a3.s3));</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; vstore16(val0, 0, ((__global uchar *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 0);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; val0 = (uchar16)((uchar4)(a0.s4, a1.s4, a2.s4, a3.s4), (uchar4)(a0.s5, a1.s5, a2.s5, a3.s5),</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; (uchar4)(a0.s6, a1.s6, a2.s6, a3.s6), (uchar4)(a0.s7, a1.s7, a2.s7, a3.s7));</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; vstore16(val0, 0, ((__global uchar *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 16);</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; val0 = (uchar16)((uchar4)(a0.s8, a1.s8, a2.s8, a3.s8), (uchar4)(a0.s9, a1.s9, a2.s9, a3.s9),</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; (uchar4)(a0.sA, a1.sA, a2.sA, a3.sA), (uchar4)(a0.sB, a1.sB, a2.sB, a3.sB));</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; vstore16(val0, 0, ((__global uchar *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 32);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; val0 = (uchar16)((uchar4)(a0.sC, a1.sC, a2.sC, a3.sC), (uchar4)(a0.sD, a1.sD, a2.sD, a3.sD),</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; (uchar4)(a0.sE, a1.sE, a2.sE, a3.sE), (uchar4)(a0.sF, a1.sF, a2.sF, a3.sF));</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; vstore16(val0, 0, ((__global uchar *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>) + 48);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00301">helpers.h:301</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000485<div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000486<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00123">Convolution.cpp:123</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000487<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
488<div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000489<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000490</div><!-- fragment -->
491</div>
492</div>
Kaizen8938bd32017-09-28 14:38:23 +0100493<a class="anchor" id="a97a299ffb620aa98fe5e39bb8ab0833f"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000494<div class="memitem">
495<div class="memproto">
496 <table class="memname">
497 <tr>
Kaizen8938bd32017-09-28 14:38:23 +0100498 <td class="memname">__kernel void gemm_transpose1x16 </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000499 <td>(</td>
500 <td class="paramtype">__global uchar *&#160;</td>
501 <td class="paramname"><em>src_ptr</em>, </td>
502 </tr>
503 <tr>
504 <td class="paramkey"></td>
505 <td></td>
506 <td class="paramtype">uint&#160;</td>
507 <td class="paramname"><em>src_stride_x</em>, </td>
508 </tr>
509 <tr>
510 <td class="paramkey"></td>
511 <td></td>
512 <td class="paramtype">uint&#160;</td>
513 <td class="paramname"><em>src_step_x</em>, </td>
514 </tr>
515 <tr>
516 <td class="paramkey"></td>
517 <td></td>
518 <td class="paramtype">uint&#160;</td>
519 <td class="paramname"><em>src_stride_y</em>, </td>
520 </tr>
521 <tr>
522 <td class="paramkey"></td>
523 <td></td>
524 <td class="paramtype">uint&#160;</td>
525 <td class="paramname"><em>src_step_y</em>, </td>
526 </tr>
527 <tr>
528 <td class="paramkey"></td>
529 <td></td>
530 <td class="paramtype">uint&#160;</td>
531 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
532 </tr>
533 <tr>
534 <td class="paramkey"></td>
535 <td></td>
536 <td class="paramtype">__global uchar *&#160;</td>
537 <td class="paramname"><em>dst_ptr</em>, </td>
538 </tr>
539 <tr>
540 <td class="paramkey"></td>
541 <td></td>
542 <td class="paramtype">uint&#160;</td>
543 <td class="paramname"><em>dst_stride_x</em>, </td>
544 </tr>
545 <tr>
546 <td class="paramkey"></td>
547 <td></td>
548 <td class="paramtype">uint&#160;</td>
549 <td class="paramname"><em>dst_step_x</em>, </td>
550 </tr>
551 <tr>
552 <td class="paramkey"></td>
553 <td></td>
554 <td class="paramtype">uint&#160;</td>
555 <td class="paramname"><em>dst_stride_y</em>, </td>
556 </tr>
557 <tr>
558 <td class="paramkey"></td>
559 <td></td>
560 <td class="paramtype">uint&#160;</td>
561 <td class="paramname"><em>dst_step_y</em>, </td>
562 </tr>
563 <tr>
564 <td class="paramkey"></td>
565 <td></td>
566 <td class="paramtype">uint&#160;</td>
567 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
568 </tr>
569 <tr>
570 <td></td>
571 <td>)</td>
572 <td></td><td></td>
573 </tr>
574 </table>
575</div><div class="memdoc">
576
577<p>This OpenCL kernel computes the "vector" 1x16 transposition of input matrix. </p>
578<dl class="params"><dt>Parameters</dt><dd>
579 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100580 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source matrix. Supported data types: U8/S8/QS8 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000581 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source matrix in X dimension (in bytes) </td></tr>
582 <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>
583 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source matrix in Y dimension (in bytes) </td></tr>
584 <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>
585 <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 matrix </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100586 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination matrix Supported data types: same as <code>src_ptr</code> </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000587 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination matrix in X dimension (in bytes) </td></tr>
588 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
589 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination matrix in Y dimension (in bytes) </td></tr>
590 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
591 <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 matrix </td></tr>
592 </table>
593 </dd>
594</dl>
595
Kaizen8938bd32017-09-28 14:38:23 +0100596<p>Definition at line <a class="el" href="gemm_8cl_source.xhtml#l00109">109</a> of file <a class="el" href="gemm_8cl_source.xhtml">gemm.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000597
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000598<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>.</p>
599<div class="fragment"><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;{</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; uint x = get_global_id(0);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; uint y = get_global_id(1);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="comment">// Compute address for Matrix B - source</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <span class="comment">// Compute address for Matrix B transposed - destination. X and Y are swapped</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; uint dst_addr_in_bytes = y * 16 + ((x * dst_stride_y + dst_offset_first_element_in_bytes));</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; uchar16 b0 = vload16(0, (__global uchar *)<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>.ptr);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; vstore16(b0, 0, (__global uchar *)(dst_ptr + dst_addr_in_bytes));</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000600<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000601<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000602</div><!-- fragment -->
603</div>
604</div>
Kaizen8938bd32017-09-28 14:38:23 +0100605<a class="anchor" id="ac5eba21b9ac015e1454044aeba93546c"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000606<div class="memitem">
607<div class="memproto">
608 <table class="memname">
609 <tr>
Kaizen8938bd32017-09-28 14:38:23 +0100610 <td class="memname">__kernel void gemm_transpose1x4 </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000611 <td>(</td>
612 <td class="paramtype">__global uchar *&#160;</td>
613 <td class="paramname"><em>src_ptr</em>, </td>
614 </tr>
615 <tr>
616 <td class="paramkey"></td>
617 <td></td>
618 <td class="paramtype">uint&#160;</td>
619 <td class="paramname"><em>src_stride_x</em>, </td>
620 </tr>
621 <tr>
622 <td class="paramkey"></td>
623 <td></td>
624 <td class="paramtype">uint&#160;</td>
625 <td class="paramname"><em>src_step_x</em>, </td>
626 </tr>
627 <tr>
628 <td class="paramkey"></td>
629 <td></td>
630 <td class="paramtype">uint&#160;</td>
631 <td class="paramname"><em>src_stride_y</em>, </td>
632 </tr>
633 <tr>
634 <td class="paramkey"></td>
635 <td></td>
636 <td class="paramtype">uint&#160;</td>
637 <td class="paramname"><em>src_step_y</em>, </td>
638 </tr>
639 <tr>
640 <td class="paramkey"></td>
641 <td></td>
642 <td class="paramtype">uint&#160;</td>
643 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
644 </tr>
645 <tr>
646 <td class="paramkey"></td>
647 <td></td>
648 <td class="paramtype">__global uchar *&#160;</td>
649 <td class="paramname"><em>dst_ptr</em>, </td>
650 </tr>
651 <tr>
652 <td class="paramkey"></td>
653 <td></td>
654 <td class="paramtype">uint&#160;</td>
655 <td class="paramname"><em>dst_stride_x</em>, </td>
656 </tr>
657 <tr>
658 <td class="paramkey"></td>
659 <td></td>
660 <td class="paramtype">uint&#160;</td>
661 <td class="paramname"><em>dst_step_x</em>, </td>
662 </tr>
663 <tr>
664 <td class="paramkey"></td>
665 <td></td>
666 <td class="paramtype">uint&#160;</td>
667 <td class="paramname"><em>dst_stride_y</em>, </td>
668 </tr>
669 <tr>
670 <td class="paramkey"></td>
671 <td></td>
672 <td class="paramtype">uint&#160;</td>
673 <td class="paramname"><em>dst_step_y</em>, </td>
674 </tr>
675 <tr>
676 <td class="paramkey"></td>
677 <td></td>
678 <td class="paramtype">uint&#160;</td>
679 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
680 </tr>
681 <tr>
682 <td></td>
683 <td>)</td>
684 <td></td><td></td>
685 </tr>
686 </table>
687</div><div class="memdoc">
688
689<p>This OpenCL kernel computes the "vector" 1x4 transposition of input matrix. </p>
690<dl class="params"><dt>Parameters</dt><dd>
691 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100692 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source matrix. Supported data types: U32/S32/F32 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000693 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source matrix in X dimension (in bytes) </td></tr>
694 <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>
695 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source matrix in Y dimension (in bytes) </td></tr>
696 <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>
697 <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 matrix </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100698 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination matrix Supported data types: same as <code>src_ptr</code> </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000699 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination matrix in X dimension (in bytes) </td></tr>
700 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
701 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination matrix in Y dimension (in bytes) </td></tr>
702 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
703 <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 matrix </td></tr>
704 </table>
705 </dd>
706</dl>
707
Kaizen8938bd32017-09-28 14:38:23 +0100708<p>Definition at line <a class="el" href="gemm_8cl_source.xhtml#l00045">45</a> of file <a class="el" href="gemm_8cl_source.xhtml">gemm.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000709
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000710<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>.</p>
711<div class="fragment"><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;{</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; uint x = get_global_id(0);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; uint y = get_global_id(1);</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// Compute address for Matrix B - source</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="comment">// Compute address for Matrix B transposed - destination. X and Y are swapped</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; uint dst_addr_in_bytes = y * 16 + ((x * dst_stride_y + dst_offset_first_element_in_bytes));</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; uint4 b0 = vload4(0, (__global uint *)<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>.ptr);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; vstore4(b0, 0, (__global uint *)(dst_ptr + dst_addr_in_bytes));</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000712<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000713<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000714</div><!-- fragment -->
715</div>
716</div>
Kaizen8938bd32017-09-28 14:38:23 +0100717<a class="anchor" id="a75c35ac120f123e9cce56c43ba3f48d2"></a>
Anthony Barbier871448e2017-03-24 14:54:29 +0000718<div class="memitem">
719<div class="memproto">
720 <table class="memname">
721 <tr>
Kaizen8938bd32017-09-28 14:38:23 +0100722 <td class="memname">__kernel void gemm_transpose1x8 </td>
Anthony Barbier871448e2017-03-24 14:54:29 +0000723 <td>(</td>
724 <td class="paramtype">__global uchar *&#160;</td>
725 <td class="paramname"><em>src_ptr</em>, </td>
726 </tr>
727 <tr>
728 <td class="paramkey"></td>
729 <td></td>
730 <td class="paramtype">uint&#160;</td>
731 <td class="paramname"><em>src_stride_x</em>, </td>
732 </tr>
733 <tr>
734 <td class="paramkey"></td>
735 <td></td>
736 <td class="paramtype">uint&#160;</td>
737 <td class="paramname"><em>src_step_x</em>, </td>
738 </tr>
739 <tr>
740 <td class="paramkey"></td>
741 <td></td>
742 <td class="paramtype">uint&#160;</td>
743 <td class="paramname"><em>src_stride_y</em>, </td>
744 </tr>
745 <tr>
746 <td class="paramkey"></td>
747 <td></td>
748 <td class="paramtype">uint&#160;</td>
749 <td class="paramname"><em>src_step_y</em>, </td>
750 </tr>
751 <tr>
752 <td class="paramkey"></td>
753 <td></td>
754 <td class="paramtype">uint&#160;</td>
755 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
756 </tr>
757 <tr>
758 <td class="paramkey"></td>
759 <td></td>
760 <td class="paramtype">__global uchar *&#160;</td>
761 <td class="paramname"><em>dst_ptr</em>, </td>
762 </tr>
763 <tr>
764 <td class="paramkey"></td>
765 <td></td>
766 <td class="paramtype">uint&#160;</td>
767 <td class="paramname"><em>dst_stride_x</em>, </td>
768 </tr>
769 <tr>
770 <td class="paramkey"></td>
771 <td></td>
772 <td class="paramtype">uint&#160;</td>
773 <td class="paramname"><em>dst_step_x</em>, </td>
774 </tr>
775 <tr>
776 <td class="paramkey"></td>
777 <td></td>
778 <td class="paramtype">uint&#160;</td>
779 <td class="paramname"><em>dst_stride_y</em>, </td>
780 </tr>
781 <tr>
782 <td class="paramkey"></td>
783 <td></td>
784 <td class="paramtype">uint&#160;</td>
785 <td class="paramname"><em>dst_step_y</em>, </td>
786 </tr>
787 <tr>
788 <td class="paramkey"></td>
789 <td></td>
790 <td class="paramtype">uint&#160;</td>
791 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
792 </tr>
793 <tr>
794 <td></td>
795 <td>)</td>
796 <td></td><td></td>
797 </tr>
798 </table>
799</div><div class="memdoc">
800
801<p>This OpenCL kernel computes the "vector" 1x8 transposition of input matrix. </p>
802<dl class="params"><dt>Parameters</dt><dd>
803 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100804 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source matrix. Supported data types: U16/S16/QS16/F16 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000805 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source matrix in X dimension (in bytes) </td></tr>
806 <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>
807 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source matrix in Y dimension (in bytes) </td></tr>
808 <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>
809 <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 matrix </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100810 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination matrix Supported data types: same as <code>src_ptr</code> </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000811 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination matrix in X dimension (in bytes) </td></tr>
812 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_gx_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
813 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination matrix in Y dimension (in bytes) </td></tr>
814 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_gx_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
815 <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 matrix </td></tr>
816 </table>
817 </dd>
818</dl>
819
Kaizen8938bd32017-09-28 14:38:23 +0100820<p>Definition at line <a class="el" href="gemm_8cl_source.xhtml#l00077">77</a> of file <a class="el" href="gemm_8cl_source.xhtml">gemm.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000821
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000822<p>References <a class="el" href="helpers_8h_source.xhtml#l00102">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00142">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00133">arm_compute::test::validation::src</a>.</p>
823<div class="fragment"><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;{</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; uint x = get_global_id(0);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; uint y = get_global_id(1);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// Compute address for Matrix B - source</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="comment">// Compute address for Matrix B transposed - destination. X and Y are swapped</span></div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; uint dst_addr_in_bytes = y * 16 + ((x * dst_stride_y + dst_offset_first_element_in_bytes));</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; ushort8 b0 = vload8(0, (__global ushort *)<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>.ptr);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; vstore8(b0, 0, (__global ushort *)(dst_ptr + dst_addr_in_bytes));</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00102">helpers.h:102</a></div></div>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000824<div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00140">helpers.h:140</a></div></div>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000825<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00133">Convolution.cpp:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000826</div><!-- fragment -->
827</div>
828</div>
829</div><!-- contents -->
830</div><!-- doc-content -->
831<!-- start footer part -->
832<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
833 <ul>
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000834 <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="gemm_8cl.xhtml">gemm.cl</a></li>
Anthony Barbierf45d5a92018-01-24 16:23:15 +0000835 <li class="footer">Generated on Wed Jan 24 2018 14:30:43 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000836 <a href="http://www.doxygen.org/index.html">
Anthony Barbier8140e1e2017-12-14 23:48:46 +0000837 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000838 </ul>
839</div>
840</body>
841</html>