File: a00282.html

package info (click to toggle)
tbb 4.0%2Br233-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 14,396 kB
  • sloc: cpp: 78,709; ansic: 6,200; asm: 950; makefile: 875; sh: 107; pascal: 68
file content (140 lines) | stat: -rw-r--r-- 7,362 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!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&lt; Body &gt; 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&nbsp;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&nbsp;Pages</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="a00383.html">tbb</a>::<a class="el" href="a00282.html">parallel_while</a></div>
<h1>tbb::parallel_while&lt; Body &gt; Class Template Reference<br>
<small>
[<a class="el" href="a00395.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 &lt;<a class="el" href="a00527.html">parallel_while.h</a>&gt;</code>
<p>
<a href="a00084.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&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00282.html#fa297e53d3af2a101e712bc200233e9c">value_type</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</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="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00282.html#36e26ba3880c7bcf804a97ba0cbe133f">parallel_while</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</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="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00282.html#6fcfc973cc56b79c6d0fbb8a31be7e84">~parallel_while</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor cleans up data members before returning. <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename Stream&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="a00282.html#b32a0a6e5e09ebb7fad3e6652c19afe5">run</a> (Stream &amp;stream, const Body &amp;body)</td></tr>

<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>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00282.html#e131c560057a58229992b61eb8dba4c6">add</a> (const <a class="el" href="a00282.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &amp;item)</td></tr>

<tr><td class="mdescLeft">&nbsp;</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&lt;typename Body&gt;<br>
 class tbb::parallel_while&lt; Body &gt;</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 &amp;item)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Body&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00282.html">tbb::parallel_while</a>&lt; Body &gt;::add           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00282.html#fa297e53d3af2a101e712bc200233e9c">value_type</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>item</em>          </td>
          <td>&nbsp;)&nbsp;</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 &amp;stream, const Body &amp;body)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Body&gt; </div>
<div class="memtemplate">
template&lt;typename Stream&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="a00282.html">tbb::parallel_while</a>&lt; Body &gt;::run           </td>
          <td>(</td>
          <td class="paramtype">Stream &amp;&nbsp;</td>
          <td class="paramname"> <em>stream</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const Body &amp;&nbsp;</td>
          <td class="paramname"> <em>body</em></td><td>&nbsp;</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="a00527.html">parallel_while.h</a></ul>
<hr>
<p></p>
Copyright &copy; 2005-2011 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.