| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
| <title>tbb::parallel_while< Body > Class Template Reference</title> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"> |
| <link href="tabs.css" rel="stylesheet" type="text/css"> |
| </head><body> |
| <!-- Generated by Doxygen 1.4.7 --> |
| <div class="tabs"> |
| <ul> |
| <li><a href="index.html"><span>Main Page</span></a></li> |
| <li><a href="modules.html"><span>Modules</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li id="current"><a href="annotated.html"><span>Classes</span></a></li> |
| <li><a href="files.html"><span>Files</span></a></li> |
| <li><a href="pages.html"><span>Related Pages</span></a></li> |
| </ul></div> |
| <div class="tabs"> |
| <ul> |
| <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 class="nav"> |
| <a class="el" href="a00267.html">tbb</a>::<a class="el" href="a00179.html">parallel_while</a></div> |
| <h1>tbb::parallel_while< Body > Class Template Reference<br> |
| <small> |
| [<a class="el" href="a00274.html">Algorithms</a>]</small> |
| </h1><!-- doxytag: class="tbb::parallel_while" -->Parallel iteration over a stream, with optional addition of more work. |
| <a href="#_details">More...</a> |
| <p> |
| <code>#include <<a class="el" href="a00400.html">parallel_while.h</a>></code> |
| <p> |
| <a href="a00043.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> |
| <tr><td></td></tr> |
| <tr><td colspan="2"><br><h2>Public Types</h2></td></tr> |
| <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="" --> |
| typedef Body::argument_type </td><td class="memItemRight" valign="bottom"><a class="el" href="a00179.html#fa297e53d3af2a101e712bc200233e9c">value_type</a></td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Type of items. <br></td></tr> |
| <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> |
| <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="()" --> |
| </td><td class="memItemRight" valign="bottom"><a class="el" href="a00179.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct empty non-running parallel while. <br></td></tr> |
| <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="()" --> |
| </td><td class="memItemRight" valign="bottom"><a class="el" href="a00179.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor cleans up data members before returning. <br></td></tr> |
| <tr><td class="memTemplParams" nowrap colspan="2">template<typename Stream> </td></tr> |
| <tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00179.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &stream, const Body &body)</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Apply body.apply to each item in the stream. <a href="#b32a0a6e5e09ebb7fad3e6652c19afe5"></a><br></td></tr> |
| <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00179.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00179.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &item)</td></tr> |
| |
| <tr><td class="mdescLeft"> </td><td class="mdescRight">Add a work item while running. <a href="#e131c560057a58229992b61eb8dba4c6"></a><br></td></tr> |
| </table> |
| <hr><a name="_details"></a><h2>Detailed Description</h2> |
| <h3>template<typename Body><br> |
| class tbb::parallel_while< Body ></h3> |
| |
| Parallel iteration over a stream, with optional addition of more work. |
| <p> |
| The Body b has the requirement: <br> |
| "b(v)" <br> |
| "b.argument_type" <br> |
| where v is an argument_type |
| <p> |
| <hr><h2>Member Function Documentation</h2> |
| <a class="anchor" name="e131c560057a58229992b61eb8dba4c6"></a><!-- doxytag: member="tbb::parallel_while::add" ref="e131c560057a58229992b61eb8dba4c6" args="(const value_type &item)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename Body> </div> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void <a class="el" href="a00179.html">tbb::parallel_while</a>< Body >::add </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="a00179.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> & </td> |
| <td class="paramname"> <em>item</em> </td> |
| <td> ) </td> |
| <td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| Add a work item while running. |
| <p> |
| Should be executed only by body.apply or a thread spawned therefrom. |
| </div> |
| </div><p> |
| <a class="anchor" name="b32a0a6e5e09ebb7fad3e6652c19afe5"></a><!-- doxytag: member="tbb::parallel_while::run" ref="b32a0a6e5e09ebb7fad3e6652c19afe5" args="(Stream &stream, const Body &body)" --> |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename Body> </div> |
| <div class="memtemplate"> |
| template<typename Stream> </div> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void <a class="el" href="a00179.html">tbb::parallel_while</a>< Body >::run </td> |
| <td>(</td> |
| <td class="paramtype">Stream & </td> |
| <td class="paramname"> <em>stream</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">const Body & </td> |
| <td class="paramname"> <em>body</em></td><td> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td><td width="100%"></td> |
| </tr> |
| </table> |
| </div> |
| <div class="memdoc"> |
| |
| <p> |
| Apply body.apply to each item in the stream. |
| <p> |
| A Stream s has the requirements <br> |
| "S::value_type" <br> |
| "s.pop_if_present(value) is convertible to bool |
| </div> |
| </div><p> |
| <hr>The documentation for this class was generated from the following file:<ul> |
| <li><a class="el" href="a00400.html">parallel_while.h</a></ul> |
| <hr> |
| <p></p> |
| Copyright © 2005-2010 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. |