blob: a2a81dcc2712ddde09472a441f47960fc2fb2e53 [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: CLGEMM 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">19.08</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_c_l_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">CLGEMM Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Basic function to execute GEMM on OpenCL.
<a href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_c_l_g_e_m_m_8h_source.xhtml">CLGEMM.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for CLGEMM:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_c_l_g_e_m_m__coll__graph.svg" width="90" 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:a07dc013cbab881bdebe30f07204dbde3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a07dc013cbab881bdebe30f07204dbde3">CLGEMM</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:a07dc013cbab881bdebe30f07204dbde3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a07dc013cbab881bdebe30f07204dbde3">More...</a><br /></td></tr>
<tr class="separator:a07dc013cbab881bdebe30f07204dbde3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d6349f009b4f8b0cede0b6bd0a65e71"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a3d6349f009b4f8b0cede0b6bd0a65e71">CLGEMM</a> (const <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</a> &amp;)=delete</td></tr>
<tr class="memdesc:a3d6349f009b4f8b0cede0b6bd0a65e71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a3d6349f009b4f8b0cede0b6bd0a65e71">More...</a><br /></td></tr>
<tr class="separator:a3d6349f009b4f8b0cede0b6bd0a65e71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19d221206d1e442f4b5dd29ecb582a70"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a19d221206d1e442f4b5dd29ecb582a70">CLGEMM</a> (<a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a19d221206d1e442f4b5dd29ecb582a70"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move constructor. <a href="#a19d221206d1e442f4b5dd29ecb582a70">More...</a><br /></td></tr>
<tr class="separator:a19d221206d1e442f4b5dd29ecb582a70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebefa7576807b8b316ea46c242949039"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#aebefa7576807b8b316ea46c242949039">operator=</a> (const <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</a> &amp;)=delete</td></tr>
<tr class="memdesc:aebefa7576807b8b316ea46c242949039"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#aebefa7576807b8b316ea46c242949039">More...</a><br /></td></tr>
<tr class="separator:aebefa7576807b8b316ea46c242949039"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83a121357a2121ef7f0670b3f81e4645"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a83a121357a2121ef7f0670b3f81e4645">operator=</a> (<a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a83a121357a2121ef7f0670b3f81e4645"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move assignment operator. <a href="#a83a121357a2121ef7f0670b3f81e4645">More...</a><br /></td></tr>
<tr class="separator:a83a121357a2121ef7f0670b3f81e4645"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34e7b882208ff6720bad2e4f2c7565c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a34e7b882208ff6720bad2e4f2c7565c5">configure</a> (const <a class="el" href="classarm__compute_1_1_i_c_l_tensor.xhtml">ICLTensor</a> *a, const <a class="el" href="classarm__compute_1_1_i_c_l_tensor.xhtml">ICLTensor</a> *b, const <a class="el" href="classarm__compute_1_1_i_c_l_tensor.xhtml">ICLTensor</a> *c, <a class="el" href="classarm__compute_1_1_i_c_l_tensor.xhtml">ICLTensor</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:a34e7b882208ff6720bad2e4f2c7565c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialise the kernel's inputs and output. <a href="#a34e7b882208ff6720bad2e4f2c7565c5">More...</a><br /></td></tr>
<tr class="separator:a34e7b882208ff6720bad2e4f2c7565c5"><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_c_l_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_c_l_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:a3493ba7d1f2057740ff5931fa00a44ac"><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_c_l_g_e_m_m.xhtml#a3493ba7d1f2057740ff5931fa00a44ac">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_tensor_info.xhtml">ITensorInfo</a> *c, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</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:a3493ba7d1f2057740ff5931fa00a44ac"><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_c_l_g_e_m_m.xhtml">CLGEMM</a>. <a href="#a3493ba7d1f2057740ff5931fa00a44ac">More...</a><br /></td></tr>
<tr class="separator:a3493ba7d1f2057740ff5931fa00a44ac"><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 OpenCL. </p>
<p>This function calls the following OpenCL kernels:</p>
<ol type="1">
<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_reshape_l_h_s_matrix_kernel.xhtml">CLGEMMReshapeLHSMatrixKernel</a> (only if the RESHAPED_V1 is selected by the heuristic model)</li>
<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_reshape_r_h_s_matrix_kernel.xhtml">CLGEMMReshapeRHSMatrixKernel</a> (only if either the RESHAPED_V1 or RESHAPED_ONLY_RHS is selected by the select_gemm_type method())</li>
<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_multiply_kernel.xhtml">CLGEMMMatrixMultiplyKernel</a> (only if either the NATIVE or RESHAPED_V1 is selected by the select_gemm_type method())</li>
<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_multiply_reshaped_kernel.xhtml">CLGEMMMatrixMultiplyReshapedKernel</a> (only if RESHAPED_V1 is selected by the select_gemm_type method())</li>
<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_multiply_reshaped_only_r_h_s_kernel.xhtml">CLGEMMMatrixMultiplyReshapedOnlyRHSKernel</a> (only if RESHAPED_ONLY_RHS is selected by the select_gemm_type method())</li>
<li><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m_matrix_addition_kernel.xhtml">CLGEMMMatrixAdditionKernel</a> (if c != nullptr and beta != 0.0) </li>
</ol>
<p class="definition">Definition at line <a class="el" href="_c_l_g_e_m_m_8h_source.xhtml#l00052">52</a> of file <a class="el" href="_c_l_g_e_m_m_8h_source.xhtml">CLGEMM.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a07dc013cbab881bdebe30f07204dbde3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07dc013cbab881bdebe30f07204dbde3">&#9670;&nbsp;</a></span>CLGEMM() <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_c_l_g_e_m_m.xhtml">CLGEMM</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>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">memory_manager</td><td>(Optional) <a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object.">Memory</a> manager. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml#l00048">48</a> of file <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml">CLGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; : _memory_group(std::move(memory_manager)),</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; _mm_kernel(),</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; _reshape_lhs_kernel(),</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; _reshape_rhs_kernel(),</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; _mm_reshaped_kernel(),</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; _mm_reshaped_only_rhs_kernel(),</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; _tmp_a(),</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; _tmp_b(),</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; _original_b(<span class="keyword">nullptr</span>),</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; _reshape_b_only_on_first_run(<span class="keyword">false</span>),</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; _is_prepared(<span class="keyword">false</span>),</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; _gemm_type(GEMMType::NATIVE)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;{</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a3d6349f009b4f8b0cede0b6bd0a65e71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d6349f009b4f8b0cede0b6bd0a65e71">&#9670;&nbsp;</a></span>CLGEMM() <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_c_l_g_e_m_m.xhtml">CLGEMM</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</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="a19d221206d1e442f4b5dd29ecb582a70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19d221206d1e442f4b5dd29ecb582a70">&#9670;&nbsp;</a></span>CLGEMM() <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_c_l_g_e_m_m.xhtml">CLGEMM</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</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="a34e7b882208ff6720bad2e4f2c7565c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34e7b882208ff6720bad2e4f2c7565c5">&#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_c_l_tensor.xhtml">ICLTensor</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_c_l_tensor.xhtml">ICLTensor</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_c_l_tensor.xhtml">ICLTensor</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_c_l_tensor.xhtml">ICLTensor</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: 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. <a class="el" href="classarm__compute_1_1_g_e_m_m_info.xhtml" title="GEMM information class.">GEMMInfo</a> also contains information about the reshaping in case matrix A and matrix B have been already transformed. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml#l00470">470</a> of file <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml">CLGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160;{</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</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="l00473"></a><span class="lineno"> 473</span>&#160;</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160; <span class="comment">// Perform validation step</span></div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; <a class="code" href="_error_8h.xhtml#a938dcd406ce611ef5345ad2531cdb948">ARM_COMPUTE_ERROR_THROW_ON</a>(<a class="code" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a3493ba7d1f2057740ff5931fa00a44ac">validate</a>(a-&gt;info(), <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>-&gt;info(), c != <span class="keyword">nullptr</span> ? c-&gt;info() : <span class="keyword">nullptr</span>, output-&gt;info(), <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160;</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</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="l00478"></a><span class="lineno"> 478</span>&#160; _reshape_b_only_on_first_run = gemm_info.reshape_b_only_on_first_run();</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; _is_prepared = gemm_info.retain_internal_weights();</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160; _original_b = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>;</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; <span class="comment">// Get the GPU target</span></div><div class="line"><a name="l00483"></a><span class="lineno"> 483</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_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a27561688e2fc60176608ef725a4ecb30">target</a>();</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160; <span class="keywordtype">bool</span> reinterpret_input_as_3d = gemm_info.reinterpret_input_as_3d();</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m = reinterpret_input_as_3d ? (a-&gt;info()-&gt;dimension(1) * a-&gt;info()-&gt;dimension(2)) : a-&gt;info()-&gt;dimension(1);</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</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="l00487"></a><span class="lineno"> 487</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> k = a-&gt;info()-&gt;dimension(0);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; <span class="comment">// Select GEMMType</span></div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; _gemm_type = select_gemm_type(m, n, k, a-&gt;info()-&gt;data_type(), _reshape_b_only_on_first_run, gpu_target);</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160;</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> fuse_add_c = (!(<a class="code" href="namespacearm__compute_1_1helpers_1_1float__ops.xhtml#a3bd19352aed7410633d1f9b95d74a809">helpers::float_ops::is_zero</a>(beta)) &amp;&amp; c != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160;</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160; <span class="keyword">const</span> ICLTensor *c_to_use = fuse_add_c ? c : <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160;</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; <span class="keywordflow">switch</span>(_gemm_type)</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160; {</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160; <span class="keywordflow">case</span> GEMMType::NATIVE:</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; {</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160; configure_native(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info);</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160; }</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_V1:</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160; {</div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>&#160; configure_reshaped_v1(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info);</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160; }</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_V2:</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; {</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; configure_reshaped_v2(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info);</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; }</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_ONLY_RHS:</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160; {</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160; configure_reshaped_only_rhs(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info);</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160; }</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160; {</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;GEMMType not supported&quot;</span>);</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; }</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160; }</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00261">Error.h:261</a></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_c_l_scheduler_xhtml_a9b58d0eb9a2af8e6d7908695e1557d6c"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">arm_compute::CLScheduler::get</a></div><div class="ttdeci">static CLScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler.cpp:41</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_a27561688e2fc60176608ef725a4ecb30"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a27561688e2fc60176608ef725a4ecb30">arm_compute::CLScheduler::target</a></div><div class="ttdeci">GPUTarget target() const</div><div class="ttdoc">Get the target GPU.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8h_source.xhtml#l00112">CLScheduler.h:112</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#l00327">Error.h:327</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 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="namespacearm__compute_1_1helpers_1_1float__ops_xhtml_a3bd19352aed7410633d1f9b95d74a809"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1float__ops.xhtml#a3bd19352aed7410633d1f9b95d74a809">arm_compute::helpers::float_ops::is_zero</a></div><div class="ttdeci">bool is_zero(float a, float epsilon=0.00001f)</div><div class="ttdoc">Checks if the input floating point number is 0.0f checking if the difference is within a range define...</div><div class="ttdef"><b>Definition:</b> <a href="float__ops_8h_source.xhtml#l00109">float_ops.h:109</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_g_e_m_m_xhtml_a3493ba7d1f2057740ff5931fa00a44ac"><div class="ttname"><a href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#a3493ba7d1f2057740ff5931fa00a44ac">arm_compute::CLGEMM::validate</a></div><div class="ttdeci">static Status validate(const ITensorInfo *a, const ITensorInfo *b, const ITensorInfo *c, const ITensorInfo *output, float alpha, float beta, const GEMMInfo &amp;gemm_info=GEMMInfo())</div><div class="ttdoc">Static function to check if given info will lead to a valid configuration of CLGEMM.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_g_e_m_m_8cpp_source.xhtml#l00525">CLGEMM.cpp:525</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#l00261">ARM_COMPUTE_ERROR</a>, <a class="el" href="_validate_8h_source.xhtml#l00161">ARM_COMPUTE_ERROR_ON_NULLPTR</a>, <a class="el" href="_error_8h_source.xhtml#l00327">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="classarm__compute_1_1_i_tensor_info.xhtml#a7cfb31af63202568efef5214acfbf3ba">ITensorInfo::data_type()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler::get()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="float__ops_8h_source.xhtml#l00109">arm_compute::helpers::float_ops::is_zero()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01967">GEMMInfo::reinterpret_input_as_3d()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01951">GEMMInfo::reshape_b_only_on_first_run()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01975">GEMMInfo::retain_internal_weights()</a>, <a class="el" href="_c_l_scheduler_8h_source.xhtml#l00112">CLScheduler::target()</a>, and <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml#l00525">CLGEMM::validate()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_r_n_n_layer_8cpp_source.xhtml#l00069">CLRNNLayer::configure()</a>, <a class="el" href="_c_l_winograd_convolution_layer_8cpp_source.xhtml#l00098">CLWinogradConvolutionLayer::configure()</a>, <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00056">CLLSTMLayer::configure()</a>, and <a class="el" href="_c_l_g_e_m_m_deconvolution_layer_8cpp_source.xhtml#l00186">CLGEMMDeconvolutionLayer::configure()</a>.</p>
</div>
</div>
<a id="aebefa7576807b8b316ea46c242949039"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebefa7576807b8b316ea46c242949039">&#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_c_l_g_e_m_m.xhtml">CLGEMM</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</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="a83a121357a2121ef7f0670b3f81e4645"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83a121357a2121ef7f0670b3f81e4645">&#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_c_l_g_e_m_m.xhtml">CLGEMM</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml">CLGEMM</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="_c_l_g_e_m_m_8cpp_source.xhtml#l00632">632</a> of file <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml">CLGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160;{</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>&#160; <span class="keywordflow">if</span>(!_is_prepared)</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>&#160; {</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>&#160; <span class="keywordflow">if</span>(_gemm_type != GEMMType::NATIVE &amp;&amp; _reshape_b_only_on_first_run)</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>&#160; {</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>&#160; <span class="comment">// Run transpose kernel and mark original weights tensor as unused</span></div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160; _tmp_b.<a class="code" href="classarm__compute_1_1_c_l_tensor.xhtml#a4083de30daebd6bdee6b35d9c8262108">allocator</a>()-&gt;<a class="code" href="classarm__compute_1_1_c_l_tensor_allocator.xhtml#a6e509c2a177b0b29e9e2369535094dee">allocate</a>();</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_reshape_rhs_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</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="l00642"></a><span class="lineno"> 642</span>&#160; }</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ad381d1aed28b4b1e1f5a710633934580">queue</a>().finish();</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>&#160; _is_prepared = <span class="keyword">true</span>;</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>&#160; }</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_a9b58d0eb9a2af8e6d7908695e1557d6c"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">arm_compute::CLScheduler::get</a></div><div class="ttdeci">static CLScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler.cpp:41</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_tensor_xhtml_a4083de30daebd6bdee6b35d9c8262108"><div class="ttname"><a href="classarm__compute_1_1_c_l_tensor.xhtml#a4083de30daebd6bdee6b35d9c8262108">arm_compute::CLTensor::allocator</a></div><div class="ttdeci">CLTensorAllocator * allocator()</div><div class="ttdoc">Return a pointer to the tensor's allocator.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_tensor_8cpp_source.xhtml#l00055">CLTensor.cpp:55</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_c_l_scheduler_xhtml_ae1a643e517f50bf0392fb6516dd7cf67"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">arm_compute::CLScheduler::enqueue</a></div><div class="ttdeci">void enqueue(ICLKernel &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="_c_l_scheduler_8cpp_source.xhtml#l00095">CLScheduler.cpp:95</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_ad381d1aed28b4b1e1f5a710633934580"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#ad381d1aed28b4b1e1f5a710633934580">arm_compute::CLScheduler::queue</a></div><div class="ttdeci">cl::CommandQueue &amp; queue()</div><div class="ttdoc">Accessor for the associated CL command queue.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8h_source.xhtml#l00102">CLScheduler.h:102</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_tensor_allocator_xhtml_a6e509c2a177b0b29e9e2369535094dee"><div class="ttname"><a href="classarm__compute_1_1_c_l_tensor_allocator.xhtml#a6e509c2a177b0b29e9e2369535094dee">arm_compute::CLTensorAllocator::allocate</a></div><div class="ttdeci">void allocate() override</div><div class="ttdoc">Allocate size specified by TensorInfo of OpenCL memory.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_tensor_allocator_8cpp_source.xhtml#l00119">CLTensorAllocator.cpp:119</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_c_l_tensor_allocator_8cpp_source.xhtml#l00119">CLTensorAllocator::allocate()</a>, <a class="el" href="_c_l_tensor_8cpp_source.xhtml#l00055">CLTensor::allocator()</a>, <a class="el" href="_c_l_scheduler_8cpp_source.xhtml#l00095">CLScheduler::enqueue()</a>, <a class="el" href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler::get()</a>, <a class="el" href="_i_tensor_8cpp_source.xhtml#l00167">ITensor::mark_as_unused()</a>, and <a class="el" href="_c_l_scheduler_8h_source.xhtml#l00102">CLScheduler::queue()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_r_n_n_layer_8cpp_source.xhtml#l00119">CLRNNLayer::prepare()</a>, <a class="el" href="_c_l_winograd_convolution_layer_8cpp_source.xhtml#l00216">CLWinogradConvolutionLayer::prepare()</a>, <a class="el" href="_c_l_g_e_m_m_deconvolution_layer_8cpp_source.xhtml#l00334">CLGEMMDeconvolutionLayer::prepare()</a>, <a class="el" href="_c_l_fully_connected_layer_8cpp_source.xhtml#l00383">CLFullyConnectedLayer::prepare()</a>, <a class="el" href="_c_l_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00600">CLGEMMConvolutionLayer::prepare()</a>, and <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml#l00572">CLGEMM::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_c_l_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="_c_l_g_e_m_m_8cpp_source.xhtml#l00572">572</a> of file <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml">CLGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160;{</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#aa9b93ef660fc3c5b4b19d3fc7b891b77">prepare</a>();</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160;</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160; MemoryGroupResourceScope scope_mg(_memory_group);</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160;</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160; <span class="comment">// Run matrix multiply kernel</span></div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; <span class="keywordflow">switch</span>(_gemm_type)</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160; {</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160; <span class="keywordflow">case</span> GEMMType::NATIVE:</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160; {</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_mm_kernel, <span class="keyword">true</span>);</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160; }</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_V1:</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160; {</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160; <span class="comment">// Run interleave kernel</span></div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_reshape_lhs_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; <span class="keywordflow">if</span>(!_reshape_b_only_on_first_run)</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160; {</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160; <span class="comment">// Run transpose kernel</span></div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_reshape_rhs_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160; }</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160;</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_mm_kernel, <span class="keyword">true</span>);</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160; }</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_V2:</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160; {</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span>&#160; <span class="comment">// Run interleave kernel</span></div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_reshape_lhs_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>&#160;</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>&#160; <span class="keywordflow">if</span>(!_reshape_b_only_on_first_run)</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>&#160; {</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>&#160; <span class="comment">// Run transpose kernel</span></div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_reshape_rhs_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160; }</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>&#160;</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_mm_reshaped_kernel, <span class="keyword">true</span>);</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160; }</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_ONLY_RHS:</div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>&#160; {</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>&#160; <span class="keywordflow">if</span>(!_reshape_b_only_on_first_run)</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>&#160; {</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160; <span class="comment">// Run transpose kernel</span></div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_reshape_rhs_kernel, <span class="keyword">false</span>);</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160; }</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160;</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>&#160; <a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">enqueue</a>(_mm_reshaped_only_rhs_kernel, <span class="keyword">true</span>);</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>&#160; }</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>&#160; {</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>&#160; <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;GEMMType not supported&quot;</span>);</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>&#160; }</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>&#160; }</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00261">Error.h:261</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_g_e_m_m_xhtml_aa9b93ef660fc3c5b4b19d3fc7b891b77"><div class="ttname"><a href="classarm__compute_1_1_c_l_g_e_m_m.xhtml#aa9b93ef660fc3c5b4b19d3fc7b891b77">arm_compute::CLGEMM::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="_c_l_g_e_m_m_8cpp_source.xhtml#l00632">CLGEMM.cpp:632</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_a9b58d0eb9a2af8e6d7908695e1557d6c"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">arm_compute::CLScheduler::get</a></div><div class="ttdeci">static CLScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler.cpp:41</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_ae1a643e517f50bf0392fb6516dd7cf67"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#ae1a643e517f50bf0392fb6516dd7cf67">arm_compute::CLScheduler::enqueue</a></div><div class="ttdeci">void enqueue(ICLKernel &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="_c_l_scheduler_8cpp_source.xhtml#l00095">CLScheduler.cpp:95</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00261">ARM_COMPUTE_ERROR</a>, <a class="el" href="_c_l_scheduler_8cpp_source.xhtml#l00095">CLScheduler::enqueue()</a>, <a class="el" href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler::get()</a>, and <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml#l00632">CLGEMM::prepare()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_r_n_n_layer_8cpp_source.xhtml#l00104">CLRNNLayer::run()</a>, <a class="el" href="_c_l_winograd_convolution_layer_8cpp_source.xhtml#l00200">CLWinogradConvolutionLayer::run()</a>, <a class="el" href="_c_l_g_e_m_m_deconvolution_layer_8cpp_source.xhtml#l00301">CLGEMMDeconvolutionLayer::run()</a>, <a class="el" href="_c_l_fully_connected_layer_8cpp_source.xhtml#l00347">CLFullyConnectedLayer::run()</a>, <a class="el" href="_c_l_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00563">CLGEMMConvolutionLayer::run()</a>, and <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00619">CLLSTMLayer::run()</a>.</p>
</div>
</div>
<a id="a3493ba7d1f2057740ff5931fa00a44ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3493ba7d1f2057740ff5931fa00a44ac">&#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_tensor_info.xhtml">ITensorInfo</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">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>
</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_c_l_g_e_m_m.xhtml">CLGEMM</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 info (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 info (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 info (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">[in]</td><td class="paramname">output</td><td>Output tensor info. 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="_c_l_g_e_m_m_8cpp_source.xhtml#l00525">525</a> of file <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml">CLGEMM.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160;{</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="comment">// Get the GPU target</span></div><div class="line"><a name="l00528"></a><span class="lineno"> 528</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_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">CLScheduler::get</a>().<a class="code" href="classarm__compute_1_1_c_l_scheduler.xhtml#a27561688e2fc60176608ef725a4ecb30">target</a>();</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>&#160; <span class="keywordtype">bool</span> reinterpret_input_as_3d = gemm_info.reinterpret_input_as_3d();</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m = reinterpret_input_as_3d ? (a-&gt;dimension(1) * a-&gt;dimension(2)) : a-&gt;dimension(1);</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> n = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>-&gt;dimension(0);</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> k = a-&gt;dimension(0);</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160;</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; <span class="comment">// Select GEMMType</span></div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; GEMMType gemm_type = select_gemm_type(m, n, k, a-&gt;data_type(), gemm_info.reshape_b_only_on_first_run(), gpu_target);</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160;</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> fuse_add_c = (!(<a class="code" href="namespacearm__compute_1_1helpers_1_1float__ops.xhtml#a3bd19352aed7410633d1f9b95d74a809">helpers::float_ops::is_zero</a>(beta)) &amp;&amp; c != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160;</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; <span class="keyword">const</span> ITensorInfo *c_to_use = fuse_add_c ? c : <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160;</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160; <span class="keywordflow">switch</span>(gemm_type)</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; {</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160; <span class="keywordflow">case</span> GEMMType::NATIVE:</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>&#160; {</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>&#160; <a class="code" href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a>(validate_native(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>&#160; }</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_V1:</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160; {</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160; <a class="code" href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a>(validate_reshaped_v1(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160; }</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_V2:</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160; {</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160; <a class="code" href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a>(validate_reshaped_v2(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; }</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160; <span class="keywordflow">case</span> GEMMType::RESHAPED_ONLY_RHS:</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160; {</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160; <a class="code" href="_error_8h.xhtml#a8a1e1c105f0bdaf37db408c7cfcb77a4">ARM_COMPUTE_RETURN_ON_ERROR</a>(validate_reshaped_only_rhs(a, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>, c_to_use, output, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a3161c2c93c655dd30953372064ec627b">alpha</a>, beta, gemm_info));</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160; <span class="keywordflow">break</span>;</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160; }</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>&#160; <span class="keywordflow">default</span>:</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160; {</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>&#160; <a class="code" href="_error_8h.xhtml#a9561091f3566e78ad3aa39259bc4126a">ARM_COMPUTE_RETURN_ERROR_MSG</a>(<span class="stringliteral">&quot;GEMMType not supported&quot;</span>);</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160; }</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160; }</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160;</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160; <span class="keywordflow">return</span> Status{};</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</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="classarm__compute_1_1_c_l_scheduler_xhtml_a9b58d0eb9a2af8e6d7908695e1557d6c"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a9b58d0eb9a2af8e6d7908695e1557d6c">arm_compute::CLScheduler::get</a></div><div class="ttdeci">static CLScheduler &amp; get()</div><div class="ttdoc">Access the scheduler singleton.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler.cpp:41</a></div></div>
<div class="ttc" id="classarm__compute_1_1_c_l_scheduler_xhtml_a27561688e2fc60176608ef725a4ecb30"><div class="ttname"><a href="classarm__compute_1_1_c_l_scheduler.xhtml#a27561688e2fc60176608ef725a4ecb30">arm_compute::CLScheduler::target</a></div><div class="ttdeci">GPUTarget target() const</div><div class="ttdoc">Get the target GPU.</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_scheduler_8h_source.xhtml#l00112">CLScheduler.h:112</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#l00193">Error.h:193</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 class="ttc" id="_error_8h_xhtml_a9561091f3566e78ad3aa39259bc4126a"><div class="ttname"><a href="_error_8h.xhtml#a9561091f3566e78ad3aa39259bc4126a">ARM_COMPUTE_RETURN_ERROR_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_RETURN_ERROR_MSG(...)</div><div class="ttdoc">An error is returned with the given description.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00183">Error.h:183</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="namespacearm__compute_1_1helpers_1_1float__ops_xhtml_a3bd19352aed7410633d1f9b95d74a809"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1float__ops.xhtml#a3bd19352aed7410633d1f9b95d74a809">arm_compute::helpers::float_ops::is_zero</a></div><div class="ttdeci">bool is_zero(float a, float epsilon=0.00001f)</div><div class="ttdoc">Checks if the input floating point number is 0.0f checking if the difference is within a range define...</div><div class="ttdef"><b>Definition:</b> <a href="float__ops_8h_source.xhtml#l00109">float_ops.h:109</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#l00183">ARM_COMPUTE_RETURN_ERROR_MSG</a>, <a class="el" href="_error_8h_source.xhtml#l00193">ARM_COMPUTE_RETURN_ON_ERROR</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="classarm__compute_1_1_i_tensor_info.xhtml#a7cfb31af63202568efef5214acfbf3ba">ITensorInfo::data_type()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_c_l_scheduler_8cpp_source.xhtml#l00041">CLScheduler::get()</a>, <a class="el" href="float__ops_8h_source.xhtml#l00109">arm_compute::helpers::float_ops::is_zero()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01967">GEMMInfo::reinterpret_input_as_3d()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01951">GEMMInfo::reshape_b_only_on_first_run()</a>, and <a class="el" href="_c_l_scheduler_8h_source.xhtml#l00112">CLScheduler::target()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml#l00470">CLGEMM::configure()</a>, <a class="el" href="_c_l_r_n_n_layer_8cpp_source.xhtml#l00044">CLRNNLayer::validate()</a>, <a class="el" href="_c_l_winograd_convolution_layer_8cpp_source.xhtml#l00149">CLWinogradConvolutionLayer::validate()</a>, <a class="el" href="_c_l_g_e_m_m_deconvolution_layer_8cpp_source.xhtml#l00093">CLGEMMDeconvolutionLayer::validate()</a>, and <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00388">CLLSTMLayer::validate()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>arm_compute/runtime/CL/functions/<a class="el" href="_c_l_g_e_m_m_8h_source.xhtml">CLGEMM.h</a></li>
<li>src/runtime/CL/functions/<a class="el" href="_c_l_g_e_m_m_8cpp_source.xhtml">CLGEMM.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_c_l_g_e_m_m.xhtml">CLGEMM</a></li>
<li class="footer">Generated on Mon Sep 2 2019 11:47:32 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>