blob: 312b8d27f71eef911fe861810cedecbb6cb506db [file] [log] [blame]
Kaizen8938bd32017-09-28 14:38:23 +01001<!-- 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"/>
7<meta name="generator" content="Doxygen 1.8.6"/>
8<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9<title>Compute Library: TransformImpl&lt; IntBy, BlockBy, Transposed, TOutSize, TInSize &gt; Struct Template Reference</title>
10<link href="tabs.css" rel="stylesheet" type="text/css"/>
11<script type="text/javascript" src="jquery.js"></script>
12<script type="text/javascript" src="dynsections.js"></script>
13<link href="navtree.css" rel="stylesheet" type="text/css"/>
14<script type="text/javascript" src="resize.js"></script>
15<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17 $(document).ready(initResizable);
18 $(window).load(resizeHeight);
19</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
21<script type="text/javascript" src="search/search.js"></script>
22<script type="text/javascript">
23 $(document).ready(function() { searchBox.OnSelectItem(0); });
24</script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
30</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
31<link href="doxygen.css" rel="stylesheet" type="text/css" />
32</head>
33<body>
34<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35<div id="titlearea">
36<table cellspacing="0" cellpadding="0">
37 <tbody>
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
40 <div id="projectname">Compute Library
Kaizenbf8b01d2017-10-12 14:26:51 +010041 &#160;<span id="projectnumber">17.10</span>
Kaizen8938bd32017-09-28 14:38:23 +010042 </div>
43 </td>
44 </tr>
45 </tbody>
46</table>
47</div>
48<!-- end header part -->
49<!-- Generated by Doxygen 1.8.6 -->
50<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>
56 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
57 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
59 <li><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="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
81 <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
82 <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
83 <li><a href="functions.xhtml"><span>Data&#160;Fields</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('struct_transform_impl.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)">
106<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>
107
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="#pub-static-methods">Static Public Member Functions</a> </div>
118 <div class="headertitle">
119<div class="title">TransformImpl&lt; IntBy, BlockBy, Transposed, TOutSize, TInSize &gt; Struct Template Reference</div> </div>
120</div><!--header-->
121<div class="contents">
122
123<p><code>#include &lt;<a class="el" href="transform_8hpp_source.xhtml">transform.hpp</a>&gt;</code></p>
124<table class="memberdecls">
125<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
126Static Public Member Functions</h2></td></tr>
127<tr class="memitem:a63b509dd384dfffc0d4f650115799f8b"><td class="memTemplParams" colspan="2">template&lt;typename TOut , typename TIn &gt; </td></tr>
128<tr class="memitem:a63b509dd384dfffc0d4f650115799f8b"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="struct_transform_impl.xhtml#a63b509dd384dfffc0d4f650115799f8b">Transform</a> (TOut *out, const TIn *const in, const int stride, const int y0, const int ymax, const int x0, const int xmax)</td></tr>
129<tr class="separator:a63b509dd384dfffc0d4f650115799f8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<tr class="memitem:a1c7a0b8d7bd5f883e459db42f2165755"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
131<tr class="memitem:a1c7a0b8d7bd5f883e459db42f2165755"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="struct_transform_impl.xhtml#a1c7a0b8d7bd5f883e459db42f2165755">Transform</a> (T *out, const T *const in, const int stride, const int k0, const int kmax, const int x0, const int xmax)</td></tr>
132<tr class="separator:a1c7a0b8d7bd5f883e459db42f2165755"><td class="memSeparator" colspan="2">&#160;</td></tr>
133</table>
134<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
135<div class="textblock"><h3>template&lt;unsigned IntBy, unsigned int BlockBy, bool Transposed, size_t TOutSize, size_t TInSize&gt;<br/>
136struct TransformImpl&lt; IntBy, BlockBy, Transposed, TOutSize, TInSize &gt;</h3>
137
138
139<p>Definition at line <a class="el" href="transform_8hpp_source.xhtml#l00038">38</a> of file <a class="el" href="transform_8hpp_source.xhtml">transform.hpp</a>.</p>
140</div><h2 class="groupheader">Member Function Documentation</h2>
141<a class="anchor" id="a63b509dd384dfffc0d4f650115799f8b"></a>
142<div class="memitem">
143<div class="memproto">
144<table class="mlabels">
145 <tr>
146 <td class="mlabels-left">
147 <table class="memname">
148 <tr>
149 <td class="memname">static void Transform </td>
150 <td>(</td>
151 <td class="paramtype">TOut *&#160;</td>
152 <td class="paramname"><em>out</em>, </td>
153 </tr>
154 <tr>
155 <td class="paramkey"></td>
156 <td></td>
157 <td class="paramtype">const TIn *const&#160;</td>
158 <td class="paramname"><em>in</em>, </td>
159 </tr>
160 <tr>
161 <td class="paramkey"></td>
162 <td></td>
163 <td class="paramtype">const int&#160;</td>
164 <td class="paramname"><em>stride</em>, </td>
165 </tr>
166 <tr>
167 <td class="paramkey"></td>
168 <td></td>
169 <td class="paramtype">const int&#160;</td>
170 <td class="paramname"><em>y0</em>, </td>
171 </tr>
172 <tr>
173 <td class="paramkey"></td>
174 <td></td>
175 <td class="paramtype">const int&#160;</td>
176 <td class="paramname"><em>ymax</em>, </td>
177 </tr>
178 <tr>
179 <td class="paramkey"></td>
180 <td></td>
181 <td class="paramtype">const int&#160;</td>
182 <td class="paramname"><em>x0</em>, </td>
183 </tr>
184 <tr>
185 <td class="paramkey"></td>
186 <td></td>
187 <td class="paramtype">const int&#160;</td>
188 <td class="paramname"><em>xmax</em>&#160;</td>
189 </tr>
190 <tr>
191 <td></td>
192 <td>)</td>
193 <td></td><td></td>
194 </tr>
195 </table>
196 </td>
197 <td class="mlabels-right">
198<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
199 </tr>
200</table>
201</div><div class="memdoc">
202
203<p>Definition at line <a class="el" href="transform_8hpp_source.xhtml#l00040">40</a> of file <a class="el" href="transform_8hpp_source.xhtml">transform.hpp</a>.</p>
204<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; {</div>
205<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> n_whole_y_blocks = (ymax - y0) / IntBy;</div>
206<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> y_remainders = (ymax - y0) % IntBy;</div>
207<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> n_y_blocks = n_whole_y_blocks + (y_remainders ? 1 : 0);</div>
208<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div>
209<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> n_whole_x_blocks = (xmax - x0) / BlockBy;</div>
210<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> x_remainders = (xmax - x0) % BlockBy;</div>
211<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> n_x_blocks = n_whole_x_blocks + (x_remainders ? 1 : 0);</div>
212<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div>
213<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="comment">// &quot;Y&quot; loop: advance down the rows of the source IntBy rows at a time.</span></div>
214<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="comment">// Set up fill_rows to show the number rows to copy from, and blank_rows</span></div>
215<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="comment">// for the number of blank rows to add.</span></div>
216<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> y_block=0 ; y_block &lt; n_y_blocks; y_block++) {</div>
217<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordtype">int</span> fill_rows = (y_block &lt; n_whole_y_blocks) ? IntBy : y_remainders;</div>
218<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keywordtype">int</span> blank_rows = IntBy - fill_rows;</div>
219<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div>
220<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <span class="keywordtype">int</span> y_base = y0 + (y_block * IntBy);</div>
221<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div>
222<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="comment">// So now advance along this block of rows, BlockBy columns at a time.</span></div>
223<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> x_block=0 ; x_block &lt; n_x_blocks; x_block++) {</div>
224<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordtype">int</span> fill_cols = (x_block &lt; n_whole_x_blocks) ? BlockBy : x_remainders;</div>
225<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordtype">int</span> blank_cols = BlockBy - fill_cols;</div>
226<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
227<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordtype">int</span> x_base = x0 + (x_block * BlockBy);</div>
228<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div>
229<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> row = 0; row &lt; fill_rows; row++) {</div>
230<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> col = 0; col &lt; fill_cols; col++) {</div>
231<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="comment">// In-range copy. If it&#39;s transposed, we reverse the sense of rows and columns here.</span></div>
232<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keywordflow">if</span> (Transposed) {</div>
233<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; *out++ = <span class="keyword">static_cast&lt;</span>TOut<span class="keyword">&gt;</span>(in[(x_base + col) * stride + y_base + row]);</div>
234<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; } <span class="keywordflow">else</span> {</div>
235<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; *out++ = <span class="keyword">static_cast&lt;</span>TOut<span class="keyword">&gt;</span>(in[(y_base + row) * stride + x_base + col]);</div>
236<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; }</div>
237<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; }</div>
238<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <span class="comment">// &quot;col&quot; tail - row is in range but column is out of range.</span></div>
239<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> col=0; col &lt; blank_cols; col++) {</div>
240<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; *out++ = <span class="keyword">static_cast&lt;</span>TOut<span class="keyword">&gt;</span>(0);</div>
241<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; }</div>
242<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; }</div>
243<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="comment">// &quot;row&quot; tail - row is out of range so fill with zeros always.</span></div>
244<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> row = 0; row &lt; blank_rows; row++) {</div>
245<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">int</span> col=0; col &lt; (fill_cols + blank_cols); col++) {</div>
246<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; *out++ = <span class="keyword">static_cast&lt;</span>TOut<span class="keyword">&gt;</span>(0);</div>
247<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; }</div>
248<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; }</div>
249<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; }</div>
250<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; }</div>
251<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; }</div>
252</div><!-- fragment -->
253</div>
254</div>
255<a class="anchor" id="a1c7a0b8d7bd5f883e459db42f2165755"></a>
256<div class="memitem">
257<div class="memproto">
258<table class="mlabels">
259 <tr>
260 <td class="mlabels-left">
261 <table class="memname">
262 <tr>
263 <td class="memname">static void Transform </td>
264 <td>(</td>
265 <td class="paramtype">T *&#160;</td>
266 <td class="paramname"><em>out</em>, </td>
267 </tr>
268 <tr>
269 <td class="paramkey"></td>
270 <td></td>
271 <td class="paramtype">const T *const&#160;</td>
272 <td class="paramname"><em>in</em>, </td>
273 </tr>
274 <tr>
275 <td class="paramkey"></td>
276 <td></td>
277 <td class="paramtype">const int&#160;</td>
278 <td class="paramname"><em>stride</em>, </td>
279 </tr>
280 <tr>
281 <td class="paramkey"></td>
282 <td></td>
283 <td class="paramtype">const int&#160;</td>
284 <td class="paramname"><em>k0</em>, </td>
285 </tr>
286 <tr>
287 <td class="paramkey"></td>
288 <td></td>
289 <td class="paramtype">const int&#160;</td>
290 <td class="paramname"><em>kmax</em>, </td>
291 </tr>
292 <tr>
293 <td class="paramkey"></td>
294 <td></td>
295 <td class="paramtype">const int&#160;</td>
296 <td class="paramname"><em>x0</em>, </td>
297 </tr>
298 <tr>
299 <td class="paramkey"></td>
300 <td></td>
301 <td class="paramtype">const int&#160;</td>
302 <td class="paramname"><em>xmax</em>&#160;</td>
303 </tr>
304 <tr>
305 <td></td>
306 <td>)</td>
307 <td></td><td></td>
308 </tr>
309 </table>
310 </td>
311 <td class="mlabels-right">
312<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
313 </tr>
314</table>
315</div><div class="memdoc">
316
317<p>Definition at line <a class="el" href="transform_8hpp_source.xhtml#l00091">91</a> of file <a class="el" href="transform_8hpp_source.xhtml">transform.hpp</a>.</p>
318<div class="fragment"><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; {</div>
319<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; Transform&lt;T, T&gt;(out, in, stride, k0, kmax, x0, xmax);</div>
320<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; }</div>
321</div><!-- fragment -->
322</div>
323</div>
324<hr/>The documentation for this struct was generated from the following file:<ul>
325<li>arm_compute/core/NEON/kernels/assembly/<a class="el" href="transform_8hpp_source.xhtml">transform.hpp</a></li>
326</ul>
327</div><!-- contents -->
328</div><!-- doc-content -->
329<!-- start footer part -->
330<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
331 <ul>
332 <li class="navelem"><a class="el" href="struct_transform_impl.xhtml">TransformImpl</a></li>
Kaizenbf8b01d2017-10-12 14:26:51 +0100333 <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by
Kaizen8938bd32017-09-28 14:38:23 +0100334 <a href="http://www.doxygen.org/index.html">
335 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
336 </ul>
337</div>
338</body>
339</html>