blob: 21ae9bd757649495066cfe3891552057e7590403 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.15-->
<!-- Remember to use version doxygen 1.8.15 +-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: GCGEMM Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
&#160;<span id="projectnumber">20.02.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classarm__compute_1_1_g_c_g_e_m_m.xhtml','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">GCGEMM Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Basic function to execute GEMM on OpenGLES Compute.
<a href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_g_c_g_e_m_m_8h_source.xhtml">GCGEMM.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for GCGEMM:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_g_c_g_e_m_m__coll__graph.svg" width="92" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0594de1f88abc329c5cc8df318cca6c4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a0594de1f88abc329c5cc8df318cca6c4">GCGEMM</a> (std::shared_ptr&lt; <a class="el" href="classarm__compute_1_1_i_memory_manager.xhtml">IMemoryManager</a> &gt; memory_manager=nullptr)</td></tr>
<tr class="memdesc:a0594de1f88abc329c5cc8df318cca6c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a0594de1f88abc329c5cc8df318cca6c4">More...</a><br /></td></tr>
<tr class="separator:a0594de1f88abc329c5cc8df318cca6c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a982360fee33aacac95a51a54d93252d0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a982360fee33aacac95a51a54d93252d0">GCGEMM</a> (const <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;)=delete</td></tr>
<tr class="memdesc:a982360fee33aacac95a51a54d93252d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a982360fee33aacac95a51a54d93252d0">More...</a><br /></td></tr>
<tr class="separator:a982360fee33aacac95a51a54d93252d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f9059fa2062c5197a1c37a4f106d616"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a3f9059fa2062c5197a1c37a4f106d616">GCGEMM</a> (<a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a3f9059fa2062c5197a1c37a4f106d616"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move constructor. <a href="#a3f9059fa2062c5197a1c37a4f106d616">More...</a><br /></td></tr>
<tr class="separator:a3f9059fa2062c5197a1c37a4f106d616"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40c629523cd60defececec852c96bde9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a40c629523cd60defececec852c96bde9">operator=</a> (const <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;)=delete</td></tr>
<tr class="memdesc:a40c629523cd60defececec852c96bde9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a40c629523cd60defececec852c96bde9">More...</a><br /></td></tr>
<tr class="separator:a40c629523cd60defececec852c96bde9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a007cee76f844c83fd782c9f7f5183ea8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a007cee76f844c83fd782c9f7f5183ea8">operator=</a> (<a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a007cee76f844c83fd782c9f7f5183ea8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move assignment operator. <a href="#a007cee76f844c83fd782c9f7f5183ea8">More...</a><br /></td></tr>
<tr class="separator:a007cee76f844c83fd782c9f7f5183ea8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8184f9bf2e8f4fdc16cfe7812e229d95"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a8184f9bf2e8f4fdc16cfe7812e229d95">configure</a> (const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *a, const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *b, const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *c, <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *output, float alpha, float beta, const <a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a> &amp;gemm_info=<a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a>())</td></tr>
<tr class="memdesc:a8184f9bf2e8f4fdc16cfe7812e229d95"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise the kernel's inputs and output. <a href="#a8184f9bf2e8f4fdc16cfe7812e229d95">More...</a><br /></td></tr>
<tr class="separator:a8184f9bf2e8f4fdc16cfe7812e229d95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1717410afd0be936c6213a63c8005fb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#ad1717410afd0be936c6213a63c8005fb">run</a> () override</td></tr>
<tr class="memdesc:ad1717410afd0be936c6213a63c8005fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Run the kernels contained in the function. <a href="#ad1717410afd0be936c6213a63c8005fb">More...</a><br /></td></tr>
<tr class="separator:ad1717410afd0be936c6213a63c8005fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9b93ef660fc3c5b4b19d3fc7b891b77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#aa9b93ef660fc3c5b4b19d3fc7b891b77">prepare</a> () override</td></tr>
<tr class="memdesc:aa9b93ef660fc3c5b4b19d3fc7b891b77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepare the function for executing. <a href="#aa9b93ef660fc3c5b4b19d3fc7b891b77">More...</a><br /></td></tr>
<tr class="separator:aa9b93ef660fc3c5b4b19d3fc7b891b77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1_i_function"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_function')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_function.xhtml">IFunction</a></td></tr>
<tr class="memitem:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_function.xhtml#ab921ecc3f3f6ae2b4bd61f3e1998d8c4">~IFunction</a> ()=default</td></tr>
<tr class="memdesc:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="classarm__compute_1_1_i_function.xhtml#ab921ecc3f3f6ae2b4bd61f3e1998d8c4">More...</a><br /></td></tr>
<tr class="separator:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a79dcdcd8851f3c170ff581e993364fbd"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarm__compute_1_1_status.xhtml">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#a79dcdcd8851f3c170ff581e993364fbd">validate</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *a, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *b, const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *c, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *output, const float alpha, const float beta, const <a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a> &amp;gemm_info=<a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a>())</td></tr>
<tr class="memdesc:a79dcdcd8851f3c170ff581e993364fbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Static function to check if given info will lead to a valid configuration of <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a>. <a href="#a79dcdcd8851f3c170ff581e993364fbd">More...</a><br /></td></tr>
<tr class="separator:a79dcdcd8851f3c170ff581e993364fbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Basic function to execute GEMM on OpenGLES Compute. </p>
<p>This function calls the following kernels:</p>
<ol type="1">
<li><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m_interleave4x4_kernel.xhtml">GCGEMMInterleave4x4Kernel</a> (if the output tensor is a matrix)</li>
<li><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m_transpose1x_w_kernel.xhtml">GCGEMMTranspose1xWKernel</a> (if the output tensor is a matrix)</li>
<li><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m_matrix_multiply_kernel.xhtml">GCGEMMMatrixMultiplyKernel</a></li>
<li><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m_matrix_addition_kernel.xhtml">GCGEMMMatrixAdditionKernel</a> (if c != nullptr and beta != 0.0) </li>
</ol>
<p class="definition">Definition at line <a class="el" href="_g_c_g_e_m_m_8h_source.xhtml#l00048">48</a> of file <a class="el" href="_g_c_g_e_m_m_8h_source.xhtml">GCGEMM.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0594de1f88abc329c5cc8df318cca6c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0594de1f88abc329c5cc8df318cca6c4">&#9670;&nbsp;</a></span>GCGEMM() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> </td>
<td>(</td>
<td class="paramtype">std::shared_ptr&lt; <a class="el" href="classarm__compute_1_1_i_memory_manager.xhtml">IMemoryManager</a> &gt;&#160;</td>
<td class="paramname"><em>memory_manager</em> = <code>nullptr</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p class="definition">Definition at line <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00075">75</a> of file <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml">GCGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; : _memory_group(std::move(memory_manager)), _interleave_kernel(), _transpose_kernel(), _mm_kernel(), _ma_kernel(), _tmp_a(), _tmp_b(), _original_b(<span class="keyword">nullptr</span>), _is_interleaved_transposed(<span class="keyword">false</span>),</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; _run_addition(<span class="keyword">false</span>), _reshape_b_only_on_first_run(<span class="keyword">false</span>), _is_prepared(<span class="keyword">false</span>)</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;{</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a982360fee33aacac95a51a54d93252d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a982360fee33aacac95a51a54d93252d0">&#9670;&nbsp;</a></span>GCGEMM() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Prevent instances of this class from being copied (As this class contains pointers) </p>
</div>
</div>
<a id="a3f9059fa2062c5197a1c37a4f106d616"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f9059fa2062c5197a1c37a4f106d616">&#9670;&nbsp;</a></span>GCGEMM() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default move constructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8184f9bf2e8f4fdc16cfe7812e229d95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8184f9bf2e8f4fdc16cfe7812e229d95">&#9670;&nbsp;</a></span>configure()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void configure </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *&#160;</td>
<td class="paramname"><em>b</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *&#160;</td>
<td class="paramname"><em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *&#160;</td>
<td class="paramname"><em>output</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>alpha</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>beta</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a> &amp;&#160;</td>
<td class="paramname"><em>gemm_info</em> = <code><a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a>()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Initialise the kernel's inputs and output. </p>
<dl class="section note"><dt>Note</dt><dd>GEMM: General Matrix Multiply - [alpha * A * B + beta * C].</dd>
<dd>
All tensors must have the same data type.</dd>
<dd>
Whilst the first input tensor can be a vector, the second input tensor must be at least a matrix</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input tensor (Matrix or <a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> A). Data types supported: F32 </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input tensor (Matrix B). Data type supported: same as <code>a</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>Third input tensor (Matrix C). It can be a nullptr if just the multiplication between <code>a</code> and <code>b</code> is needed. Data type supported: same as <code>a</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output tensor. Data type supported: same as <code>a</code> </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">alpha</td><td>Weight of the matrix product </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">beta</td><td>Weight of matrix C </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gemm_info</td><td>(Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should happen only for the first run </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00081">81</a> of file <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml">GCGEMM.cpp</a>.</p>
<div class="fragment"><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; <a class="code" href="_validate_8h.xhtml#a921b705e9e3e0fe928928447869e62a5">ARM_COMPUTE_ERROR_ON_NULLPTR</a>(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, output);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="comment">// Perform validation step</span></div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <a class="code" href="_error_8h.xhtml#a938dcd406ce611ef5345ad2531cdb948">ARM_COMPUTE_ERROR_THROW_ON</a>(validate_arguments(a-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>(), <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>-&gt;info(), c, output-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>(), <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="comment">// Check if we need to reshape the matrix B only on the first run</span></div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; _reshape_b_only_on_first_run = gemm_info.<a class="code" href="classarm__compute_1_1_g_e_m_m_info.xhtml#a4c8f9fa843de1086c27c86a6b8cf4582">reshape_b_only_on_first_run</a>();</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; _is_prepared = <span class="keyword">false</span>;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; _original_b = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *matrix_a = a;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *matrix_b = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <span class="comment">// Get the GPU target</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#a735ac6c2a02e320969625308810444f3">GPUTarget</a> gpu_target = <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#aa550ff0352ff2388e02f7b0a41bf5fe7">get_target</a>();</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="comment">// Set the target for the kernels</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; _interleave_kernel.<a class="code" href="classarm__compute_1_1_i_g_c_kernel.xhtml#ad5ba9d34a3a855bf1dd2e36316ff550a">set_target</a>(gpu_target);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; _mm_kernel.<a class="code" href="classarm__compute_1_1_i_g_c_kernel.xhtml#ad5ba9d34a3a855bf1dd2e36316ff550a">set_target</a>(gpu_target);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <span class="comment">// Arguments used by GEMMReshapeInfo</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="comment">// If we pass the matrix A and matrix B reshaped to GCGEMMMatrixMultiplyKernel, we need to pass m, n, k, mult_transpose1xW_width and mult_interleave4x4_height to GCGEMMReshapeInfo</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="comment">// in order to know how the matrices have been reshaped</span></div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> m = a-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">dimension</a>(1);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> n = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>-&gt;info()-&gt;dimension(0);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> k = a-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">dimension</a>(0);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordtype">int</span> mult_transpose1xW_width = 1;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="keywordtype">int</span> mult_interleave4x4_height = 1;</div><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; <span class="comment">// If the input tensor has less than 16 rows, we run a special version of GEMM without reshaping the input tensors</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; _is_interleaved_transposed = a-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">dimension</a>(1) &gt; 16;</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="keywordflow">if</span>(_is_interleaved_transposed)</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; matrix_a = &amp;_tmp_a;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; matrix_b = &amp;_tmp_b;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// Manage intermediate buffers</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; _memory_group.<a class="code" href="classarm__compute_1_1_memory_group.xhtml#a6fc0a49304c152c20a0f6df0634fb3cd">manage</a>(&amp;_tmp_a);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <span class="keywordflow">if</span>(!_reshape_b_only_on_first_run)</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; {</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; _memory_group.<a class="code" href="classarm__compute_1_1_memory_group.xhtml#a6fc0a49304c152c20a0f6df0634fb3cd">manage</a>(&amp;_tmp_b);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; }</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; <span class="comment">// _tmp_a and _tmp_b will be auto configured in _interleave_kernel and in _transpose_kernel</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="comment">// Configure interleave kernel</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; _interleave_kernel.<a class="code" href="classarm__compute_1_1_g_c_g_e_m_m_interleave4x4_kernel.xhtml#aa029e9740bc43eb3301316be76be3b7e">configure</a>(a, &amp;_tmp_a);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="comment">// Configure transpose kernel</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160; _transpose_kernel.<a class="code" href="classarm__compute_1_1_g_c_g_e_m_m_transpose1x_w_kernel.xhtml#aa029e9740bc43eb3301316be76be3b7e">configure</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, &amp;_tmp_b);</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; _mm_kernel.<a class="code" href="classarm__compute_1_1_g_c_g_e_m_m_matrix_multiply_kernel.xhtml#ada3b192e7f6ec5a8950b57fae93e9166">configure</a>(matrix_a, matrix_b, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, _is_interleaved_transposed, <a class="code" href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml">GEMMReshapeInfo</a>(m, n, k, mult_transpose1xW_width, mult_interleave4x4_height));</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; <span class="keywordflow">if</span>(_is_interleaved_transposed)</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="comment">// Allocate intermediate tensors</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; _tmp_a.<a class="code" href="classarm__compute_1_1_g_c_tensor.xhtml#a44d1d7d909047fe63f5f6c11a9849986">allocator</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">allocate</a>();</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; <span class="keywordflow">if</span>(!_reshape_b_only_on_first_run)</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; {</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; _tmp_b.<a class="code" href="classarm__compute_1_1_g_c_tensor.xhtml#a44d1d7d909047fe63f5f6c11a9849986">allocator</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">allocate</a>();</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; }</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; }</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <span class="comment">// Configure matrix addition kernel</span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <span class="keywordflow">if</span>(beta != 0 &amp;&amp; c != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; {</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; _ma_kernel.<a class="code" href="classarm__compute_1_1_g_c_g_e_m_m_matrix_addition_kernel.xhtml#ad9780f8be8833600c97e756bf6d5082b">configure</a>(c, output, beta);</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; _run_addition = <span class="keyword">true</span>;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_i_tensor_info_xhtml_a178f0d3d87f959e00a743328d95359d2"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">arm_compute::ITensorInfo::dimension</a></div><div class="ttdeci">virtual size_t dimension(size_t index) const =0</div><div class="ttdoc">Return the size of the requested dimension.</div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aa76b4a6e74940dabc5b7fc6b2dab3545"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">arm_compute::test::validation::b</a></div><div class="ttdeci">SimpleTensor&lt; float &gt; b</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">DFT.cpp:157</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_e_m_m_reshape_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml">arm_compute::GEMMReshapeInfo</a></div><div class="ttdoc">GEMM reshape information class.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l01823">Types.h:1823</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_g_c_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1_i_g_c_tensor.xhtml">arm_compute::IGCTensor</a></div><div class="ttdoc">Interface for GLES Compute tensor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_g_c_tensor_8h_source.xhtml#l00035">IGCTensor.h:35</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a938dcd406ce611ef5345ad2531cdb948"><div class="ttname"><a href="_error_8h.xhtml#a938dcd406ce611ef5345ad2531cdb948">ARM_COMPUTE_ERROR_THROW_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_THROW_ON(status)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00455">Error.h:455</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_g_c_kernel_xhtml_ad5ba9d34a3a855bf1dd2e36316ff550a"><div class="ttname"><a href="classarm__compute_1_1_i_g_c_kernel.xhtml#ad5ba9d34a3a855bf1dd2e36316ff550a">arm_compute::IGCKernel::set_target</a></div><div class="ttdeci">void set_target(GPUTarget target)</div><div class="ttdoc">Set the targeted GPU architecture.</div><div class="ttdef"><b>Definition:</b> <a href="_i_g_c_kernel_8h_source.xhtml#l00113">IGCKernel.h:113</a></div></div>
<div class="ttc" id="classarm__compute_1_1_memory_group_xhtml_a6fc0a49304c152c20a0f6df0634fb3cd"><div class="ttname"><a href="classarm__compute_1_1_memory_group.xhtml#a6fc0a49304c152c20a0f6df0634fb3cd">arm_compute::MemoryGroup::manage</a></div><div class="ttdeci">void manage(IMemoryManageable *obj) override</div><div class="ttdoc">Sets a object to be managed by the given memory group.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_group_8h_source.xhtml#l00079">MemoryGroup.h:79</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a9c5f715748222ab9607cc52134b36b0b"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">arm_compute::GCScheduler::get</a></div><div class="ttdeci">static GCScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00070">GCScheduler.cpp:70</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_g_e_m_m_matrix_multiply_kernel_xhtml_ada3b192e7f6ec5a8950b57fae93e9166"><div class="ttname"><a href="classarm__compute_1_1_g_c_g_e_m_m_matrix_multiply_kernel.xhtml#ada3b192e7f6ec5a8950b57fae93e9166">arm_compute::GCGEMMMatrixMultiplyKernel::configure</a></div><div class="ttdeci">void configure(const IGCTensor *input0, const IGCTensor *input1, IGCTensor *output, float alpha, bool is_interleaved_transposed=true, const GEMMReshapeInfo &amp;reshape_info=GEMMReshapeInfo())</div><div class="ttdoc">Initialise the kernel's input, output and alpha.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_g_e_m_m_matrix_multiply_kernel_8cpp_source.xhtml#l00185">GCGEMMMatrixMultiplyKernel.cpp:185</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a0e95dc1e53c361348314873b168ae237"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">arm_compute::ITensor::info</a></div><div class="ttdeci">virtual ITensorInfo * info() const =0</div><div class="ttdoc">Interface to be implemented by the child class to return the tensor's metadata.</div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a3161c2c93c655dd30953372064ec627b"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">arm_compute::test::validation::alpha</a></div><div class="ttdeci">const float alpha</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_accumulate_8cpp_source.xhtml#l00103">Accumulate.cpp:103</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_aa8a4946cd749d482dd996874d295af85"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">arm_compute::ITensorAllocator::allocate</a></div><div class="ttdeci">virtual void allocate()=0</div><div class="ttdoc">Interface to be implemented by the child class to allocate the tensor.</div></div>
<div class="ttc" id="_validate_8h_xhtml_a921b705e9e3e0fe928928447869e62a5"><div class="ttname"><a href="_validate_8h.xhtml#a921b705e9e3e0fe928928447869e62a5">ARM_COMPUTE_ERROR_ON_NULLPTR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)</div><div class="ttdef"><b>Definition:</b> <a href="_validate_8h_source.xhtml#l00161">Validate.h:161</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a735ac6c2a02e320969625308810444f3"><div class="ttname"><a href="namespacearm__compute.xhtml#a735ac6c2a02e320969625308810444f3">arm_compute::GPUTarget</a></div><div class="ttdeci">GPUTarget</div><div class="ttdoc">Available GPU Targets.</div><div class="ttdef"><b>Definition:</b> <a href="_g_p_u_target_8h_source.xhtml#l00034">GPUTarget.h:34</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_e_m_m_info_xhtml_a4c8f9fa843de1086c27c86a6b8cf4582"><div class="ttname"><a href="classarm__compute_1_1_g_e_m_m_info.xhtml#a4c8f9fa843de1086c27c86a6b8cf4582">arm_compute::GEMMInfo::reshape_b_only_on_first_run</a></div><div class="ttdeci">bool reshape_b_only_on_first_run() const</div><div class="ttdoc">Flag which specifies if the reshape of matrix B should executed only for the first.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l02054">Types.h:2054</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_g_e_m_m_matrix_addition_kernel_xhtml_ad9780f8be8833600c97e756bf6d5082b"><div class="ttname"><a href="classarm__compute_1_1_g_c_g_e_m_m_matrix_addition_kernel.xhtml#ad9780f8be8833600c97e756bf6d5082b">arm_compute::GCGEMMMatrixAdditionKernel::configure</a></div><div class="ttdeci">void configure(const IGCTensor *input, IGCTensor *output, float beta)</div><div class="ttdoc">Initialise the kernel's input, output and beta value.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_g_e_m_m_matrix_addition_kernel_8cpp_source.xhtml#l00043">GCGEMMMatrixAdditionKernel.cpp:43</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_aa550ff0352ff2388e02f7b0a41bf5fe7"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#aa550ff0352ff2388e02f7b0a41bf5fe7">arm_compute::GCScheduler::get_target</a></div><div class="ttdeci">GPUTarget get_target() const</div><div class="ttdoc">Get the target GPU.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8h_source.xhtml#l00081">GCScheduler.h:81</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_g_e_m_m_interleave4x4_kernel_xhtml_aa029e9740bc43eb3301316be76be3b7e"><div class="ttname"><a href="classarm__compute_1_1_g_c_g_e_m_m_interleave4x4_kernel.xhtml#aa029e9740bc43eb3301316be76be3b7e">arm_compute::GCGEMMInterleave4x4Kernel::configure</a></div><div class="ttdeci">void configure(const IGCTensor *input, IGCTensor *output)</div><div class="ttdoc">Initialise the kernel's input and output.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_g_e_m_m_interleave4x4_kernel_8cpp_source.xhtml#l00044">GCGEMMInterleave4x4Kernel.cpp:44</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_tensor_xhtml_a44d1d7d909047fe63f5f6c11a9849986"><div class="ttname"><a href="classarm__compute_1_1_g_c_tensor.xhtml#a44d1d7d909047fe63f5f6c11a9849986">arm_compute::GCTensor::allocator</a></div><div class="ttdeci">ITensorAllocator * allocator()</div><div class="ttdoc">Return a pointer to the tensor's allocator.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_tensor_8cpp_source.xhtml#l00034">GCTensor.cpp:34</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_g_e_m_m_transpose1x_w_kernel_xhtml_aa029e9740bc43eb3301316be76be3b7e"><div class="ttname"><a href="classarm__compute_1_1_g_c_g_e_m_m_transpose1x_w_kernel.xhtml#aa029e9740bc43eb3301316be76be3b7e">arm_compute::GCGEMMTranspose1xWKernel::configure</a></div><div class="ttdeci">void configure(const IGCTensor *input, IGCTensor *output)</div><div class="ttdoc">Initialise the kernel's input and output.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_g_e_m_m_transpose1x_w_kernel_8cpp_source.xhtml#l00041">GCGEMMTranspose1xWKernel.cpp:41</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">ITensorAllocator::allocate()</a>, <a class="el" href="_g_c_tensor_8cpp_source.xhtml#l00034">GCTensor::allocator()</a>, <a class="el" href="_n_e_o_n_2_accumulate_8cpp_source.xhtml#l00103">arm_compute::test::validation::alpha</a>, <a class="el" href="_validate_8h_source.xhtml#l00161">ARM_COMPUTE_ERROR_ON_NULLPTR</a>, <a class="el" href="_error_8h_source.xhtml#l00455">ARM_COMPUTE_ERROR_THROW_ON</a>, <a class="el" href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">arm_compute::test::validation::b</a>, <a class="el" href="_g_c_g_e_m_m_matrix_addition_kernel_8cpp_source.xhtml#l00043">GCGEMMMatrixAdditionKernel::configure()</a>, <a class="el" href="_g_c_g_e_m_m_transpose1x_w_kernel_8cpp_source.xhtml#l00041">GCGEMMTranspose1xWKernel::configure()</a>, <a class="el" href="_g_c_g_e_m_m_matrix_multiply_kernel_8cpp_source.xhtml#l00185">GCGEMMMatrixMultiplyKernel::configure()</a>, <a class="el" href="_g_c_g_e_m_m_interleave4x4_kernel_8cpp_source.xhtml#l00044">GCGEMMInterleave4x4Kernel::configure()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00070">GCScheduler::get()</a>, <a class="el" href="_g_c_scheduler_8h_source.xhtml#l00081">GCScheduler::get_target()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="_memory_group_8h_source.xhtml#l00079">MemoryGroup::manage()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l02054">GEMMInfo::reshape_b_only_on_first_run()</a>, and <a class="el" href="_i_g_c_kernel_8h_source.xhtml#l00113">IGCKernel::set_target()</a>.</p>
</div>
</div>
<a id="a40c629523cd60defececec852c96bde9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40c629523cd60defececec852c96bde9">&#9670;&nbsp;</a></span>operator=() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Prevent instances of this class from being copied (As this class contains pointers) </p>
</div>
</div>
<a id="a007cee76f844c83fd782c9f7f5183ea8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a007cee76f844c83fd782c9f7f5183ea8">&#9670;&nbsp;</a></span>operator=() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a> &amp;&amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default move assignment operator. </p>
</div>
</div>
<a id="aa9b93ef660fc3c5b4b19d3fc7b891b77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9b93ef660fc3c5b4b19d3fc7b891b77">&#9670;&nbsp;</a></span>prepare()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void prepare </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Prepare the function for executing. </p>
<p>Any one off pre-processing step required by the function is handled here</p>
<dl class="section note"><dt>Note</dt><dd>Prepare stage might not need all the function's buffers' backing memory to be available in order to execute </dd></dl>
<p>Reimplemented from <a class="el" href="classarm__compute_1_1_i_function.xhtml#a820f7291c24155a2980512fae45aac26">IFunction</a>.</p>
<p class="definition">Definition at line <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00192">192</a> of file <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml">GCGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;{</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="keywordflow">if</span>(!_is_prepared)</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; {</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keywordflow">if</span>(_is_interleaved_transposed &amp;&amp; _reshape_b_only_on_first_run)</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; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!_original_b-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a209ea2ddfdfa80703799c92da8beb643">is_used</a>());</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="comment">// Run transpose kernel</span></div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; _tmp_b.<a class="code" href="classarm__compute_1_1_g_c_tensor.xhtml#a44d1d7d909047fe63f5f6c11a9849986">allocator</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">allocate</a>();</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">dispatch</a>(_transpose_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a2dcf87458fcfdfb5e9fdd369e0320d78">memory_barrier</a>();</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="comment">// Mark original weights tensor as unused</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; _original_b-&gt;<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a9bc00234de9adf8c99a21eb1d7d494c2">mark_as_unused</a>();</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; }</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; _is_prepared = <span class="keyword">true</span>;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; }</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a66a29e27a51a13250143981b0ee4ad19"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">arm_compute::GCScheduler::dispatch</a></div><div class="ttdeci">void dispatch(IGCKernel &amp;kernel, bool flush=true)</div><div class="ttdoc">Schedule the execution of the passed kernel if possible.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00077">GCScheduler.cpp:77</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a209ea2ddfdfa80703799c92da8beb643"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a209ea2ddfdfa80703799c92da8beb643">arm_compute::ITensor::is_used</a></div><div class="ttdeci">bool is_used() const</div><div class="ttdoc">Flags if the tensor is used or not.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_8cpp_source.xhtml#l00162">ITensor.cpp:162</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a2dcf87458fcfdfb5e9fdd369e0320d78"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a2dcf87458fcfdfb5e9fdd369e0320d78">arm_compute::GCScheduler::memory_barrier</a></div><div class="ttdeci">void memory_barrier()</div><div class="ttdoc">Defines a barrier ordering memory transactions.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00086">GCScheduler.cpp:86</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00466">Error.h:466</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a9bc00234de9adf8c99a21eb1d7d494c2"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a9bc00234de9adf8c99a21eb1d7d494c2">arm_compute::ITensor::mark_as_unused</a></div><div class="ttdeci">void mark_as_unused() const</div><div class="ttdoc">Marks a tensor as unused.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_8cpp_source.xhtml#l00167">ITensor.cpp:167</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a9c5f715748222ab9607cc52134b36b0b"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">arm_compute::GCScheduler::get</a></div><div class="ttdeci">static GCScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00070">GCScheduler.cpp:70</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_aa8a4946cd749d482dd996874d295af85"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">arm_compute::ITensorAllocator::allocate</a></div><div class="ttdeci">virtual void allocate()=0</div><div class="ttdoc">Interface to be implemented by the child class to allocate the tensor.</div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_tensor_xhtml_a44d1d7d909047fe63f5f6c11a9849986"><div class="ttname"><a href="classarm__compute_1_1_g_c_tensor.xhtml#a44d1d7d909047fe63f5f6c11a9849986">arm_compute::GCTensor::allocator</a></div><div class="ttdeci">ITensorAllocator * allocator()</div><div class="ttdoc">Return a pointer to the tensor's allocator.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_tensor_8cpp_source.xhtml#l00034">GCTensor.cpp:34</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">ITensorAllocator::allocate()</a>, <a class="el" href="_g_c_tensor_8cpp_source.xhtml#l00034">GCTensor::allocator()</a>, <a class="el" href="_error_8h_source.xhtml#l00466">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00077">GCScheduler::dispatch()</a>, <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00070">GCScheduler::get()</a>, <a class="el" href="_i_tensor_8cpp_source.xhtml#l00162">ITensor::is_used()</a>, <a class="el" href="_i_tensor_8cpp_source.xhtml#l00167">ITensor::mark_as_unused()</a>, and <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00086">GCScheduler::memory_barrier()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00161">GCGEMM::run()</a>.</p>
</div>
</div>
<a id="ad1717410afd0be936c6213a63c8005fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1717410afd0be936c6213a63c8005fb">&#9670;&nbsp;</a></span>run()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void run </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Run the kernels contained in the function. </p>
<p>For NEON kernels:</p><ul>
<li>Multi-threading is used for the kernels which are parallelisable.</li>
<li>By default std::thread::hardware_concurrency() threads are used.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classarm__compute_1_1_c_p_p_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">CPPScheduler::set_num_threads()</a> can be used to manually set the number of threads</dd></dl>
<p>For OpenCL kernels:</p><ul>
<li>All the kernels are enqueued on the queue associated with <a class="el" href="classarm__compute_1_1_c_l_scheduler.xhtml" title="Provides global access to a CL context and command queue.">CLScheduler</a>.</li>
<li>The queue is then flushed.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>The function will not block until the kernels are executed. It is the user's responsibility to wait. </dd>
<dd>
Will call <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#aa9b93ef660fc3c5b4b19d3fc7b891b77" title="Prepare the function for executing.">prepare()</a> on first run if hasn't been done </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1_i_function.xhtml#a18954417d3124a8095783ea13dc6d00b">IFunction</a>.</p>
<p class="definition">Definition at line <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00161">161</a> of file <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml">GCGEMM.cpp</a>.</p>
<div class="fragment"><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; <a class="code" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#aa9b93ef660fc3c5b4b19d3fc7b891b77">prepare</a>();</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <a class="code" href="classarm__compute_1_1_memory_group_resource_scope.xhtml">MemoryGroupResourceScope</a> scope_mg(_memory_group);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordflow">if</span>(_is_interleaved_transposed)</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; {</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="comment">// Run interleave kernel</span></div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">dispatch</a>(_interleave_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="keywordflow">if</span>(!_reshape_b_only_on_first_run)</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// Run transpose kernel</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">dispatch</a>(_transpose_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; }</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a2dcf87458fcfdfb5e9fdd369e0320d78">memory_barrier</a>();</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; <span class="comment">// Run matrix multiply kernel</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">dispatch</a>(_mm_kernel, !_run_addition);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">// Run matrix addition kernel</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; <span class="keywordflow">if</span>(_run_addition)</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; {</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a2dcf87458fcfdfb5e9fdd369e0320d78">memory_barrier</a>();</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">GCScheduler::get</a>().<a class="code" href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">dispatch</a>(_ma_kernel);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; }</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a66a29e27a51a13250143981b0ee4ad19"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a66a29e27a51a13250143981b0ee4ad19">arm_compute::GCScheduler::dispatch</a></div><div class="ttdeci">void dispatch(IGCKernel &amp;kernel, bool flush=true)</div><div class="ttdoc">Schedule the execution of the passed kernel if possible.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00077">GCScheduler.cpp:77</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a2dcf87458fcfdfb5e9fdd369e0320d78"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a2dcf87458fcfdfb5e9fdd369e0320d78">arm_compute::GCScheduler::memory_barrier</a></div><div class="ttdeci">void memory_barrier()</div><div class="ttdoc">Defines a barrier ordering memory transactions.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00086">GCScheduler.cpp:86</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_scheduler_xhtml_a9c5f715748222ab9607cc52134b36b0b"><div class="ttname"><a href="classarm__compute_1_1_g_c_scheduler.xhtml#a9c5f715748222ab9607cc52134b36b0b">arm_compute::GCScheduler::get</a></div><div class="ttdeci">static GCScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_scheduler_8cpp_source.xhtml#l00070">GCScheduler.cpp:70</a></div></div>
<div class="ttc" id="classarm__compute_1_1_g_c_g_e_m_m_xhtml_aa9b93ef660fc3c5b4b19d3fc7b891b77"><div class="ttname"><a href="classarm__compute_1_1_g_c_g_e_m_m.xhtml#aa9b93ef660fc3c5b4b19d3fc7b891b77">arm_compute::GCGEMM::prepare</a></div><div class="ttdeci">void prepare() override</div><div class="ttdoc">Prepare the function for executing.</div><div class="ttdef"><b>Definition:</b> <a href="_g_c_g_e_m_m_8cpp_source.xhtml#l00192">GCGEMM.cpp:192</a></div></div>
<div class="ttc" id="classarm__compute_1_1_memory_group_resource_scope_xhtml"><div class="ttname"><a href="classarm__compute_1_1_memory_group_resource_scope.xhtml">arm_compute::MemoryGroupResourceScope</a></div><div class="ttdoc">Memory group resources scope handling class.</div><div class="ttdef"><b>Definition:</b> <a href="_i_memory_group_8h_source.xhtml#l00082">IMemoryGroup.h:82</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00077">GCScheduler::dispatch()</a>, <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00070">GCScheduler::get()</a>, <a class="el" href="_g_c_scheduler_8cpp_source.xhtml#l00086">GCScheduler::memory_barrier()</a>, and <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00192">GCGEMM::prepare()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_g_c_convolution_layer_8cpp_source.xhtml#l00200">GCConvolutionLayer::run()</a>.</p>
</div>
</div>
<a id="a79dcdcd8851f3c170ff581e993364fbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79dcdcd8851f3c170ff581e993364fbd">&#9670;&nbsp;</a></span>validate()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_status.xhtml">Status</a> validate </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>b</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *&#160;</td>
<td class="paramname"><em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>output</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float&#160;</td>
<td class="paramname"><em>alpha</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const float&#160;</td>
<td class="paramname"><em>beta</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a> &amp;&#160;</td>
<td class="paramname"><em>gemm_info</em> = <code><a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml">GEMMInfo</a>()</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Static function to check if given info will lead to a valid configuration of <a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>First input tensor (Matrix or <a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> A). Data types supported: F16/F32 </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Second input tensor (Matrix B). Data type supported: same as <code>a</code>. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">c</td><td>Third input tensor (Matrix C). It can be a nullptr if just the multiplication between <code>a</code> and <code>b</code> is needed. Data type supported: same as <code>a</code>. </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Output tensor. Data type supported: same as <code>a</code> </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">alpha</td><td>Weight of the matrix product </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">beta</td><td>Weight of matrix C </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gemm_info</td><td>(Optional) Specifies if the matrix A and/or matrix B have been reshaped and if the reshape of matrix B should happen only for the first run</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a status </dd></dl>
<p class="definition">Definition at line <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml#l00155">155</a> of file <a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml">GCGEMM.cpp</a>.</p>
<div class="fragment"><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; <a class="code" href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a>(validate_arguments(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a>{};</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aa76b4a6e74940dabc5b7fc6b2dab3545"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">arm_compute::test::validation::b</a></div><div class="ttdeci">SimpleTensor&lt; float &gt; b</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">DFT.cpp:157</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a8a1e1c105f0bdaf37db408c7cfcb77a4"><div class="ttname"><a href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_RETURN_ON_ERROR(status)</div><div class="ttdoc">Checks if a status contains an error and returns it.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00204">Error.h:204</a></div></div>
<div class="ttc" id="classarm__compute_1_1_status_xhtml"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml">arm_compute::Status</a></div><div class="ttdoc">Status class.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00052">Error.h:52</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a3161c2c93c655dd30953372064ec627b"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">arm_compute::test::validation::alpha</a></div><div class="ttdeci">const float alpha</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_accumulate_8cpp_source.xhtml#l00103">Accumulate.cpp:103</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_accumulate_8cpp_source.xhtml#l00103">arm_compute::test::validation::alpha</a>, <a class="el" href="_error_8h_source.xhtml#l00204">ARM_COMPUTE_RETURN_ON_ERROR</a>, and <a class="el" href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">arm_compute::test::validation::b</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>arm_compute/runtime/GLES_COMPUTE/functions/<a class="el" href="_g_c_g_e_m_m_8h_source.xhtml">GCGEMM.h</a></li>
<li>src/runtime/GLES_COMPUTE/functions/<a class="el" href="_g_c_g_e_m_m_8cpp_source.xhtml">GCGEMM.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m.xhtml">GCGEMM</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:07:13 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>