blob: 11c86f3c5b42a0f1bf3eace0f33483d6e7d89801 [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: IScheduler 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_i_scheduler.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="#nested-classes">Data Structures</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">IScheduler Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classarm__compute_1_1_scheduler.xhtml" title="Configurable scheduler which supports multiple multithreading APIs and choosing between different sch...">Scheduler</a> interface to run kernels.
<a href="classarm__compute_1_1_i_scheduler.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_i_scheduler_8h_source.xhtml">IScheduler.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler_1_1_hints.xhtml">Hints</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classarm__compute_1_1_scheduler.xhtml" title="Configurable scheduler which supports multiple multithreading APIs and choosing between different sch...">Scheduler</a> hints. <a href="classarm__compute_1_1_i_scheduler_1_1_hints.xhtml#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ad3ab921e075d1edd827faf95870aa808"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ad3ab921e075d1edd827faf95870aa808">StrategyHint</a> { <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ad3ab921e075d1edd827faf95870aa808afe6f99ef1ec99efbdc19a9786cf1facc">STATIC</a>,
<a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ad3ab921e075d1edd827faf95870aa808a0fcc90da4811c877ba9f9c12f7d60bc9">DYNAMIC</a>
}</td></tr>
<tr class="memdesc:ad3ab921e075d1edd827faf95870aa808"><td class="mdescLeft">&#160;</td><td class="mdescRight">Strategies available to split a workload. <a href="classarm__compute_1_1_i_scheduler.xhtml#ad3ab921e075d1edd827faf95870aa808">More...</a><br /></td></tr>
<tr class="separator:ad3ab921e075d1edd827faf95870aa808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4cdc00a99619ba76bf79a466cb85d4da"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a4cdc00a99619ba76bf79a466cb85d4da">Workload</a> = std::function&lt; void(const <a class="el" href="structarm__compute_1_1_thread_info.xhtml">ThreadInfo</a> &amp;)&gt;</td></tr>
<tr class="memdesc:a4cdc00a99619ba76bf79a466cb85d4da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signature for the workloads to execute. <a href="#a4cdc00a99619ba76bf79a466cb85d4da">More...</a><br /></td></tr>
<tr class="separator:a4cdc00a99619ba76bf79a466cb85d4da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a34956db09db14c551e9966c9b66036f9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a34956db09db14c551e9966c9b66036f9">IScheduler</a> ()</td></tr>
<tr class="memdesc:a34956db09db14c551e9966c9b66036f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a34956db09db14c551e9966c9b66036f9">More...</a><br /></td></tr>
<tr class="separator:a34956db09db14c551e9966c9b66036f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6d209385481644d97e7ca96072b73eb8"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a6d209385481644d97e7ca96072b73eb8">~IScheduler</a> ()=default</td></tr>
<tr class="memdesc:a6d209385481644d97e7ca96072b73eb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a6d209385481644d97e7ca96072b73eb8">More...</a><br /></td></tr>
<tr class="separator:a6d209385481644d97e7ca96072b73eb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a645ac2d9d4144fd0174296de7eb1e1b5"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a645ac2d9d4144fd0174296de7eb1e1b5">set_num_threads</a> (unsigned int <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ac24584a63e484123e3756d1b2a1c9e2f">num_threads</a>)=0</td></tr>
<tr class="memdesc:a645ac2d9d4144fd0174296de7eb1e1b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of threads the scheduler will use to run the kernels. <a href="#a645ac2d9d4144fd0174296de7eb1e1b5">More...</a><br /></td></tr>
<tr class="separator:a645ac2d9d4144fd0174296de7eb1e1b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac24584a63e484123e3756d1b2a1c9e2f"><td class="memItemLeft" align="right" valign="top">virtual unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ac24584a63e484123e3756d1b2a1c9e2f">num_threads</a> () const =0</td></tr>
<tr class="memdesc:ac24584a63e484123e3756d1b2a1c9e2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of threads that the <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml" title="Pool of threads to automatically split a kernel&#39;s execution among several threads.">SingleThreadScheduler</a> has in his pool. <a href="#ac24584a63e484123e3756d1b2a1c9e2f">More...</a><br /></td></tr>
<tr class="separator:ac24584a63e484123e3756d1b2a1c9e2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e58f95544bd5ac6559a421671bd9842"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a4e58f95544bd5ac6559a421671bd9842">schedule</a> (<a class="el" href="classarm__compute_1_1_i_c_p_p_kernel.xhtml">ICPPKernel</a> *kernel, const <a class="el" href="classarm__compute_1_1_i_scheduler_1_1_hints.xhtml">Hints</a> &amp;hints)=0</td></tr>
<tr class="memdesc:a4e58f95544bd5ac6559a421671bd9842"><td class="mdescLeft">&#160;</td><td class="mdescRight">Runs the kernel in the same thread as the caller synchronously. <a href="#a4e58f95544bd5ac6559a421671bd9842">More...</a><br /></td></tr>
<tr class="separator:a4e58f95544bd5ac6559a421671bd9842"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3becf955da8cad5036399bcb90f1408d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a3becf955da8cad5036399bcb90f1408d">run_tagged_workloads</a> (std::vector&lt; <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a4cdc00a99619ba76bf79a466cb85d4da">Workload</a> &gt; &amp;workloads, const char *tag)</td></tr>
<tr class="memdesc:a3becf955da8cad5036399bcb90f1408d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Execute all the passed workloads. <a href="#a3becf955da8cad5036399bcb90f1408d">More...</a><br /></td></tr>
<tr class="separator:a3becf955da8cad5036399bcb90f1408d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0fd9e7b4f6240c55b4fe6a54d4418b5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_c_p_u_info.xhtml">CPUInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ab0fd9e7b4f6240c55b4fe6a54d4418b5">cpu_info</a> ()</td></tr>
<tr class="memdesc:ab0fd9e7b4f6240c55b4fe6a54d4418b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get CPU info. <a href="#ab0fd9e7b4f6240c55b4fe6a54d4418b5">More...</a><br /></td></tr>
<tr class="separator:ab0fd9e7b4f6240c55b4fe6a54d4418b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6de5358eb9a099cda48662b2fc523ec5"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a6de5358eb9a099cda48662b2fc523ec5">num_threads_hint</a> () const</td></tr>
<tr class="memdesc:a6de5358eb9a099cda48662b2fc523ec5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a hint for the best possible number of execution threads. <a href="#a6de5358eb9a099cda48662b2fc523ec5">More...</a><br /></td></tr>
<tr class="separator:a6de5358eb9a099cda48662b2fc523ec5"><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><a class="el" href="classarm__compute_1_1_scheduler.xhtml" title="Configurable scheduler which supports multiple multithreading APIs and choosing between different sch...">Scheduler</a> interface to run kernels. </p>
<p class="definition">Definition at line <a class="el" href="_i_scheduler_8h_source.xhtml#l00036">36</a> of file <a class="el" href="_i_scheduler_8h_source.xhtml">IScheduler.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a4cdc00a99619ba76bf79a466cb85d4da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4cdc00a99619ba76bf79a466cb85d4da">&#9670;&nbsp;</a></span>Workload</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a4cdc00a99619ba76bf79a466cb85d4da">Workload</a> = std::function&lt;void(const <a class="el" href="structarm__compute_1_1_thread_info.xhtml">ThreadInfo</a> &amp;)&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>Signature for the workloads to execute. </p>
<p class="definition">Definition at line <a class="el" href="_i_scheduler_8h_source.xhtml#l00116">116</a> of file <a class="el" href="_i_scheduler_8h_source.xhtml">IScheduler.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="ad3ab921e075d1edd827faf95870aa808"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3ab921e075d1edd827faf95870aa808">&#9670;&nbsp;</a></span>StrategyHint</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#ad3ab921e075d1edd827faf95870aa808">StrategyHint</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Strategies available to split a workload. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ad3ab921e075d1edd827faf95870aa808afe6f99ef1ec99efbdc19a9786cf1facc"></a>STATIC&#160;</td><td class="fielddoc"><p>Split the workload evenly among the threads. </p>
</td></tr>
<tr><td class="fieldname"><a id="ad3ab921e075d1edd827faf95870aa808a0fcc90da4811c877ba9f9c12f7d60bc9"></a>DYNAMIC&#160;</td><td class="fielddoc"><p>Split the workload dynamically using a bucket system. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="_i_scheduler_8h_source.xhtml#l00040">40</a> of file <a class="el" href="_i_scheduler_8h_source.xhtml">IScheduler.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; STATIC, <span class="comment">/**&lt; Split the workload evenly among the threads */</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; DYNAMIC, <span class="comment">/**&lt; Split the workload dynamically using a bucket system */</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; };</div></div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a34956db09db14c551e9966c9b66036f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34956db09db14c551e9966c9b66036f9">&#9670;&nbsp;</a></span>IScheduler()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_i_scheduler.xhtml">IScheduler</a> </td>
<td>(</td>
<td class="paramname"></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="_i_scheduler_8cpp_source.xhtml#l00031">31</a> of file <a class="el" href="_i_scheduler_8cpp_source.xhtml">IScheduler.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; : _cpu_info()</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <a class="code" href="namespacearm__compute.xhtml#a92d01d03db1530581737484c1290ca16">get_cpu_configuration</a>(_cpu_info);</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="comment">// Work out the best possible number of execution threads</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; _num_threads_hint = <a class="code" href="namespacearm__compute.xhtml#a9a9fa44b29bc17746a0b486626a76e0a">get_threads_hint</a>();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;}</div><div class="ttc" id="namespacearm__compute_xhtml_a92d01d03db1530581737484c1290ca16"><div class="ttname"><a href="namespacearm__compute.xhtml#a92d01d03db1530581737484c1290ca16">arm_compute::get_cpu_configuration</a></div><div class="ttdeci">void get_cpu_configuration(CPUInfo &amp;cpuinfo)</div><div class="ttdoc">This function will try to detect the CPU configuration on the system and will fill the cpuinfo object...</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_u_utils_8cpp_source.xhtml#l00346">CPUUtils.cpp:346</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a9a9fa44b29bc17746a0b486626a76e0a"><div class="ttname"><a href="namespacearm__compute.xhtml#a9a9fa44b29bc17746a0b486626a76e0a">arm_compute::get_threads_hint</a></div><div class="ttdeci">unsigned int get_threads_hint()</div><div class="ttdoc">Some systems have both big and small cores, this fuction computes the minimum number of cores that ar...</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_u_utils_8cpp_source.xhtml#l00401">CPUUtils.cpp:401</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_c_p_u_utils_8cpp_source.xhtml#l00346">arm_compute::get_cpu_configuration()</a>, and <a class="el" href="_c_p_u_utils_8cpp_source.xhtml#l00401">arm_compute::get_threads_hint()</a>.</p>
</div>
</div>
<a id="a6d209385481644d97e7ca96072b73eb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6d209385481644d97e7ca96072b73eb8">&#9670;&nbsp;</a></span>~IScheduler()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ~<a class="el" href="classarm__compute_1_1_i_scheduler.xhtml">IScheduler</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab0fd9e7b4f6240c55b4fe6a54d4418b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0fd9e7b4f6240c55b4fe6a54d4418b5">&#9670;&nbsp;</a></span>cpu_info()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_c_p_u_info.xhtml">CPUInfo</a> &amp; cpu_info </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get CPU info. </p>
<dl class="section return"><dt>Returns</dt><dd>CPU info. </dd></dl>
<p class="definition">Definition at line <a class="el" href="_i_scheduler_8cpp_source.xhtml#l00039">39</a> of file <a class="el" href="_i_scheduler_8cpp_source.xhtml">IScheduler.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;{</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keywordflow">return</span> _cpu_info;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="main_8cpp_source.xhtml#l00093">main()</a>.</p>
</div>
</div>
<a id="ac24584a63e484123e3756d1b2a1c9e2f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac24584a63e484123e3756d1b2a1c9e2f">&#9670;&nbsp;</a></span>num_threads()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual unsigned int num_threads </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the number of threads that the <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml" title="Pool of threads to automatically split a kernel&#39;s execution among several threads.">SingleThreadScheduler</a> has in his pool. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of threads available in <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml" title="Pool of threads to automatically split a kernel&#39;s execution among several threads.">SingleThreadScheduler</a>. </dd></dl>
<p>Implemented in <a class="el" href="classarm__compute_1_1_c_p_p_scheduler.xhtml#a0da94220ee1e0f4928aa31ed0d4b30f7">CPPScheduler</a>, <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#a0da94220ee1e0f4928aa31ed0d4b30f7">OMPScheduler</a>, and <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml#a0da94220ee1e0f4928aa31ed0d4b30f7">SingleThreadScheduler</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_histogram_8cpp_source.xhtml#l00041">NEHistogram::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00346">NEDepthwiseConvolutionAssemblyDispatch::configure()</a>, and <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00270">NEWinogradConvolutionLayer::configure()</a>.</p>
</div>
</div>
<a id="a6de5358eb9a099cda48662b2fc523ec5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6de5358eb9a099cda48662b2fc523ec5">&#9670;&nbsp;</a></span>num_threads_hint()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int num_threads_hint </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a hint for the best possible number of execution threads. </p>
<dl class="section warning"><dt>Warning</dt><dd>In case we can't work out the best number of threads, std::thread::hardware_concurrency() is returned else 1 in case of bare metal builds</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Best possible number of execution threads to use </dd></dl>
<p class="definition">Definition at line <a class="el" href="_i_scheduler_8cpp_source.xhtml#l00044">44</a> of file <a class="el" href="_i_scheduler_8cpp_source.xhtml">IScheduler.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;{</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordflow">return</span> _num_threads_hint;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="_c_p_p_scheduler_8cpp_source.xhtml#l00255">CPPScheduler::set_num_threads()</a>.</p>
</div>
</div>
<a id="a3becf955da8cad5036399bcb90f1408d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3becf955da8cad5036399bcb90f1408d">&#9670;&nbsp;</a></span>run_tagged_workloads()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void run_tagged_workloads </td>
<td>(</td>
<td class="paramtype">std::vector&lt; <a class="el" href="classarm__compute_1_1_i_scheduler.xhtml#a4cdc00a99619ba76bf79a466cb85d4da">Workload</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>workloads</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>tag</em>&#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">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Execute all the passed workloads. </p>
<dl class="section note"><dt>Note</dt><dd>there is no guarantee regarding the order in which the workloads will be executed or whether or not they will be executed in parallel.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">workloads</td><td><a class="el" href="classarm__compute_1_1_array.xhtml" title="Basic implementation of the IArray interface which allocates a static number of T values.">Array</a> of workloads to run </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">tag</td><td>String that can be used by profiling tools to identify the workloads run by the scheduler (Can be null). </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_i_scheduler_8cpp_source.xhtml#l00048">48</a> of file <a class="el" href="_i_scheduler_8cpp_source.xhtml">IScheduler.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;{</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <a class="code" href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a>(tag);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; run_workloads(workloads);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a6dc630a6ae9cc063b3924bcea8dee9d6"><div class="ttname"><a href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a></div><div class="ttdeci">#define ARM_COMPUTE_UNUSED(...)</div><div class="ttdoc">To avoid unused variables warnings.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00152">Error.h:152</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00152">ARM_COMPUTE_UNUSED</a>.</p>
</div>
</div>
<a id="a4e58f95544bd5ac6559a421671bd9842"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e58f95544bd5ac6559a421671bd9842">&#9670;&nbsp;</a></span>schedule()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void schedule </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_i_c_p_p_kernel.xhtml">ICPPKernel</a> *&#160;</td>
<td class="paramname"><em>kernel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_scheduler_1_1_hints.xhtml">Hints</a> &amp;&#160;</td>
<td class="paramname"><em>hints</em>&#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">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Runs the kernel in the same thread as the caller synchronously. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">kernel</td><td><a class="el" href="classarm__compute_1_1_kernel.xhtml" title="Kernel class.">Kernel</a> to execute. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">hints</td><td><a class="el" href="classarm__compute_1_1_i_scheduler_1_1_hints.xhtml" title="Scheduler hints.">Hints</a> for the scheduler. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classarm__compute_1_1_c_p_p_scheduler.xhtml#a8d6828523921b7f9313f64c48550617f">CPPScheduler</a>, <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#a8d6828523921b7f9313f64c48550617f">OMPScheduler</a>, and <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml#a8d6828523921b7f9313f64c48550617f">SingleThreadScheduler</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00695">NEWinogradConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_locally_connected_layer_8cpp_source.xhtml#l00183">NELocallyConnectedLayer::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00335">NEGEMM::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00550">NEGEMMLowpMatrixMultiplyCore::prepare()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00264">NEDeconvolutionLayer::prepare()</a>, <a class="el" href="_i_c_p_p_simple_function_8cpp_source.xhtml#l00035">ICPPSimpleFunction::run()</a>, <a class="el" href="_i_n_e_simple_function_8cpp_source.xhtml#l00036">INESimpleFunction::run()</a>, <a class="el" href="_n_e_simple_assembly_function_8cpp_source.xhtml#l00036">NESimpleAssemblyFunction::run()</a>, <a class="el" href="_n_e_histogram_8cpp_source.xhtml#l00054">NEHistogram::run()</a>, <a class="el" href="_n_e_fill_border_8cpp_source.xhtml#l00036">NEFillBorder::run()</a>, <a class="el" href="_n_e_mean_std_dev_8cpp_source.xhtml#l00041">NEMeanStdDev::run()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_assembly_matrix_multiply_core_8cpp_source.xhtml#l00118">NEGEMMLowpAssemblyMatrixMultiplyCore::run()</a>, <a class="el" href="_n_e_equalize_histogram_8cpp_source.xhtml#l00052">NEEqualizeHistogram::run()</a>, <a class="el" href="_n_e_h_o_g_descriptor_8cpp_source.xhtml#l00096">NEHOGDescriptor::run()</a>, <a class="el" href="_n_e_r_o_i_pooling_layer_8cpp_source.xhtml#l00042">NEROIPoolingLayer::run()</a>, <a class="el" href="_n_e_derivative_8cpp_source.xhtml#l00048">NEDerivative::run()</a>, <a class="el" href="_n_e_convert_fully_connected_weights_8cpp_source.xhtml#l00045">NEConvertFullyConnectedWeights::run()</a>, <a class="el" href="_n_e_min_max_location_8cpp_source.xhtml#l00041">NEMinMaxLocation::run()</a>, <a class="el" href="_n_e_h_o_g_gradient_8cpp_source.xhtml#l00081">NEHOGGradient::run()</a>, <a class="el" href="_n_e_gaussian5x5_8cpp_source.xhtml#l00058">NEGaussian5x5::run()</a>, <a class="el" href="_n_e_range_8cpp_source.xhtml#l00045">NERange::run()</a>, <a class="el" href="_n_e_upsample_layer_8cpp_source.xhtml#l00047">NEUpsampleLayer::run()</a>, <a class="el" href="_n_e_sobel5x5_8cpp_source.xhtml#l00080">NESobel5x5::run()</a>, <a class="el" href="_n_e_sobel7x7_8cpp_source.xhtml#l00080">NESobel7x7::run()</a>, <a class="el" href="_n_e_pooling_layer_8cpp_source.xhtml#l00075">NEPoolingLayer::run()</a>, <a class="el" href="_n_e_fast_corners_8cpp_source.xhtml#l00092">NEFastCorners::run()</a>, <a class="el" href="_n_e_f_f_t1_d_8cpp_source.xhtml#l00127">NEFFT1D::run()</a>, <a class="el" href="_n_e_l2_normalize_layer_8cpp_source.xhtml#l00076">NEL2NormalizeLayer::run()</a>, <a class="el" href="_n_e_reduction_operation_8cpp_source.xhtml#l00221">NEReductionOperation::run()</a>, <a class="el" href="_n_e_stack_layer_8cpp_source.xhtml#l00080">NEStackLayer::run()</a>, <a class="el" href="_n_e_space_to_depth_layer_8cpp_source.xhtml#l00052">NESpaceToDepthLayer::run()</a>, <a class="el" href="_n_e_instance_normalization_layer_8cpp_source.xhtml#l00070">NEInstanceNormalizationLayer::run()</a>, <a class="el" href="_n_e_normalization_layer_8cpp_source.xhtml#l00070">NENormalizationLayer::run()</a>, <a class="el" href="_n_e_im2_col_8cpp_source.xhtml#l00050">NEIm2Col::run()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00552">NEWinogradConvolutionLayer::run()</a>, <a class="el" href="_n_e_scale_8cpp_source.xhtml#l00230">NEScale::run()</a>, <a class="el" href="_n_e_pad_layer_8cpp_source.xhtml#l00247">NEPadLayer::run()</a>, <a class="el" href="_n_e_concatenate_layer_8cpp_source.xhtml#l00177">NEConcatenateLayer::run()</a>, <a class="el" href="_n_e_canny_edge_8cpp_source.xhtml#l00162">NECannyEdge::run()</a>, <a class="el" href="_n_e_r_n_n_layer_8cpp_source.xhtml#l00103">NERNNLayer::run()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00087">NEConvolutionLayerReshapeWeights::run()</a>, <a class="el" href="_n_e_batch_normalization_layer_8cpp_source.xhtml#l00054">NEBatchNormalizationLayer::run()</a>, <a class="el" href="_n_e_optical_flow_8cpp_source.xhtml#l00125">NEOpticalFlow::run()</a>, <a class="el" href="_c_l_harris_corners_8cpp_source.xhtml#l00158">CLHarrisCorners::run()</a>, <a class="el" href="_n_e_harris_corners_8cpp_source.xhtml#l00183">NEHarrisCorners::run()</a>, <a class="el" href="_c_p_p_box_with_non_maxima_suppression_limit_8cpp_source.xhtml#l00217">CPPBoxWithNonMaximaSuppressionLimit::run()</a>, <a class="el" href="_n_e_convolution_8cpp_source.xhtml#l00100">NEConvolutionSquare&lt; matrix_size &gt;::run()</a>, <a class="el" href="_c_l_h_o_g_multi_detection_8cpp_source.xhtml#l00229">CLHOGMultiDetection::run()</a>, <a class="el" href="_n_e_h_o_g_multi_detection_8cpp_source.xhtml#l00230">NEHOGMultiDetection::run()</a>, <a class="el" href="_n_e_gaussian_pyramid_8cpp_source.xhtml#l00114">NEGaussianPyramidHalf::run()</a>, <a class="el" href="_n_e_softmax_layer_8cpp_source.xhtml#l00186">NESoftmaxLayerGeneric&lt; IS_LOG &gt;::run()</a>, <a class="el" href="_n_e_locally_connected_layer_8cpp_source.xhtml#l00167">NELocallyConnectedLayer::run()</a>, <a class="el" href="_n_e_crop_resize_8cpp_source.xhtml#l00101">NECropResize::run()</a>, <a class="el" href="_n_e_fuse_batch_normalization_8cpp_source.xhtml#l00055">NEFuseBatchNormalization::run()</a>, <a class="el" href="_n_e_direct_convolution_layer_8cpp_source.xhtml#l00104">NEDirectConvolutionLayer::run()</a>, <a class="el" href="_n_e_space_to_batch_layer_8cpp_source.xhtml#l00079">NESpaceToBatchLayer::run()</a>, <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00285">NEGEMM::run()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00511">NEDepthwiseConvolutionAssemblyDispatch::run()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00479">NEGEMMLowpMatrixMultiplyCore::run()</a>, <a class="el" href="_n_e_generate_proposals_layer_8cpp_source.xhtml#l00316">NEGenerateProposalsLayer::run()</a>, <a class="el" href="_n_e_l_s_t_m_layer_8cpp_source.xhtml#l00611">NELSTMLayer::run()</a>, <a class="el" href="_n_e_fully_connected_layer_8cpp_source.xhtml#l00381">NEFullyConnectedLayer::run()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00524">NEGEMMConvolutionLayer::run()</a>, and <a class="el" href="src_2runtime_2_utils_8cpp_source.xhtml#l00053">arm_compute::schedule_kernel_on_ctx()</a>.</p>
</div>
</div>
<a id="a645ac2d9d4144fd0174296de7eb1e1b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a645ac2d9d4144fd0174296de7eb1e1b5">&#9670;&nbsp;</a></span>set_num_threads()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void set_num_threads </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>num_threads</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the number of threads the scheduler will use to run the kernels. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">num_threads</td><td>If set to 0, then one thread per CPU core available on the system will be used, otherwise the number of threads specified. </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classarm__compute_1_1_c_p_p_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">CPPScheduler</a>, <a class="el" href="classarm__compute_1_1_o_m_p_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">OMPScheduler</a>, and <a class="el" href="classarm__compute_1_1_single_thread_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">SingleThreadScheduler</a>.</p>
<p class="reference">Referenced by <a class="el" href="main_8cpp_source.xhtml#l00093">main()</a>, and <a class="el" href="_n_e_device_backend_8cpp_source.xhtml#l00074">NEDeviceBackend::setup_backend_context()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>arm_compute/runtime/<a class="el" href="_i_scheduler_8h_source.xhtml">IScheduler.h</a></li>
<li>src/runtime/<a class="el" href="_i_scheduler_8cpp_source.xhtml">IScheduler.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_i_scheduler.xhtml">IScheduler</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:07:14 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>