blob: f11446c48ff1fe61300df9cb95e85d3ee7195a93 [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: GemmInterleaved&lt; strategy, To, Tr &gt; Class 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
41 &#160;<span id="projectnumber">17.09</span>
42 </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('class_gemm_interleaved.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-methods">Public Member Functions</a> </div>
118 <div class="headertitle">
119<div class="title">GemmInterleaved&lt; strategy, To, Tr &gt; Class Template Reference</div> </div>
120</div><!--header-->
121<div class="contents">
122
123<p><code>#include &lt;<a class="el" href="gemm__interleaved_8hpp_source.xhtml">gemm_interleaved.hpp</a>&gt;</code></p>
124<div class="dynheader">
125Collaboration diagram for GemmInterleaved&lt; strategy, To, Tr &gt;:</div>
126<div class="dyncontent">
127<div class="center"><iframe scrolling="no" frameborder="0" src="class_gemm_interleaved__coll__graph.svg" width="199" height="127"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
128</div>
129<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
130<table class="memberdecls">
131<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
132Public Member Functions</h2></td></tr>
133<tr class="memitem:abf5a58f6feffeae31f48b750cba9303d"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_gemm_interleaved.xhtml#abf5a58f6feffeae31f48b750cba9303d">get_working_size</a> () const override</td></tr>
134<tr class="separator:abf5a58f6feffeae31f48b750cba9303d"><td class="memSeparator" colspan="2">&#160;</td></tr>
135<tr class="memitem:ad4b554ff56ba355e66b70698b1393085"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_gemm_interleaved.xhtml#ad4b554ff56ba355e66b70698b1393085">GemmInterleaved</a> (const CPUInfo *ci, const unsigned int M, const unsigned int N, const unsigned int K, const bool trA, const bool trB)</td></tr>
136<tr class="separator:ad4b554ff56ba355e66b70698b1393085"><td class="memSeparator" colspan="2">&#160;</td></tr>
137<tr class="memitem:a51e6173ab8fcea6e02f04352d43838dd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_gemm_interleaved.xhtml#a51e6173ab8fcea6e02f04352d43838dd">execute</a> (const To *A, const int lda, const To *B, const int ldb, Tr *C, const int ldc, const Tr alpha, const Tr beta, void *working_space) const override</td></tr>
138<tr class="separator:a51e6173ab8fcea6e02f04352d43838dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
139<tr class="inherit_header pub_methods_class_gemm_common"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_gemm_common')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_gemm_common.xhtml">GemmCommon&lt; To, Tr &gt;</a></td></tr>
140<tr class="memitem:a431c4e53fa05a1e8ba127441e8baeed2 inherit pub_methods_class_gemm_common"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_gemm_common.xhtml#a431c4e53fa05a1e8ba127441e8baeed2">~GemmCommon</a> ()</td></tr>
141<tr class="separator:a431c4e53fa05a1e8ba127441e8baeed2 inherit pub_methods_class_gemm_common"><td class="memSeparator" colspan="2">&#160;</td></tr>
142</table>
143<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
144<div class="textblock"><h3>template&lt;typename strategy, typename To, typename Tr&gt;<br/>
145class GemmInterleaved&lt; strategy, To, Tr &gt;</h3>
146
147
148<p>Definition at line <a class="el" href="gemm__interleaved_8hpp_source.xhtml#l00043">43</a> of file <a class="el" href="gemm__interleaved_8hpp_source.xhtml">gemm_interleaved.hpp</a>.</p>
149</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
150<a class="anchor" id="ad4b554ff56ba355e66b70698b1393085"></a>
151<div class="memitem">
152<div class="memproto">
153<table class="mlabels">
154 <tr>
155 <td class="mlabels-left">
156 <table class="memname">
157 <tr>
158 <td class="memname"><a class="el" href="class_gemm_interleaved.xhtml">GemmInterleaved</a> </td>
159 <td>(</td>
160 <td class="paramtype">const CPUInfo *&#160;</td>
161 <td class="paramname"><em>ci</em>, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype">const unsigned int&#160;</td>
167 <td class="paramname"><em>M</em>, </td>
168 </tr>
169 <tr>
170 <td class="paramkey"></td>
171 <td></td>
172 <td class="paramtype">const unsigned int&#160;</td>
173 <td class="paramname"><em>N</em>, </td>
174 </tr>
175 <tr>
176 <td class="paramkey"></td>
177 <td></td>
178 <td class="paramtype">const unsigned int&#160;</td>
179 <td class="paramname"><em>K</em>, </td>
180 </tr>
181 <tr>
182 <td class="paramkey"></td>
183 <td></td>
184 <td class="paramtype">const bool&#160;</td>
185 <td class="paramname"><em>trA</em>, </td>
186 </tr>
187 <tr>
188 <td class="paramkey"></td>
189 <td></td>
190 <td class="paramtype">const bool&#160;</td>
191 <td class="paramname"><em>trB</em>&#160;</td>
192 </tr>
193 <tr>
194 <td></td>
195 <td>)</td>
196 <td></td><td></td>
197 </tr>
198 </table>
199 </td>
200 <td class="mlabels-right">
201<span class="mlabels"><span class="mlabel">inline</span></span> </td>
202 </tr>
203</table>
204</div><div class="memdoc">
205
206<p>Definition at line <a class="el" href="gemm__interleaved_8hpp_source.xhtml#l00077">77</a> of file <a class="el" href="gemm__interleaved_8hpp_source.xhtml">gemm_interleaved.hpp</a>.</p>
207<div class="fragment"><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; : M(M), N(N), K(K), trA(trA), trB(trB), strat(ci) {</div>
208<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> L1_size = ci-&gt;L1_size;</div>
209<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> L2_size = ci-&gt;L2_size;</div>
210<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;</div>
211<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <span class="comment">// Work out blocking parameters</span></div>
212<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="comment">// k_block: Each iteration will consume (out_width + out_height)</span></div>
213<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// operands - so how many iterations will fill the L1?</span></div>
214<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; k_block = L1_size / (<span class="keyword">sizeof</span>(Toi) * (strat.out_width + strat.out_height));</div>
215<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;</div>
216<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="comment">// Needs to be a multiple of the K unroll level.</span></div>
217<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; k_block /= strat.k_unroll;</div>
218<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; k_block *= strat.k_unroll;</div>
219<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;</div>
220<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="comment">// Now tune to presented problem size; this is how many blocks we need.</span></div>
221<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordtype">int</span> num_k_blocks = (K + (k_block - 1)) / k_block;</div>
222<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div>
223<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="comment">// So divide the space equally into that many blocks.</span></div>
224<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; k_block = (K + num_k_blocks - 1) / num_k_blocks;</div>
225<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div>
226<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// And round UP to the K unroll level required.</span></div>
227<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; k_block = (k_block + strat.k_unroll - 1) / strat.k_unroll;</div>
228<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; k_block *= strat.k_unroll;</div>
229<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div>
230<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="comment">// x_block: Work out how many rows (of length k_block) will fit in the L2</span></div>
231<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; x_block = L2_size / (<span class="keyword">sizeof</span>(Toi) * k_block);</div>
232<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div>
233<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="comment">// Needs to be a multiple of the kernel output width.</span></div>
234<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; x_block /= strat.out_width;</div>
235<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; x_block *= strat.out_width;</div>
236<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
237<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="comment">// And tune to the presented problem size.</span></div>
238<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="keywordtype">int</span> num_x_blocks = (N + (x_block - 1)) / x_block;</div>
239<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; x_block = (N + num_x_blocks - 1) / num_x_blocks;</div>
240<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;</div>
241<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; x_block = (x_block + strat.out_width - 1) / strat.out_width;</div>
242<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; x_block *= strat.out_width;</div>
243<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;</div>
244<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <span class="comment">// Work out the rounded size of M - needed for some buffers.</span></div>
245<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; Mround = (M + (strat.out_height - 1)) / strat.out_height;</div>
246<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; Mround *= strat.out_height;</div>
247<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; }</div>
248</div><!-- fragment -->
249</div>
250</div>
251<h2 class="groupheader">Member Function Documentation</h2>
252<a class="anchor" id="a51e6173ab8fcea6e02f04352d43838dd"></a>
253<div class="memitem">
254<div class="memproto">
255<table class="mlabels">
256 <tr>
257 <td class="mlabels-left">
258 <table class="memname">
259 <tr>
260 <td class="memname">void execute </td>
261 <td>(</td>
262 <td class="paramtype">const To *&#160;</td>
263 <td class="paramname"><em>A</em>, </td>
264 </tr>
265 <tr>
266 <td class="paramkey"></td>
267 <td></td>
268 <td class="paramtype">const int&#160;</td>
269 <td class="paramname"><em>lda</em>, </td>
270 </tr>
271 <tr>
272 <td class="paramkey"></td>
273 <td></td>
274 <td class="paramtype">const To *&#160;</td>
275 <td class="paramname"><em>B</em>, </td>
276 </tr>
277 <tr>
278 <td class="paramkey"></td>
279 <td></td>
280 <td class="paramtype">const int&#160;</td>
281 <td class="paramname"><em>ldb</em>, </td>
282 </tr>
283 <tr>
284 <td class="paramkey"></td>
285 <td></td>
286 <td class="paramtype">Tr *&#160;</td>
287 <td class="paramname"><em>C</em>, </td>
288 </tr>
289 <tr>
290 <td class="paramkey"></td>
291 <td></td>
292 <td class="paramtype">const int&#160;</td>
293 <td class="paramname"><em>ldc</em>, </td>
294 </tr>
295 <tr>
296 <td class="paramkey"></td>
297 <td></td>
298 <td class="paramtype">const Tr&#160;</td>
299 <td class="paramname"><em>alpha</em>, </td>
300 </tr>
301 <tr>
302 <td class="paramkey"></td>
303 <td></td>
304 <td class="paramtype">const Tr&#160;</td>
305 <td class="paramname"><em>beta</em>, </td>
306 </tr>
307 <tr>
308 <td class="paramkey"></td>
309 <td></td>
310 <td class="paramtype">void *&#160;</td>
311 <td class="paramname"><em>working_space</em>&#160;</td>
312 </tr>
313 <tr>
314 <td></td>
315 <td>)</td>
316 <td></td><td> const</td>
317 </tr>
318 </table>
319 </td>
320 <td class="mlabels-right">
321<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
322 </tr>
323</table>
324</div><div class="memdoc">
325
326<p>Implements <a class="el" href="class_gemm_common.xhtml#aabcb2e5ff8597dda52969feeba3d7ae0">GemmCommon&lt; To, Tr &gt;</a>.</p>
327
328<p>Definition at line <a class="el" href="gemm__interleaved_8hpp_source.xhtml#l00120">120</a> of file <a class="el" href="gemm__interleaved_8hpp_source.xhtml">gemm_interleaved.hpp</a>.</p>
329
330<p>References <a class="el" href="profiler_8hpp_source.xhtml#l00096">PROFILE_KERNEL</a>, <a class="el" href="profiler_8hpp_source.xhtml#l00097">PROFILE_MERGE</a>, <a class="el" href="profiler_8hpp_source.xhtml#l00094">PROFILE_PREPA</a>, and <a class="el" href="profiler_8hpp_source.xhtml#l00095">PROFILE_PREPB</a>.</p>
331<div class="fragment"><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; {</div>
332<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <a class="code" href="classprofiler.xhtml">profiler</a> prof;</div>
333<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160;</div>
334<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; int8_t *working_space_bytes = <span class="keyword">reinterpret_cast&lt;</span>int8_t *<span class="keyword">&gt;</span>(working_space);</div>
335<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; intptr_t working_space_int = <span class="keyword">reinterpret_cast&lt;</span>intptr_t<span class="keyword">&gt;</span>(working_space_bytes);</div>
336<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keywordtype">size_t</span> diff = 0;</div>
337<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
338<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keywordflow">if</span> (working_space_int &amp; 0xF) {</div>
339<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; diff = 0x10 - (working_space_int &amp; 0xF);</div>
340<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; }</div>
341<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div>
342<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; Toi * <span class="keyword">const</span> a_panel = <span class="keyword">reinterpret_cast&lt;</span>Toi *<span class="keyword">&gt;</span>(working_space_bytes + diff);</div>
343<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; Toi * <span class="keyword">const</span> b_panel = <span class="keyword">reinterpret_cast&lt;</span>Toi *<span class="keyword">&gt;</span>(working_space_bytes + get_a_working_size() + diff);</div>
344<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; Tri * <span class="keyword">const</span> c_panel = <span class="keyword">reinterpret_cast&lt;</span>Tri *<span class="keyword">&gt;</span>(working_space_bytes + get_a_working_size() + get_b_working_size() + diff);</div>
345<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
346<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> k0=0; k0&lt;K; k0 += k_block) {</div>
347<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> kmax = k0 + k_block;</div>
348<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">if</span> (kmax &gt; K) kmax = K;</div>
349<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;</div>
350<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// Figure out how many &quot;K&quot; the kernel will actually process.</span></div>
351<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keywordtype">int</span> kern_k = ((kmax - k0) + (strat.k_unroll - 1)) / strat.k_unroll;</div>
352<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; kern_k *= strat.k_unroll;</div>
353<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;</div>
354<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; prof(<a class="code" href="profiler_8hpp.xhtml#ac19bf2c5c388b9fb21cd0668475b2cf7">PROFILE_PREPA</a>, [&amp;](<span class="keywordtype">void</span>) {</div>
355<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; <span class="keywordflow">if</span> (trA ^ strategy::A_transpose) {</div>
356<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; Transform&lt;strategy::A_interleave, strategy::A_block, true&gt;(a_panel, <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a>, lda, 0, M, k0, kmax);</div>
357<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; } <span class="keywordflow">else</span> {</div>
358<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; Transform&lt;strategy::A_interleave, strategy::A_block, false&gt;(a_panel, <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">A</a>, lda, 0, M, k0, kmax);</div>
359<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; }</div>
360<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; });</div>
361<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div>
362<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> x0=0; x0&lt;N; x0 += x_block) {</div>
363<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> xmax = x0 + x_block;</div>
364<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; <span class="keywordflow">if</span> (xmax &gt; N) xmax = N;</div>
365<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div>
366<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keywordtype">int</span> bblocks = (xmax - x0 + strat.out_width - 1) / strat.out_width;</div>
367<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160;</div>
368<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; prof(<a class="code" href="profiler_8hpp.xhtml#af0477dfaa86fc08825cb3f31212f423c">PROFILE_PREPB</a>, [&amp;](<span class="keywordtype">void</span>) {</div>
369<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordflow">if</span> (trB ^ strategy::B_transpose) {</div>
370<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; Transform&lt;strategy::B_interleave, strategy::B_block, true&gt;(b_panel, <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a>, ldb, x0, xmax, k0, kmax);</div>
371<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; } <span class="keywordflow">else</span> {</div>
372<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; Transform&lt;strategy::B_interleave, strategy::B_block, false&gt;(b_panel, <a class="code" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">B</a>, ldb, x0, xmax, k0, kmax);</div>
373<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; }</div>
374<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; });</div>
375<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div>
376<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> y=0; y&lt;M; y+=strat.out_height) {</div>
377<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> ymax = y + strat.out_height;</div>
378<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordflow">if</span> (ymax &gt; M) ymax = M;</div>
379<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div>
380<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; prof(<a class="code" href="profiler_8hpp.xhtml#a97f4e398174b5e094f5262e5d785ac20">PROFILE_KERNEL</a>, [&amp;](<span class="keywordtype">void</span>) { strat.kernel(a_panel + (y * kern_k), b_panel, c_panel, 1, bblocks, kern_k); });</div>
381<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; prof(<a class="code" href="profiler_8hpp.xhtml#a2f7c3e65a9ccab509d7776832f562dd0">PROFILE_MERGE</a>, [&amp;](<span class="keywordtype">void</span>) { MergeResults&lt;strategy::out_width, strategy::out_height&gt;(C, c_panel, ldc, y, ymax, x0, xmax, alpha, (k0==0 ? beta : <span class="keyword">static_cast&lt;</span>Tr<span class="keyword">&gt;</span>(1))); });</div>
382<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; }</div>
383<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; }</div>
384<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; }</div>
385<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; }</div>
386<div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa7fc56270e7a70fa81a5935b72eacbe29">arm_compute::Channel::A</a></div><div class="ttdoc">Alpha channel. </div></div>
387<div class="ttc" id="profiler_8hpp_xhtml_af0477dfaa86fc08825cb3f31212f423c"><div class="ttname"><a href="profiler_8hpp.xhtml#af0477dfaa86fc08825cb3f31212f423c">PROFILE_PREPB</a></div><div class="ttdeci">#define PROFILE_PREPB</div><div class="ttdef"><b>Definition:</b> <a href="profiler_8hpp_source.xhtml#l00095">profiler.hpp:95</a></div></div>
388<div class="ttc" id="namespacearm__compute_xhtml_a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571"><div class="ttname"><a href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa9d5ed678fe57bcca610140957afab571">arm_compute::Channel::B</a></div><div class="ttdoc">Blue channel. </div></div>
389<div class="ttc" id="profiler_8hpp_xhtml_a97f4e398174b5e094f5262e5d785ac20"><div class="ttname"><a href="profiler_8hpp.xhtml#a97f4e398174b5e094f5262e5d785ac20">PROFILE_KERNEL</a></div><div class="ttdeci">#define PROFILE_KERNEL</div><div class="ttdef"><b>Definition:</b> <a href="profiler_8hpp_source.xhtml#l00096">profiler.hpp:96</a></div></div>
390<div class="ttc" id="profiler_8hpp_xhtml_ac19bf2c5c388b9fb21cd0668475b2cf7"><div class="ttname"><a href="profiler_8hpp.xhtml#ac19bf2c5c388b9fb21cd0668475b2cf7">PROFILE_PREPA</a></div><div class="ttdeci">#define PROFILE_PREPA</div><div class="ttdef"><b>Definition:</b> <a href="profiler_8hpp_source.xhtml#l00094">profiler.hpp:94</a></div></div>
391<div class="ttc" id="classprofiler_xhtml"><div class="ttname"><a href="classprofiler.xhtml">profiler</a></div><div class="ttdef"><b>Definition:</b> <a href="profiler_8hpp_source.xhtml#l00084">profiler.hpp:84</a></div></div>
392<div class="ttc" id="profiler_8hpp_xhtml_a2f7c3e65a9ccab509d7776832f562dd0"><div class="ttname"><a href="profiler_8hpp.xhtml#a2f7c3e65a9ccab509d7776832f562dd0">PROFILE_MERGE</a></div><div class="ttdeci">#define PROFILE_MERGE</div><div class="ttdef"><b>Definition:</b> <a href="profiler_8hpp_source.xhtml#l00097">profiler.hpp:97</a></div></div>
393</div><!-- fragment -->
394</div>
395</div>
396<a class="anchor" id="abf5a58f6feffeae31f48b750cba9303d"></a>
397<div class="memitem">
398<div class="memproto">
399<table class="mlabels">
400 <tr>
401 <td class="mlabels-left">
402 <table class="memname">
403 <tr>
404 <td class="memname">size_t get_working_size </td>
405 <td>(</td>
406 <td class="paramname"></td><td>)</td>
407 <td> const</td>
408 </tr>
409 </table>
410 </td>
411 <td class="mlabels-right">
412<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
413 </tr>
414</table>
415</div><div class="memdoc">
416
417<p>Implements <a class="el" href="class_gemm_common.xhtml#a190aa5a4547b7d8d8cbf7b7dc46ca32d">GemmCommon&lt; To, Tr &gt;</a>.</p>
418
419<p>Definition at line <a class="el" href="gemm__interleaved_8hpp_source.xhtml#l00073">73</a> of file <a class="el" href="gemm__interleaved_8hpp_source.xhtml">gemm_interleaved.hpp</a>.</p>
420<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; {</div>
421<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordflow">return</span> get_a_working_size() + get_b_working_size() + get_c_working_size();</div>
422<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; }</div>
423</div><!-- fragment -->
424</div>
425</div>
426<hr/>The documentation for this class was generated from the following file:<ul>
427<li>arm_compute/core/NEON/kernels/assembly/<a class="el" href="gemm__interleaved_8hpp_source.xhtml">gemm_interleaved.hpp</a></li>
428</ul>
429</div><!-- contents -->
430</div><!-- doc-content -->
431<!-- start footer part -->
432<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
433 <ul>
434 <li class="navelem"><a class="el" href="class_gemm_interleaved.xhtml">GemmInterleaved</a></li>
435 <li class="footer">Generated on Thu Sep 28 2017 14:37:54 for Compute Library by
436 <a href="http://www.doxygen.org/index.html">
437 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
438 </ul>
439</div>
440</body>
441</html>