forked from taskflow/taskflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
core_2taskflow_8hpp_source.html
137 lines (135 loc) · 52.7 KB
/
core_2taskflow_8hpp_source.html
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
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Cpp-Taskflow</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="https://github.com/cpp-taskflow/cpp-taskflow">Cpp-Taskflow</a>
 <span id="projectnumber">2.3.0</span>
</div>
</td>
<td> <div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('core_2taskflow_8hpp_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">core/taskflow.hpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#include <stack></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include "flow_builder.hpp"</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "topology.hpp"</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="keyword">namespace </span><a class="code" href="namespacetf.html">tf</a> {</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html"> 18</a></span> <span class="keyword">class </span><a class="code" href="classtf_1_1Taskflow.html">Taskflow</a> : <span class="keyword">public</span> <a class="code" href="classtf_1_1FlowBuilder.html">FlowBuilder</a> {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keyword">friend</span> <span class="keyword">class </span>Topology;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtf_1_1Executor.html">Executor</a>;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classtf_1_1FlowBuilder.html">FlowBuilder</a>;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <a class="code" href="classtf_1_1Taskflow.html#ade7fc641d136a3f8c96682c08040626a">Taskflow</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& <a class="code" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">name</a>);</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <a class="code" href="classtf_1_1Taskflow.html#ade7fc641d136a3f8c96682c08040626a">Taskflow</a>();</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <span class="keyword">virtual</span> <a class="code" href="classtf_1_1Taskflow.html#a00325e9799c833b75455ba1407b2695c">~Taskflow</a>();</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb">dump</a>(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>& ostream) <span class="keyword">const</span>;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <a class="code" href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb">dump</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Taskflow.html#af4f03bca084deb5c2228ac8936d33649">num_tasks</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Taskflow.html#a224301842d94c44fd7fe99d8ac2ba241">empty</a>() <span class="keyword">const</span>;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="classtf_1_1Taskflow.html">tf::Taskflow</a>& <a class="code" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">name</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>&); </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& <a class="code" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">name</a>() <span class="keyword">const</span> ;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Taskflow.html#a1f00bbe72a1553c9656ecae4d98bb9af">clear</a>();</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> V></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Taskflow.html#a6350d0d6653ae9ae7b94c35e42fffe07">for_each_task</a>(V&& visitor) <span class="keyword">const</span>;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> _name;</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  Graph _graph;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/thread/mutex.html">std::mutex</a> _mtx;</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/list.html">std::list<Topology></a> _topologies;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keywordtype">void</span> _dump(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>&, <span class="keyword">const</span> <a class="code" href="classtf_1_1Taskflow.html">Taskflow</a>*) <span class="keyword">const</span>;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordtype">void</span> _dump(</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>&, </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">const</span> Node*,</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack<const Taskflow*></a>&,</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set<const Taskflow*></a>&</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  ) <span class="keyword">const</span>;</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordtype">void</span> _dump(</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>&,</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keyword">const</span> Graph&,</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack<const Taskflow*></a>&,</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set<const Taskflow*></a>&</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  ) <span class="keyword">const</span>;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> };</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="comment">// Constructor</span></div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a7242a74dcb16731b4e40816647b93305"> 114</a></span> <span class="keyword">inline</span> <a class="code" href="classtf_1_1Taskflow.html#ade7fc641d136a3f8c96682c08040626a">Taskflow::Taskflow</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& name) : </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <a class="code" href="classtf_1_1FlowBuilder.html">FlowBuilder</a> {_graph},</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  _name {name} {</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> }</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="comment">// Constructor</span></div><div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#ade7fc641d136a3f8c96682c08040626a"> 120</a></span> <span class="keyword">inline</span> <a class="code" href="classtf_1_1Taskflow.html#ade7fc641d136a3f8c96682c08040626a">Taskflow::Taskflow</a>() : <a class="code" href="classtf_1_1FlowBuilder.html">FlowBuilder</a>{_graph} {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> }</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span> <span class="comment">// Destructor</span></div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a00325e9799c833b75455ba1407b2695c"> 124</a></span> <span class="keyword">inline</span> <a class="code" href="classtf_1_1Taskflow.html#a00325e9799c833b75455ba1407b2695c">Taskflow::~Taskflow</a>() {</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  assert(_topologies.empty());</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> }</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span> </div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span> <span class="comment">// Procedure:</span></div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a1f00bbe72a1553c9656ecae4d98bb9af"> 129</a></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Taskflow.html#a1f00bbe72a1553c9656ecae4d98bb9af">Taskflow::clear</a>() {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  _graph.clear();</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> </div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span> <span class="comment">// Function: num_noces</span></div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#af4f03bca084deb5c2228ac8936d33649"> 134</a></span> <span class="keyword">inline</span> <span class="keywordtype">size_t</span> <a class="code" href="classtf_1_1Taskflow.html#af4f03bca084deb5c2228ac8936d33649">Taskflow::num_tasks</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordflow">return</span> _graph.size();</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> }</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span> </div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="comment">// Function: empty</span></div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a224301842d94c44fd7fe99d8ac2ba241"> 139</a></span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classtf_1_1Taskflow.html#a224301842d94c44fd7fe99d8ac2ba241">Taskflow::empty</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordflow">return</span> _graph.empty();</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span> }</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span> <span class="comment">// Function: name</span></div><div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a3618eba8122c4deeef28fd611c0a5133"> 144</a></span> <span class="keyword">inline</span> <a class="code" href="classtf_1_1Taskflow.html">Taskflow</a>& <a class="code" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">Taskflow::name</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> &name) {</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  _name = <a class="code" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">name</a>;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> }</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span> </div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span> <span class="comment">// Function: name</span></div><div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0"> 150</a></span> <span class="keyword">inline</span> <span class="keyword">const</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a>& <a class="code" href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">Taskflow::name</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">return</span> _name;</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> }</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span> </div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment">// Function: for_each_task</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">template</span> <<span class="keyword">typename</span> V></div><div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a6350d0d6653ae9ae7b94c35e42fffe07"> 156</a></span> <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Taskflow.html#a6350d0d6653ae9ae7b94c35e42fffe07">Taskflow::for_each_task</a>(V&& visitor)<span class="keyword"> const </span>{</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> i=0; i<_graph._nodes.size(); ++i) {</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  visitor(<a class="code" href="classtf_1_1Task.html">Task</a>(_graph._nodes[i]));</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  }</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span> }</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> </div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> <span class="comment">// Procedure: dump</span></div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb"> 163</a></span> <span class="keyword">inline</span> <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a> <a class="code" href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb">Taskflow::dump</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostringstream.html">std::ostringstream</a> oss;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb">dump</a>(oss);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keywordflow">return</span> oss.str();</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> }</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span> <span class="comment">// Function: dump</span></div><div class="line"><a name="l00170"></a><span class="lineno"><a class="line" href="classtf_1_1Taskflow.html#ac433018262e44b12c4cc9f0c4748d758"> 170</a></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb">Taskflow::dump</a>(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>& os)<span class="keyword"> const </span>{</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  os << <span class="stringliteral">"digraph Taskflow {\n"</span>;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  _dump(os, <span class="keyword">this</span>);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  os << <span class="stringliteral">"}\n"</span>;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> }</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> <span class="comment">// Procedure: _dump</span></div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> Taskflow::_dump(<a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>& os, <span class="keyword">const</span> <a class="code" href="classtf_1_1Taskflow.html">Taskflow</a>* top)<span class="keyword"> const </span>{</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack<const Taskflow*></a> stack;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set<const Taskflow*></a> visited; </div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  </div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  stack.push(top);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  visited.insert(top);</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span> </div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">while</span>(!stack.empty()) {</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  </div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keyword">auto</span> f = stack.top();</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  stack.pop();</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  </div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  os << <span class="stringliteral">"subgraph cluster_p"</span> << f << <span class="stringliteral">" {\nlabel=\"Taskflow: "</span>;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keywordflow">if</span>(f->_name.empty()) os << <span class="charliteral">'p'</span> << f;</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">else</span> os << f->_name;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  os << <span class="stringliteral">"\";\n"</span>;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  _dump(os, f->_graph, stack, visited);</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  os << <span class="stringliteral">"}\n"</span>;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> }</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span> </div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="comment">// Procedure: _dump</span></div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> Taskflow::_dump(</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>& os, </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keyword">const</span> Node* node,</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack<const Taskflow*></a>& stack,</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set<const Taskflow*></a>& visited</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> )<span class="keyword"> const </span>{</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> </div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  os << <span class="charliteral">'p'</span> << node << <span class="stringliteral">"[label=\""</span>;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordflow">if</span>(node->_name.empty()) os << <span class="charliteral">'p'</span> << node;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordflow">else</span> os << node->_name;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  os << <span class="stringliteral">"\" "</span>;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> </div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="comment">// condition node is colored green</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">if</span>(node->_handle.index() == Node::CONDITION_WORK) {</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  os << <span class="stringliteral">" shape=diamond color=black fillcolor=aquamarine style=filled"</span>;</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  }</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span> </div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  os << <span class="stringliteral">"];\n"</span>;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  </div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> s=0; s<node->_successors.size(); ++s) {</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordflow">if</span>(node->_handle.index() == Node::CONDITION_WORK) {</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="comment">// case edge is dashed</span></div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  os << <span class="charliteral">'p'</span> << node << <span class="stringliteral">" -> p"</span> << node->_successors[s] </div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  << <span class="stringliteral">" [style=dashed label=\""</span> << s << <span class="stringliteral">"\"];\n"</span>;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  }</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  os << <span class="charliteral">'p'</span> << node << <span class="stringliteral">" -> p"</span> << node->_successors[s] << <span class="stringliteral">";\n"</span>;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  }</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="comment">// subflow join node</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordflow">if</span>(node->_parent && node->_successors.size() == 0) {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  os << <span class="charliteral">'p'</span> << node << <span class="stringliteral">" -> p"</span> << node->_parent << <span class="stringliteral">";\n"</span>;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  }</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <span class="keywordflow">if</span>(node->_handle.index() == Node::DYNAMIC_WORK) {</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span> </div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keyword">auto</span>& sbg = nstd::get<Node::DynamicWork>(node->_handle).subgraph;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  </div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="comment">//if(node->_subgraph && !node->_subgraph->empty()) {</span></div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  <span class="keywordflow">if</span>(!sbg.empty()) {</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> </div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  os << <span class="stringliteral">"subgraph cluster_p"</span> << node << <span class="stringliteral">" {\nlabel=\"Subflow: "</span>;</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <span class="keywordflow">if</span>(node->_name.empty()) os << <span class="charliteral">'p'</span> << node;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <span class="keywordflow">else</span> os << node->_name;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> </div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  os << <span class="stringliteral">"\";\n"</span> << <span class="stringliteral">"color=blue\n"</span>;</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  _dump(os, sbg, stack, visited);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  os << <span class="stringliteral">"}\n"</span>;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  }</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> }</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span> </div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> <span class="comment">// Procedure: _dump</span></div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> Taskflow::_dump(</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a>& os, </div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keyword">const</span> Graph& graph,</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack<const Taskflow*></a>& stack,</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <a class="codeRef" doxygen="/Users/twhuang/PhD/Code/cpp-taskflow/doxygen/cppreference-doxygen-web.tag.xml:http://en.cppreference.com/w/" href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set<const Taskflow*></a>& visited</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span> )<span class="keyword"> const </span>{</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  </div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span>& n : graph._nodes) {</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> </div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <span class="comment">// regular task</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <span class="keywordflow">if</span>(n->_handle.index() != Node::MODULE_WORK) {</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  _dump(os, n, stack, visited);</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  }</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="comment">// module task</span></div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">else</span> {</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span> </div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keyword">auto</span> module = nstd::get<Node::ModuleWork>(n->_handle).module;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  os << <span class="charliteral">'p'</span> << n << <span class="stringliteral">"[shape=box, color=blue, label=\""</span>;</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="keywordflow">if</span>(n->_name.empty()) os << n;</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">else</span> os << n->_name;</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  os << <span class="stringliteral">" [Taskflow: "</span>;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="keywordflow">if</span>(module->_name.empty()) os << <span class="charliteral">'p'</span> << module;</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordflow">else</span> os << module->_name;</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  os << <span class="stringliteral">"]\"];\n"</span>;</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span> </div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">if</span>(visited.find(module) == visited.end()) {</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  visited.insert(module);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  stack.push(module);</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  }</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span> </div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> s : n->_successors) {</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  os << <span class="charliteral">'p'</span> << n << <span class="stringliteral">"->"</span> << <span class="charliteral">'p'</span> << s << <span class="stringliteral">";\n"</span>;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  }</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  }</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  }</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span> }</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span> </div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> <span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="comment">// Backward compatibility</span></div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span> <span class="comment">// ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span> </div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span> <span class="keyword">using</span> Framework = Taskflow;</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span> </div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span> } <span class="comment">// end of namespace tf. ---------------------------------------------------</span></div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span> </div><div class="ttc" id="classtf_1_1Taskflow_html_ade7fc641d136a3f8c96682c08040626a"><div class="ttname"><a href="classtf_1_1Taskflow.html#ade7fc641d136a3f8c96682c08040626a">tf::Taskflow::Taskflow</a></div><div class="ttdeci">Taskflow()</div><div class="ttdoc">constructs a taskflow </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:120</div></div>
<div class="ttc" id="namespacetf_html"><div class="ttname"><a href="namespacetf.html">tf</a></div><div class="ttdef"><b>Definition:</b> taskflow.hpp:5</div></div>
<div class="ttc" id="mutex_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/thread/mutex.html">std::mutex</a></div></div>
<div class="ttc" id="basic_string_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/string/basic_string.html">std::string</a></div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_a6350d0d6653ae9ae7b94c35e42fffe07"><div class="ttname"><a href="classtf_1_1Taskflow.html#a6350d0d6653ae9ae7b94c35e42fffe07">tf::Taskflow::for_each_task</a></div><div class="ttdeci">void for_each_task(V &&visitor) const</div><div class="ttdoc">applies an visitor callable to each task in the taskflow </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:156</div></div>
<div class="ttc" id="stack_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/stack.html">std::stack</a></div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_a911edd95acc1322433bddfcfeaf2ccb0"><div class="ttname"><a href="classtf_1_1Taskflow.html#a911edd95acc1322433bddfcfeaf2ccb0">tf::Taskflow::name</a></div><div class="ttdeci">const std::string & name() const</div><div class="ttdoc">queries the name of the taskflow </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:150</div></div>
<div class="ttc" id="basic_ostringstream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostringstream.html">std::ostringstream</a></div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_a1f00bbe72a1553c9656ecae4d98bb9af"><div class="ttname"><a href="classtf_1_1Taskflow.html#a1f00bbe72a1553c9656ecae4d98bb9af">tf::Taskflow::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">clears the associated task dependency graph </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:129</div></div>
<div class="ttc" id="classtf_1_1Taskflow_html"><div class="ttname"><a href="classtf_1_1Taskflow.html">tf::Taskflow</a></div><div class="ttdoc">the class to create a task dependency graph </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:18</div></div>
<div class="ttc" id="unordered_set_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/unordered_set.html">std::unordered_set</a></div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_a224301842d94c44fd7fe99d8ac2ba241"><div class="ttname"><a href="classtf_1_1Taskflow.html#a224301842d94c44fd7fe99d8ac2ba241">tf::Taskflow::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">queries the emptiness of the taskflow </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:139</div></div>
<div class="ttc" id="list_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/container/list.html">std::list< Topology ></a></div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_a9c4900da1831dce708664a06b3e3a3fb"><div class="ttname"><a href="classtf_1_1Taskflow.html#a9c4900da1831dce708664a06b3e3a3fb">tf::Taskflow::dump</a></div><div class="ttdeci">std::string dump() const</div><div class="ttdoc">dumps the taskflow in DOT format to a std::string </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:163</div></div>
<div class="ttc" id="classtf_1_1FlowBuilder_html"><div class="ttname"><a href="classtf_1_1FlowBuilder.html">tf::FlowBuilder</a></div><div class="ttdoc">Building blocks of a task dependency graph. </div><div class="ttdef"><b>Definition:</b> flow_builder.hpp:13</div></div>
<div class="ttc" id="classtf_1_1Task_html"><div class="ttname"><a href="classtf_1_1Task.html">tf::Task</a></div><div class="ttdoc">task handle to a node in a task dependency graph </div><div class="ttdef"><b>Definition:</b> task.hpp:51</div></div>
<div class="ttc" id="classtf_1_1Executor_html"><div class="ttname"><a href="classtf_1_1Executor.html">tf::Executor</a></div><div class="ttdoc">The executor class to run a taskflow graph. </div><div class="ttdef"><b>Definition:</b> executor.hpp:33</div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_af4f03bca084deb5c2228ac8936d33649"><div class="ttname"><a href="classtf_1_1Taskflow.html#af4f03bca084deb5c2228ac8936d33649">tf::Taskflow::num_tasks</a></div><div class="ttdeci">size_t num_tasks() const</div><div class="ttdoc">queries the number of tasks in the taskflow </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:134</div></div>
<div class="ttc" id="classtf_1_1Taskflow_html_a00325e9799c833b75455ba1407b2695c"><div class="ttname"><a href="classtf_1_1Taskflow.html#a00325e9799c833b75455ba1407b2695c">tf::Taskflow::~Taskflow</a></div><div class="ttdeci">virtual ~Taskflow()</div><div class="ttdoc">destroy the taskflow (virtual call) </div><div class="ttdef"><b>Definition:</b> core/taskflow.hpp:124</div></div>
<div class="ttc" id="basic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::ostream</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_88dad41ea55ca2177e141d32a93e931c.html">taskflow</a></li><li class="navelem"><a class="el" href="dir_220cd4d9b8cb38c840b455d5d75c25bb.html">core</a></li><li class="navelem"><b>taskflow.hpp</b></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
</ul>
</div>
</body>
</html>