You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Benchmarks showed Cpp-Taskflow can efficiently handle millions or billions of tasks (both large and small tasks) on a machine with up to 64 CPUs.</p>
120
113
<h2><aclass="anchor" id="GeneralQuestion5"></a>
121
114
Q5: What is the weird hex value, like 0x7fc39d402ab0, in the dumped graph?</h2>
122
-
<p>The hex value represents the memory address of the task. Each task has a method <aclass="el" href="classtf_1_1Task.html#a9057ecd0f3833b717480e914f8568f02" title="assigns a name to the task">tf::Task::name(const std::string&)</a> for user to assign a human readable string to ease the debugging process. If a task is not assigned a name or is an internal node, its address value in the memory is used instead.</p>
123
-
<hr/>
115
+
<p>The hex value represents the memory address of the task. Each task has a method <aclass="el" href="classtf_1_1Task.html#a9057ecd0f3833b717480e914f8568f02" title="assigns a name to the task ">tf::Task::name(const std::string&)</a> for user to assign a human readable string to ease the debugging process. If a task is not assigned a name or is an internal node, its address value in the memory is used instead. </p><hr/>
Q4: My program hangs and never returns after dispatching a taskflow graph. What's wrong?</h2>
138
-
<p>When the program hangs forever it is very likely your taskflow graph has a cycle. Try the <aclass="el" href="classtf_1_1BasicTaskflow.html#adac448e1cc44307856b3116d7ed5490f" title="dumps the present task dependency graph to a std::ostream in DOT format">tf::Taskflow::dump</a> method to debug the graph before dispatching your taskflow graph.</p>
130
+
<p>When the program hangs forever it is very likely your taskflow graph has a cycle. Try the <aclass="el" href="classtf_1_1BasicTaskflow.html#adac448e1cc44307856b3116d7ed5490f" title="dumps the present task dependency graph to a std::ostream in DOT format">tf::Taskflow::dump</a> method to debug the graph before dispatching your taskflow graph.</p>
<p>No. The subflow is spawned during the execution of B, and at this point A must finish because A precedes B. This gives rise to the fact B1 and B2 must run after A. This graph may looks strange because B seems to run twice! However, Cpp-Taskflow will schedule B only once to create its subflow. Whether this subflow joins or detaches from B only affects the future object returned from B. </p>
145
-
</div></div><!-- PageDoc -->
146
-
</div><!-- contents -->
137
+
</div></div><!-- contents -->
147
138
</div><!-- doc-content -->
148
139
<!-- start footer part -->
149
140
<divid="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<p>In the past, we embrace <em>free</em> performance scaling on our software thanks to advances in manufacturing technologies and micro-architectural innovations. Approximately for every 1.5 year we can speed up our programs by simply switching to new hardware and compiler vendors that brings 2x more transistors, faster clock rates, and higher instruction-level parallelism. However, this paradigm was challenged by the power wall and increasing difficulties in exploiting instruction-level parallelism. The boost to computing performance has stemmed from changes to multicore chip designs.</p>
<p>The above sweeping visualization (thanks to Prof. Mark Horowitz and his group) shows the evolution of computer architectures is moving toward multicore designs. Today, multicore processors and multiprocessor systems are common in many electronic products such as mobiles, laptops, desktops, and servers. In order to keep up with the performance scaling, it is becoming necessary for software developers to write parallel programs that utilize the number of available cores.</p>
<p>The most basic and simplest concept of parallel programming is <em>loop-level parallelism</em>, exploiting parallelism that exists among the iterations of a loop. The program typically partitions a loop of iterations into a set of of blocks, either fixed or dynamic, and run each block in parallel. Below the figure illustrates this pattern.</p>
<p>The main advantage of the loop-based approach is its simplicity in speeding up a regular workload in line with Amdahl's Law. Programmers only need to discover independence of each iteration within a loop and, once possible, the parallel decomposition strategy can be easily implemented. Many existing libraries have built-in support to write a parallel-for loop.</p>
120
113
<h1><aclass="anchor" id="html"></a>
121
114
TaskBasedParallelism Task-based Parallelism</h1>
122
115
<p>The traditional loop-level parallelism is simple but hardly allows users to exploit parallelism in more irregular applications such as graph algorithms, incremental flows, recursion, and dynamically-allocated data structures. To address these challenges, parallel programming and libraries are evolving from the tradition loop-based parallelism to the <em>task-based</em> model.</p>
<p>The above figure shows an example <em>task dependency graph</em>. Each node in the graph represents a task unit at function level and each edge indicates the task dependency between a pair of tasks. Task-based model offers a powerful means to express both regular and irregular parallelism in a top-down manner, and provides transparent scaling to large number of cores. In fact, it has been proven, both by the research community and the evolution of parallel programming standards, task-based approach scales the best with future processor generations and architectures.</p>
<p>In a nutshell, code written with Cpp-Taskflow explains itself. The transparency allows developers to forget about the difficult thread managements at programming time. They can focus on high-level implementation of parallel decomposition algorithms, leaving the concurrency details and scalability handled by Cpp-Taskflow. </p>
139
-
</div></div><!-- PageDoc -->
140
-
</div><!-- contents -->
132
+
</div></div><!-- contents -->
141
133
</div><!-- doc-content -->
142
134
<!-- start footer part -->
143
135
<divid="nav-path" class="navpath"><!-- id is needed for treeview function! -->
0 commit comments