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.

206 lines
15 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.4"/>
  7. <title>tbb::interface6::task_scheduler_observer Class Reference</title>
  8. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  9. <script type="text/javascript" src="jquery.js"></script>
  10. <script type="text/javascript" src="dynsections.js"></script>
  11. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  12. </head>
  13. <body>
  14. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  15. <!-- end header part -->
  16. <!-- Generated by Doxygen 1.8.4 -->
  17. <div id="navrow1" class="tabs">
  18. <ul class="tablist">
  19. <li><a href="index.html"><span>Main&#160;Page</span></a></li>
  20. <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
  21. <li><a href="modules.html"><span>Modules</span></a></li>
  22. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  23. <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
  24. <li><a href="files.html"><span>Files</span></a></li>
  25. </ul>
  26. </div>
  27. <div id="navrow2" class="tabs2">
  28. <ul class="tablist">
  29. <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
  30. <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
  31. <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
  32. </ul>
  33. </div>
  34. <div id="nav-path" class="navpath">
  35. <ul>
  36. <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>
  37. </div>
  38. </div><!-- top -->
  39. <div class="header">
  40. <div class="summary">
  41. <a href="#pub-methods">Public Member Functions</a> &#124;
  42. <a href="#friends">Friends</a> &#124;
  43. <a href="a00365.html">List of all members</a> </div>
  44. <div class="headertitle">
  45. <div class="title">tbb::interface6::task_scheduler_observer Class Reference</div> </div>
  46. </div><!--header-->
  47. <div class="contents">
  48. <div class="dynheader">
  49. Inheritance diagram for tbb::interface6::task_scheduler_observer:</div>
  50. <div class="dyncontent">
  51. <div class="center">
  52. <img src="a00142.png" usemap="#tbb::interface6::task_scheduler_observer_map" alt=""/>
  53. <map id="tbb::interface6::task_scheduler_observer_map" name="tbb::interface6::task_scheduler_observer_map">
  54. <area href="a00143.html" alt="tbb::internal::task_scheduler_observer_v3" shape="rect" coords="0,0,247,24"/>
  55. </map>
  56. </div></div>
  57. <table class="memberdecls">
  58. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  59. Public Member Functions</h2></td></tr>
  60. <tr class="memitem:a89025b1e1d42e97d6fe114c0c331f730"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#a89025b1e1d42e97d6fe114c0c331f730">task_scheduler_observer</a> (bool local=false)</td></tr>
  61. <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>
  62. <tr class="separator:a89025b1e1d42e97d6fe114c0c331f730"><td class="memSeparator" colspan="2">&#160;</td></tr>
  63. <tr class="memitem:a36e7e0c466320029d5a3e50a573e04c1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#a36e7e0c466320029d5a3e50a573e04c1">task_scheduler_observer</a> (task_arena &amp;a)</td></tr>
  64. <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>
  65. <tr class="separator:a36e7e0c466320029d5a3e50a573e04c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. <tr class="memitem:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9ef3f1853439b46e5a9db7fd1c0f9116"></a>
  67. virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#a9ef3f1853439b46e5a9db7fd1c0f9116">~task_scheduler_observer</a> ()</td></tr>
  68. <tr class="memdesc:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor additionally protects concurrent on_scheduler_leaving notification. <br/></td></tr>
  69. <tr class="separator:a9ef3f1853439b46e5a9db7fd1c0f9116"><td class="memSeparator" colspan="2">&#160;</td></tr>
  70. <tr class="memitem:afd3842518d9a37efb3c8455b22950bb8"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00142.html#afd3842518d9a37efb3c8455b22950bb8">on_scheduler_leaving</a> ()</td></tr>
  71. <tr class="memdesc:afd3842518d9a37efb3c8455b22950bb8"><td class="mdescLeft">&#160;</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>
  72. <tr class="separator:afd3842518d9a37efb3c8455b22950bb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. <tr class="inherit_header pub_methods_a00143"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_a00143')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="a00143.html">tbb::internal::task_scheduler_observer_v3</a></td></tr>
  74. <tr class="memitem:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top">void __TBB_EXPORTED_METHOD&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a40209b347e3c82bb5bfda05941304309">observe</a> (bool state=true)</td></tr>
  75. <tr class="memdesc:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable or disable observation. <a href="#a40209b347e3c82bb5bfda05941304309">More...</a><br/></td></tr>
  76. <tr class="separator:a40209b347e3c82bb5bfda05941304309 inherit pub_methods_a00143"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a31abaf256f7172f010cfb2259c7787bb"></a>
  78. bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a31abaf256f7172f010cfb2259c7787bb">is_observing</a> () const </td></tr>
  79. <tr class="memdesc:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if observation is enabled, false otherwise. <br/></td></tr>
  80. <tr class="separator:a31abaf256f7172f010cfb2259c7787bb inherit pub_methods_a00143"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25bffb05efaaab36bc58590969e29745"></a>
  82. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a25bffb05efaaab36bc58590969e29745">task_scheduler_observer_v3</a> ()</td></tr>
  83. <tr class="memdesc:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct observer with observation disabled. <br/></td></tr>
  84. <tr class="separator:a25bffb05efaaab36bc58590969e29745 inherit pub_methods_a00143"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#af4282a27725fbe86052bb785bdd9c5d3">on_scheduler_entry</a> (bool)</td></tr>
  86. <tr class="memdesc:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Entry notification. <a href="#af4282a27725fbe86052bb785bdd9c5d3">More...</a><br/></td></tr>
  87. <tr class="separator:af4282a27725fbe86052bb785bdd9c5d3 inherit pub_methods_a00143"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. <tr class="memitem:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a657e90f833568e217b807d0122fa7668">on_scheduler_exit</a> (bool)</td></tr>
  89. <tr class="memdesc:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exit notification. <a href="#a657e90f833568e217b807d0122fa7668">More...</a><br/></td></tr>
  90. <tr class="separator:a657e90f833568e217b807d0122fa7668 inherit pub_methods_a00143"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00143"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a151e475ebba39172fcc13f43bed426cc"></a>
  92. virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00143.html#a151e475ebba39172fcc13f43bed426cc">~task_scheduler_observer_v3</a> ()</td></tr>
  93. <tr class="memdesc:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00143"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor automatically switches observation off if it is enabled. <br/></td></tr>
  94. <tr class="separator:a151e475ebba39172fcc13f43bed426cc inherit pub_methods_a00143"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. </table><table class="memberdecls">
  96. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
  97. Friends</h2></td></tr>
  98. <tr class="memitem:a567691ababd2dee2c44d1d6d4b9b093a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a567691ababd2dee2c44d1d6d4b9b093a"></a>
  99. class&#160;</td><td class="memItemRight" valign="bottom"><b>internal::task_scheduler_observer_v3</b></td></tr>
  100. <tr class="separator:a567691ababd2dee2c44d1d6d4b9b093a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  101. <tr class="memitem:ae3fb165cd890fab10c1d09823dcb0ac9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae3fb165cd890fab10c1d09823dcb0ac9"></a>
  102. class&#160;</td><td class="memItemRight" valign="bottom"><b>internal::observer_proxy</b></td></tr>
  103. <tr class="separator:ae3fb165cd890fab10c1d09823dcb0ac9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  104. <tr class="memitem:a5d0d193bf27a1606466663c68e05e1b3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5d0d193bf27a1606466663c68e05e1b3"></a>
  105. class&#160;</td><td class="memItemRight" valign="bottom"><b>internal::observer_list</b></td></tr>
  106. <tr class="separator:a5d0d193bf27a1606466663c68e05e1b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  107. </table>
  108. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  109. <a class="anchor" id="a89025b1e1d42e97d6fe114c0c331f730"></a>
  110. <div class="memitem">
  111. <div class="memproto">
  112. <table class="mlabels">
  113. <tr>
  114. <td class="mlabels-left">
  115. <table class="memname">
  116. <tr>
  117. <td class="memname">tbb::interface6::task_scheduler_observer::task_scheduler_observer </td>
  118. <td>(</td>
  119. <td class="paramtype">bool&#160;</td>
  120. <td class="paramname"><em>local</em> = <code>false</code>)</td><td></td>
  121. <td></td>
  122. </tr>
  123. </table>
  124. </td>
  125. <td class="mlabels-right">
  126. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  127. </tr>
  128. </table>
  129. </div><div class="memdoc">
  130. <p>Construct local or global observer in inactive state (observation disabled). </p>
  131. <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>
  132. <p>References <a class="el" href="a00222.html#adb86d08473679d6fe0eabcdc766ffe3aa73cb2e2bcb94442b8b2b72e93a76f2e5">tbb::relaxed</a>.</p>
  133. </div>
  134. </div>
  135. <a class="anchor" id="a36e7e0c466320029d5a3e50a573e04c1"></a>
  136. <div class="memitem">
  137. <div class="memproto">
  138. <table class="mlabels">
  139. <tr>
  140. <td class="mlabels-left">
  141. <table class="memname">
  142. <tr>
  143. <td class="memname">tbb::interface6::task_scheduler_observer::task_scheduler_observer </td>
  144. <td>(</td>
  145. <td class="paramtype">task_arena &amp;&#160;</td>
  146. <td class="paramname"><em>a</em>)</td><td></td>
  147. <td></td>
  148. </tr>
  149. </table>
  150. </td>
  151. <td class="mlabels-right">
  152. <span class="mlabels"><span class="mlabel">inline</span></span> </td>
  153. </tr>
  154. </table>
  155. </div><div class="memdoc">
  156. <p>Construct local observer for a given arena in inactive state (observation disabled). </p>
  157. <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>
  158. <p>References <a class="el" href="a00222.html#adb86d08473679d6fe0eabcdc766ffe3aa73cb2e2bcb94442b8b2b72e93a76f2e5">tbb::relaxed</a>.</p>
  159. </div>
  160. </div>
  161. <h2 class="groupheader">Member Function Documentation</h2>
  162. <a class="anchor" id="afd3842518d9a37efb3c8455b22950bb8"></a>
  163. <div class="memitem">
  164. <div class="memproto">
  165. <table class="mlabels">
  166. <tr>
  167. <td class="mlabels-left">
  168. <table class="memname">
  169. <tr>
  170. <td class="memname">virtual bool tbb::interface6::task_scheduler_observer::on_scheduler_leaving </td>
  171. <td>(</td>
  172. <td class="paramname">)</td><td></td>
  173. <td></td>
  174. </tr>
  175. </table>
  176. </td>
  177. <td class="mlabels-right">
  178. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  179. </tr>
  180. </table>
  181. </div><div class="memdoc">
  182. <p>The callback can be invoked in a worker thread before it leaves an arena. </p>
  183. <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>
  184. </div>
  185. </div>
  186. <hr/>The documentation for this class was generated from the following file:<ul>
  187. <li>task_scheduler_observer.h</li>
  188. </ul>
  189. </div><!-- contents -->
  190. <hr>
  191. <p></p>
  192. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  193. <p></p>
  194. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  195. registered trademarks or trademarks of Intel Corporation or its
  196. subsidiaries in the United States and other countries.
  197. <p></p>
  198. * Other names and brands may be claimed as the property of others.