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.

165 lines
8.9 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::parallel_while&lt; Body &gt; Class Template 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"><a class="el" href="a00088.html">parallel_while</a></li> </ul>
  37. </div>
  38. </div><!-- top -->
  39. <div class="header">
  40. <div class="summary">
  41. <a href="#pub-types">Public Types</a> &#124;
  42. <a href="#pub-methods">Public Member Functions</a> &#124;
  43. <a href="a00267.html">List of all members</a> </div>
  44. <div class="headertitle">
  45. <div class="title">tbb::parallel_while&lt; Body &gt; Class Template Reference<div class="ingroups"><a class="el" href="a00234.html">Algorithms</a></div></div> </div>
  46. </div><!--header-->
  47. <div class="contents">
  48. <p>Parallel iteration over a stream, with optional addition of more work.
  49. <a href="a00088.html#details">More...</a></p>
  50. <p><code>#include &lt;parallel_while.h&gt;</code></p>
  51. <div class="dynheader">
  52. Inheritance diagram for tbb::parallel_while&lt; Body &gt;:</div>
  53. <div class="dyncontent">
  54. <div class="center">
  55. <img src="a00088.png" usemap="#tbb::parallel_while&lt; Body &gt;_map" alt=""/>
  56. <map id="tbb::parallel_while&lt; Body &gt;_map" name="tbb::parallel_while&lt; Body &gt;_map">
  57. </map>
  58. </div></div>
  59. <table class="memberdecls">
  60. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  61. Public Types</h2></td></tr>
  62. <tr class="memitem:a2442f019427e608d46801376267e44a8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2442f019427e608d46801376267e44a8"></a>
  63. typedef Body::argument_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00088.html#a2442f019427e608d46801376267e44a8">value_type</a></td></tr>
  64. <tr class="memdesc:a2442f019427e608d46801376267e44a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of items. <br/></td></tr>
  65. <tr class="separator:a2442f019427e608d46801376267e44a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  66. </table><table class="memberdecls">
  67. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  68. Public Member Functions</h2></td></tr>
  69. <tr class="memitem:a220a7307358aa36802c8754ea45ca385"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a220a7307358aa36802c8754ea45ca385"></a>
  70. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00088.html#a220a7307358aa36802c8754ea45ca385">parallel_while</a> ()</td></tr>
  71. <tr class="memdesc:a220a7307358aa36802c8754ea45ca385"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct empty non-running parallel while. <br/></td></tr>
  72. <tr class="separator:a220a7307358aa36802c8754ea45ca385"><td class="memSeparator" colspan="2">&#160;</td></tr>
  73. <tr class="memitem:ac2fd559c8a38639fa1ba97a0d5639ca8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2fd559c8a38639fa1ba97a0d5639ca8"></a>
  74. &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00088.html#ac2fd559c8a38639fa1ba97a0d5639ca8">~parallel_while</a> ()</td></tr>
  75. <tr class="memdesc:ac2fd559c8a38639fa1ba97a0d5639ca8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor cleans up data members before returning. <br/></td></tr>
  76. <tr class="separator:ac2fd559c8a38639fa1ba97a0d5639ca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
  77. <tr class="memitem:a20607ba5faa958144787d980aa850c16"><td class="memTemplParams" colspan="2">template&lt;typename Stream &gt; </td></tr>
  78. <tr class="memitem:a20607ba5faa958144787d980aa850c16"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00088.html#a20607ba5faa958144787d980aa850c16">run</a> (Stream &amp;stream, const Body &amp;body)</td></tr>
  79. <tr class="memdesc:a20607ba5faa958144787d980aa850c16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply body.apply to each item in the stream. <a href="#a20607ba5faa958144787d980aa850c16">More...</a><br/></td></tr>
  80. <tr class="separator:a20607ba5faa958144787d980aa850c16"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a4861989d7f5e3111d264d4d6013e8fe1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00088.html#a4861989d7f5e3111d264d4d6013e8fe1">add</a> (const <a class="el" href="a00088.html#a2442f019427e608d46801376267e44a8">value_type</a> &amp;item)</td></tr>
  82. <tr class="memdesc:a4861989d7f5e3111d264d4d6013e8fe1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a work item while running. <a href="#a4861989d7f5e3111d264d4d6013e8fe1">More...</a><br/></td></tr>
  83. <tr class="separator:a4861989d7f5e3111d264d4d6013e8fe1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. </table>
  85. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  86. <div class="textblock"><h3>template&lt;typename Body&gt;<br/>
  87. class tbb::parallel_while&lt; Body &gt;</h3>
  88. <p>Parallel iteration over a stream, with optional addition of more work. </p>
  89. <p>The Body b has the requirement: <br/>
  90. "b(v)" <br/>
  91. "b.argument_type" <br/>
  92. where v is an argument_type </p>
  93. </div><h2 class="groupheader">Member Function Documentation</h2>
  94. <a class="anchor" id="a4861989d7f5e3111d264d4d6013e8fe1"></a>
  95. <div class="memitem">
  96. <div class="memproto">
  97. <div class="memtemplate">
  98. template&lt;typename Body &gt; </div>
  99. <table class="memname">
  100. <tr>
  101. <td class="memname">void <a class="el" href="a00088.html">tbb::parallel_while</a>&lt; Body &gt;::add </td>
  102. <td>(</td>
  103. <td class="paramtype">const <a class="el" href="a00088.html#a2442f019427e608d46801376267e44a8">value_type</a> &amp;&#160;</td>
  104. <td class="paramname"><em>item</em>)</td><td></td>
  105. <td></td>
  106. </tr>
  107. </table>
  108. </div><div class="memdoc">
  109. <p>Add a work item while running. </p>
  110. <p>Should be executed only by body.apply or a thread spawned therefrom. </p>
  111. </div>
  112. </div>
  113. <a class="anchor" id="a20607ba5faa958144787d980aa850c16"></a>
  114. <div class="memitem">
  115. <div class="memproto">
  116. <div class="memtemplate">
  117. template&lt;typename Body &gt; </div>
  118. <div class="memtemplate">
  119. template&lt;typename Stream &gt; </div>
  120. <table class="memname">
  121. <tr>
  122. <td class="memname">void <a class="el" href="a00088.html">tbb::parallel_while</a>&lt; Body &gt;::run </td>
  123. <td>(</td>
  124. <td class="paramtype">Stream &amp;&#160;</td>
  125. <td class="paramname"><em>stream</em>, </td>
  126. </tr>
  127. <tr>
  128. <td class="paramkey"></td>
  129. <td></td>
  130. <td class="paramtype">const Body &amp;&#160;</td>
  131. <td class="paramname"><em>body</em>&#160;</td>
  132. </tr>
  133. <tr>
  134. <td></td>
  135. <td>)</td>
  136. <td></td><td></td>
  137. </tr>
  138. </table>
  139. </div><div class="memdoc">
  140. <p>Apply body.apply to each item in the stream. </p>
  141. <p>A Stream s has the requirements <br/>
  142. "S::value_type" <br/>
  143. "s.pop_if_present(value) is convertible to bool </p>
  144. </div>
  145. </div>
  146. <hr/>The documentation for this class was generated from the following file:<ul>
  147. <li>parallel_while.h</li>
  148. </ul>
  149. </div><!-- contents -->
  150. <hr>
  151. <p></p>
  152. Copyright &copy; 2005-2014 Intel Corporation. All Rights Reserved.
  153. <p></p>
  154. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  155. registered trademarks or trademarks of Intel Corporation or its
  156. subsidiaries in the United States and other countries.
  157. <p></p>
  158. * Other names and brands may be claimed as the property of others.