You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<!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 Page</span></a></li> <li><a href="pages.html"><span>Related 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 List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="a00222.html">tbb</a></li><li class="navelem"><b>interface6</b></li><li class="navelem"><a class="el" href="a00142.html">task_scheduler_observer</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#friends">Friends</a> | <a href="a00365.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="a00142.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="a00143.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-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a89025b1e1d42e97d6fe114c0c331f730"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#a89025b1e1d42e97d6fe114c0c331f730">task_scheduler_observer</a> (bool local=false)</td></tr> <tr class="memdesc:a89025b1e1d42e97d6fe114c0c331f730"><td class="mdescLeft"> </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"> </td></tr> <tr class="memitem:a36e7e0c466320029d5a3e50a573e04c1"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#a36e7e0c466320029d5a3e50a573e04c1">task_scheduler_observer</a> (task_arena &a)</td></tr> <tr class="memdesc:a36e7e0c466320029d5a3e50a573e04c1"><td class="mdescLeft"> </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"> </td></tr> <tr class="memitem:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ef3f1853439b46e5a9db7fd1c0f9116"></a> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#a9ef3f1853439b46e5a9db7fd1c0f9116">~task_scheduler_observer</a> ()</td></tr> <tr class="memdesc:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="mdescLeft"> </td><td class="mdescRight">Destructor additionally protects concurrent on_scheduler_leaving notification. <br/></td></tr> <tr class="separator:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:afd3842518d9a37efb3c8455b22950bb8"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#afd3842518d9a37efb3c8455b22950bb8">on_scheduler_leaving</a> ()</td></tr> <tr class="memdesc:afd3842518d9a37efb3c8455b22950bb8"><td class="mdescLeft"> </td><td class="mdescRight">The callback can be invoked in a worker thread before it leaves an arena. <a href="#afd3842518d9a37efb3c8455b22950bb8">More...</a><br/></td></tr> <tr class="separator:afd3842518d9a37efb3c8455b22950bb8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_a00143"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_a00143')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="a00143.html">tbb::internal::task_scheduler_observer_v3</a></td></tr> <tr class="memitem:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top">void __TBB_EXPORTED_METHOD </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a40209b347e3c82bb5bfda05941304309">observe</a> (bool state=true)</td></tr> <tr class="memdesc:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00143"><td class="mdescLeft"> </td><td class="mdescRight">Enable or disable observation. <a href="#a40209b347e3c82bb5bfda05941304309">More...</a><br/></td></tr> <tr class="separator:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00143"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31abaf256f7172f010cfb2259c7787bb"></a> bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a31abaf256f7172f010cfb2259c7787bb">is_observing</a> () const </td></tr> <tr class="memdesc:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00143"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if observation is enabled, false otherwise. <br/></td></tr> <tr class="separator:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00143"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25bffb05efaaab36bc58590969e29745"></a>  </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a25bffb05efaaab36bc58590969e29745">task_scheduler_observer_v3</a> ()</td></tr> <tr class="memdesc:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00143"><td class="mdescLeft"> </td><td class="mdescRight">Construct observer with observation disabled. <br/></td></tr> <tr class="separator:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00143"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#af4282a27725fbe86052bb785bdd9c5d3">on_scheduler_entry</a> (bool)</td></tr> <tr class="memdesc:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00143"><td class="mdescLeft"> </td><td class="mdescRight">Entry notification. <a href="#af4282a27725fbe86052bb785bdd9c5d3">More...</a><br/></td></tr> <tr class="separator:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00143"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a657e90f833568e217b807d0122fa7668">on_scheduler_exit</a> (bool)</td></tr> <tr class="memdesc:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00143"><td class="mdescLeft"> </td><td class="mdescRight">Exit notification. <a href="#a657e90f833568e217b807d0122fa7668">More...</a><br/></td></tr> <tr class="separator:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00143"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a151e475ebba39172fcc13f43bed426cc"></a> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a151e475ebba39172fcc13f43bed426cc">~task_scheduler_observer_v3</a> ()</td></tr> <tr class="memdesc:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00143"><td class="mdescLeft"> </td><td class="mdescRight">Destructor automatically switches observation off if it is enabled. <br/></td></tr> <tr class="separator:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00143"><td class="memSeparator" colspan="2"> </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 </td><td class="memItemRight" valign="bottom"><b>internal::task_scheduler_observer_v3</b></td></tr> <tr class="separator:a567691ababd2dee2c44d1d6d4b9b093a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae3fb165cd890fab10c1d09823dcb0ac9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3fb165cd890fab10c1d09823dcb0ac9"></a> class </td><td class="memItemRight" valign="bottom"><b>internal::observer_proxy</b></td></tr> <tr class="separator:ae3fb165cd890fab10c1d09823dcb0ac9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5d0d193bf27a1606466663c68e05e1b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d0d193bf27a1606466663c68e05e1b3"></a> class </td><td class="memItemRight" valign="bottom"><b>internal::observer_list</b></td></tr> <tr class="separator:a5d0d193bf27a1606466663c68e05e1b3"><td class="memSeparator" colspan="2"> </td></tr> </table> <h2 class="groupheader">Constructor & 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 </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>
<p>References <a class="el" href="a00222.html#adb86d08473679d6fe0eabcdc766ffe3aa73cb2e2bcb94442b8b2b72e93a76f2e5">tbb::relaxed</a>.</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 & </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>
<p>References <a class="el" href="a00222.html#adb86d08473679d6fe0eabcdc766ffe3aa73cb2e2bcb94442b8b2b72e93a76f2e5">tbb::relaxed</a>.</p>
</div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="afd3842518d9a37efb3c8455b22950bb8"></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::on_scheduler_leaving </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 in a worker thread before it leaves an arena. </p> <p>If it returns false, the thread remains in the arena. Will not be called for masters or if the worker leaves arena due to rebalancing or priority changes, etc. NOTE: The preview library must be linked for this method to take effect </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 © 2005-2014 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.
|