dust3d/thirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/doc/html/a00146.html

270 lines
18 KiB
HTML
Raw Normal View History

<!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.4"/>
<title>tbb::interface6::task_scheduler_observer 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="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="a00228.html">tbb</a></li><li class="navelem"><b>interface6</b></li><li class="navelem"><a class="el" href="a00146.html">task_scheduler_observer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="a00380.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">tbb::interface6::task_scheduler_observer Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for tbb::interface6::task_scheduler_observer:</div>
<div class="dyncontent">
<div class="center">
<img src="a00146.png" usemap="#tbb::interface6::task_scheduler_observer_map" alt=""/>
<map id="tbb::interface6::task_scheduler_observer_map" name="tbb::interface6::task_scheduler_observer_map">
<area href="a00147.html" alt="tbb::internal::task_scheduler_observer_v3" shape="rect" coords="0,0,247,24"/>
</map>
</div></div>
<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:a065e1b03dd86dd544126ad061ffd5368"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>keep_awake</b> = false,
<b>allow_sleep</b> = true
}</td></tr>
<tr class="memdesc:a065e1b03dd86dd544126ad061ffd5368"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return commands for <a class="el" href="a00146.html#a2390325945912ee7ce58cd9700664ea4" title="The callback can be invoked by a worker thread before it goes to sleep. ">may_sleep()</a> <br/></td></tr>
<tr class="separator:a065e1b03dd86dd544126ad061ffd5368"><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:a89025b1e1d42e97d6fe114c0c331f730"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#a89025b1e1d42e97d6fe114c0c331f730">task_scheduler_observer</a> (bool local=false)</td></tr>
<tr class="memdesc:a89025b1e1d42e97d6fe114c0c331f730"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct local or global observer in inactive state (observation disabled). <a href="#a89025b1e1d42e97d6fe114c0c331f730">More...</a><br/></td></tr>
<tr class="separator:a89025b1e1d42e97d6fe114c0c331f730"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e7e0c466320029d5a3e50a573e04c1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#a36e7e0c466320029d5a3e50a573e04c1">task_scheduler_observer</a> (task_arena &amp;a)</td></tr>
<tr class="memdesc:a36e7e0c466320029d5a3e50a573e04c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct local observer for a given arena in inactive state (observation disabled). <a href="#a36e7e0c466320029d5a3e50a573e04c1">More...</a><br/></td></tr>
<tr class="separator:a36e7e0c466320029d5a3e50a573e04c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#a9ef3f1853439b46e5a9db7fd1c0f9116">~task_scheduler_observer</a> ()</td></tr>
<tr class="separator:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5b33790cea52c61e1fb004a8ed26365"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#ad5b33790cea52c61e1fb004a8ed26365">observe</a> (bool state=true)</td></tr>
<tr class="memdesc:ad5b33790cea52c61e1fb004a8ed26365"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable observation. <a href="#ad5b33790cea52c61e1fb004a8ed26365">More...</a><br/></td></tr>
<tr class="separator:ad5b33790cea52c61e1fb004a8ed26365"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2390325945912ee7ce58cd9700664ea4"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00146.html#a2390325945912ee7ce58cd9700664ea4">may_sleep</a> ()</td></tr>
<tr class="memdesc:a2390325945912ee7ce58cd9700664ea4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The callback can be invoked by a worker thread before it goes to sleep. <a href="#a2390325945912ee7ce58cd9700664ea4">More...</a><br/></td></tr>
<tr class="separator:a2390325945912ee7ce58cd9700664ea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_a00147"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_a00147')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="a00147.html">tbb::internal::task_scheduler_observer_v3</a></td></tr>
<tr class="memitem:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00147"><td class="memItemLeft" align="right" valign="top">void __TBB_EXPORTED_METHOD&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a40209b347e3c82bb5bfda05941304309">observe</a> (bool state=true)</td></tr>
<tr class="memdesc:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable observation. <a href="#a40209b347e3c82bb5bfda05941304309">More...</a><br/></td></tr>
<tr class="separator:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00147"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31abaf256f7172f010cfb2259c7787bb"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a31abaf256f7172f010cfb2259c7787bb">is_observing</a> () const </td></tr>
<tr class="memdesc:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if observation is enabled, false otherwise. <br/></td></tr>
<tr class="separator:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00147"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25bffb05efaaab36bc58590969e29745"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a25bffb05efaaab36bc58590969e29745">task_scheduler_observer_v3</a> ()</td></tr>
<tr class="memdesc:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct observer with observation disabled. <br/></td></tr>
<tr class="separator:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00147"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#af4282a27725fbe86052bb785bdd9c5d3">on_scheduler_entry</a> (bool)</td></tr>
<tr class="memdesc:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Entry notification. <a href="#af4282a27725fbe86052bb785bdd9c5d3">More...</a><br/></td></tr>
<tr class="separator:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00147"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a657e90f833568e217b807d0122fa7668">on_scheduler_exit</a> (bool)</td></tr>
<tr class="memdesc:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exit notification. <a href="#a657e90f833568e217b807d0122fa7668">More...</a><br/></td></tr>
<tr class="separator:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00147"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a151e475ebba39172fcc13f43bed426cc"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00147.html#a151e475ebba39172fcc13f43bed426cc">~task_scheduler_observer_v3</a> ()</td></tr>
<tr class="memdesc:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor automatically switches observation off if it is enabled. <br/></td></tr>
<tr class="separator:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00147"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a567691ababd2dee2c44d1d6d4b9b093a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a567691ababd2dee2c44d1d6d4b9b093a"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>internal::task_scheduler_observer_v3</b></td></tr>
<tr class="separator:a567691ababd2dee2c44d1d6d4b9b093a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3fb165cd890fab10c1d09823dcb0ac9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3fb165cd890fab10c1d09823dcb0ac9"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>internal::observer_proxy</b></td></tr>
<tr class="separator:ae3fb165cd890fab10c1d09823dcb0ac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d0d193bf27a1606466663c68e05e1b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d0d193bf27a1606466663c68e05e1b3"></a>
class&#160;</td><td class="memItemRight" valign="bottom"><b>internal::observer_list</b></td></tr>
<tr class="separator:a5d0d193bf27a1606466663c68e05e1b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a89025b1e1d42e97d6fe114c0c331f730"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">tbb::interface6::task_scheduler_observer::task_scheduler_observer </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>local</em> = <code>false</code>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct local or global observer in inactive state (observation disabled). </p>
<p>For a local observer entry/exit notifications are invoked whenever a worker thread joins/leaves the arena of the observer's owner thread. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. TODO: Obsolete. Global observer semantics is obsolete as it violates master thread isolation guarantees and is not composable. Thus the current default behavior of the constructor is obsolete too and will be changed in one of the future versions of the library. </p>
</div>
</div>
<a class="anchor" id="a36e7e0c466320029d5a3e50a573e04c1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">tbb::interface6::task_scheduler_observer::task_scheduler_observer </td>
<td>(</td>
<td class="paramtype">task_arena &amp;&#160;</td>
<td class="paramname"><em>a</em>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct local observer for a given arena in inactive state (observation disabled). </p>
<p>entry/exit notifications are invoked whenever a thread joins/leaves arena. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. </p>
</div>
</div>
<a class="anchor" id="a9ef3f1853439b46e5a9db7fd1c0f9116"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual tbb::interface6::task_scheduler_observer::~task_scheduler_observer </td>
<td>(</td>
<td class="paramname">)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor protects instance of the observer from concurrent notification. It is recommended to disable observation before destructor of a derived class starts, otherwise it can lead to concurrent notification callback on partly destroyed object </p>
<p>References <a class="el" href="a00146.html#ad5b33790cea52c61e1fb004a8ed26365">observe()</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2390325945912ee7ce58cd9700664ea4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool tbb::interface6::task_scheduler_observer::may_sleep </td>
<td>(</td>
<td class="paramname">)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>The callback can be invoked by a worker thread before it goes to sleep. </p>
<p>If it returns false ('keep_awake'), the thread will keep spinning and looking for work. It will not be called for master threads. </p>
</div>
</div>
<a class="anchor" id="ad5b33790cea52c61e1fb004a8ed26365"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void tbb::interface6::task_scheduler_observer::observe </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>state</em> = <code>true</code>)</td><td></td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable or disable observation. </p>
<p>Warning: concurrent invocations of this method are not safe. Repeated calls with the same state are no-ops. </p>
<p>References <a class="el" href="a00147.html#a40209b347e3c82bb5bfda05941304309">tbb::internal::task_scheduler_observer_v3::observe()</a>, and <a class="el" href="a00228.html#adb86d08473679d6fe0eabcdc766ffe3aa73cb2e2bcb94442b8b2b72e93a76f2e5">tbb::relaxed</a>.</p>
<p>Referenced by <a class="el" href="a00146.html#a9ef3f1853439b46e5a9db7fd1c0f9116">~task_scheduler_observer()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>task_scheduler_observer.h</li>
</ul>
</div><!-- contents -->
<hr>
<p></p>
Copyright &copy; 2005-2016 Intel Corporation. All Rights Reserved.
<p></p>
Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
registered trademarks or trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
<p></p>
* Other names and brands may be claimed as the property of others.