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.

140 lines
7.1 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
  3. <title>tbb::parallel_while&lt; Body &gt; Class Template Reference</title>
  4. <link href="doxygen.css" rel="stylesheet" type="text/css">
  5. <link href="tabs.css" rel="stylesheet" type="text/css">
  6. </head><body>
  7. <!-- Generated by Doxygen 1.4.7 -->
  8. <div class="tabs">
  9. <ul>
  10. <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
  11. <li><a href="modules.html"><span>Modules</span></a></li>
  12. <li><a href="namespaces.html"><span>Namespaces</span></a></li>
  13. <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
  14. <li><a href="files.html"><span>Files</span></a></li>
  15. <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  16. </ul></div>
  17. <div class="tabs">
  18. <ul>
  19. <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
  20. <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
  21. <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  22. </ul></div>
  23. <div class="nav">
  24. <a class="el" href="a00428.html">tbb</a>::<a class="el" href="a00320.html">parallel_while</a></div>
  25. <h1>tbb::parallel_while&lt; Body &gt; Class Template Reference<br>
  26. <small>
  27. [<a class="el" href="a00441.html">Algorithms</a>]</small>
  28. </h1><!-- doxytag: class="tbb::parallel_while" -->Parallel iteration over a stream, with optional addition of more work.
  29. <a href="#_details">More...</a>
  30. <p>
  31. <code>#include &lt;parallel_while.h&gt;</code>
  32. <p>
  33. <a href="a00100.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
  34. <tr><td></td></tr>
  35. <tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
  36. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa297e53d3af2a101e712bc200233e9c"></a><!-- doxytag: member="tbb::parallel_while::value_type" ref="fa297e53d3af2a101e712bc200233e9c" args="" -->
  37. typedef Body::argument_type&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00320.html#fa297e53d3af2a101e712bc200233e9c">value_type</a></td></tr>
  38. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Type of items. <br></td></tr>
  39. <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
  40. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="36e26ba3880c7bcf804a97ba0cbe133f"></a><!-- doxytag: member="tbb::parallel_while::parallel_while" ref="36e26ba3880c7bcf804a97ba0cbe133f" args="()" -->
  41. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00320.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr>
  42. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct empty non-running parallel while. <br></td></tr>
  43. <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6fcfc973cc56b79c6d0fbb8a31be7e84"></a><!-- doxytag: member="tbb::parallel_while::~parallel_while" ref="6fcfc973cc56b79c6d0fbb8a31be7e84" args="()" -->
  44. &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00320.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr>
  45. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor cleans up data members before returning. <br></td></tr>
  46. <tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Stream&gt; </td></tr>
  47. <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00320.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &amp;stream, const Body &amp;body)</td></tr>
  48. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Apply body.apply to each item in the stream. <a href="#b32a0a6e5e09ebb7fad3e6652c19afe5"></a><br></td></tr>
  49. <tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00320.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00320.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &amp;item)</td></tr>
  50. <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a work item while running. <a href="#e131c560057a58229992b61eb8dba4c6"></a><br></td></tr>
  51. </table>
  52. <hr><a name="_details"></a><h2>Detailed Description</h2>
  53. <h3>template&lt;typename Body&gt;<br>
  54. class tbb::parallel_while&lt; Body &gt;</h3>
  55. Parallel iteration over a stream, with optional addition of more work.
  56. <p>
  57. The Body b has the requirement: <br>
  58. "b(v)" <br>
  59. "b.argument_type" <br>
  60. where v is an argument_type
  61. <p>
  62. <hr><h2>Member Function Documentation</h2>
  63. <a class="anchor" name="e131c560057a58229992b61eb8dba4c6"></a><!-- doxytag: member="tbb::parallel_while::add" ref="e131c560057a58229992b61eb8dba4c6" args="(const value_type &amp;item)" -->
  64. <div class="memitem">
  65. <div class="memproto">
  66. <div class="memtemplate">
  67. template&lt;typename Body&gt; </div>
  68. <table class="memname">
  69. <tr>
  70. <td class="memname">void <a class="el" href="a00320.html">tbb::parallel_while</a>&lt; Body &gt;::add </td>
  71. <td>(</td>
  72. <td class="paramtype">const <a class="el" href="a00320.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &amp;&nbsp;</td>
  73. <td class="paramname"> <em>item</em> </td>
  74. <td>&nbsp;)&nbsp;</td>
  75. <td width="100%"></td>
  76. </tr>
  77. </table>
  78. </div>
  79. <div class="memdoc">
  80. <p>
  81. Add a work item while running.
  82. <p>
  83. Should be executed only by body.apply or a thread spawned therefrom.
  84. </div>
  85. </div><p>
  86. <a class="anchor" name="b32a0a6e5e09ebb7fad3e6652c19afe5"></a><!-- doxytag: member="tbb::parallel_while::run" ref="b32a0a6e5e09ebb7fad3e6652c19afe5" args="(Stream &amp;stream, const Body &amp;body)" -->
  87. <div class="memitem">
  88. <div class="memproto">
  89. <div class="memtemplate">
  90. template&lt;typename Body&gt; </div>
  91. <div class="memtemplate">
  92. template&lt;typename Stream&gt; </div>
  93. <table class="memname">
  94. <tr>
  95. <td class="memname">void <a class="el" href="a00320.html">tbb::parallel_while</a>&lt; Body &gt;::run </td>
  96. <td>(</td>
  97. <td class="paramtype">Stream &amp;&nbsp;</td>
  98. <td class="paramname"> <em>stream</em>, </td>
  99. </tr>
  100. <tr>
  101. <td class="paramkey"></td>
  102. <td></td>
  103. <td class="paramtype">const Body &amp;&nbsp;</td>
  104. <td class="paramname"> <em>body</em></td><td>&nbsp;</td>
  105. </tr>
  106. <tr>
  107. <td></td>
  108. <td>)</td>
  109. <td></td><td></td><td width="100%"></td>
  110. </tr>
  111. </table>
  112. </div>
  113. <div class="memdoc">
  114. <p>
  115. Apply body.apply to each item in the stream.
  116. <p>
  117. A Stream s has the requirements <br>
  118. "S::value_type" <br>
  119. "s.pop_if_present(value) is convertible to bool
  120. </div>
  121. </div><p>
  122. <hr>The documentation for this class was generated from the following file:<ul>
  123. <li>parallel_while.h</ul>
  124. <hr>
  125. <p></p>
  126. Copyright &copy; 2005-2013 Intel Corporation. All Rights Reserved.
  127. <p></p>
  128. Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are
  129. registered trademarks or trademarks of Intel Corporation or its
  130. subsidiaries in the United States and other countries.
  131. <p></p>
  132. * Other names and brands may be claimed as the property of others.