@@ -9,16 +9,16 @@ If you cannot find a solution here, please post an issue [here][Github issues].
99
1010---
1111
12- ## General Questions
12+ # General Questions
1313
14- ### Q: How do I use Cpp-Taskflow in my projects?
14+ ## Q: How do I use Cpp-Taskflow in my projects?
1515
1616Cpp-Taskflow is a header-only library with zero dependencies.
1717The only thing you need is a [ C++17] [ C++17 ] compiler.
1818To use Cpp-Taskflow, simply drop the folder
1919[ taskflow] ( ../taskflow ) to your project and include [ taskflow.hpp] ( ../taskflow/taskflow.hpp ) .
2020
21- ### Q: What is the difference between static tasking and dynamic tasking?
21+ ## Q: What is the difference between static tasking and dynamic tasking?
2222
2323Static tasking refers to those tasks created before execution,
2424while dynamic tasking refers to those tasks created during the execution of static tasks
@@ -30,21 +30,21 @@ Dynamic tasks created by the same task node are grouped together to a subflow.
3030| ![ ] ( ../image/static_graph.png ) | ![ ] ( ../image/dynamic_graph.png ) |
3131
3232
33- ### Q: How many tasks can Cpp-Taskflow handle?
33+ ## Q: How many tasks can Cpp-Taskflow handle?
3434
3535Cpp-Taskflow is a very lightweight and efficient tasking library.
3636It has been applied in many academic and industry projects to scale up their existing workload.
3737A research project [ OpenTimer] [ OpenTimer ] has used Cpp-Taskflow to deal with hundreds of millions of tasks.
3838
39- ### Q: What are the differences between Cpp-Taskflow and other tasking libraries?
39+ ## Q: What are the differences between Cpp-Taskflow and other tasking libraries?
4040
4141From our humble opinion, Cpp-Taskflow is superior in its tasking API, interface, and performance.
4242In most cases, users can quickly master Cpp-Taskflow to create large and complex dependency graphs
4343in just a few minutes.
4444The performance scales very well and is comparable to hard-coded multi-threading.
4545Of course, the judge is always left for users -:)
4646
47- ### Q: What is the weird hex value, like 0x7fc39d402ab0, in the dumped graph?
47+ ## Q: What is the weird hex value, like 0x7fc39d402ab0, in the dumped graph?
4848
4949Each task has a method ` name(const std::string&) ` for user to assign a human readable string
5050to ease the debugging process.
@@ -53,14 +53,14 @@ its address value in the memory is used instead.
5353
5454---
5555
56- ## Compilation Issues
56+ # Compilation Issues
5757
58- ### Q: I can't get Cpp-Taskflow compiled in my project!
58+ ## Q: I can't get Cpp-Taskflow compiled in my project!
5959
6060Please make sure your compile supports the latest version of [ C++17] [ C++17 ] .
6161Make sure your project meets the System Requirements described at [ README] [ README ] .
6262
63- ### Q: Clang can't compile due to the use of std::variant.
63+ ## Q: Clang can't compile due to the use of std::variant.
6464
6565Cpp-Taskflow uses ` std::variant ` to enable uniform interface between static and dynamic tasking.
6666However it has been reported in
@@ -81,9 +81,9 @@ For clang users, you will need to use this patch in `taskflow.hpp` as follows:
8181
8282---
8383
84- ## Programming Questions
84+ # Programming Questions
8585
86- ### Q: What is the difference between Cpp-Taskflow threads and workers?
86+ ## Q: What is the difference between Cpp-Taskflow threads and workers?
8787
8888The master thread owns the thread pool and can spawn workers to run tasks
8989or shutdown the pool.
@@ -96,18 +96,19 @@ tf::Taskflow(N); // N workers, N+1 threads in the program.
9696
9797If there is no worker threads in the pool, the master thread will do all the works by itself.
9898
99- ### Q: Is taskflow thread-safe?
99+ ## Q: Is taskflow thread-safe?
100+
100101No, the taskflow object is not thread-safe. You can't create tasks from multiple threads
101102at the same time.
102103
103- ### Q: My program hangs and never returns after dispatching a taskflow graph. What's wrong?
104+ ## Q: My program hangs and never returns after dispatching a taskflow graph. What's wrong?
104105
105106When the program hangs forever it is very likely your taskflow graph has a cycle.
106107Try the `dump` method to debug the graph before dispatching your taskflow graph.
107108If there is no cycle, make sure you are using `future.get()` in the right way,
108109i.e., not blocking your control flow.
109110
110- ### Q: In the following example where B spawns a joined subflow of two tasks B1 and B2, do they run concurrently with task A?
111+ ## Q: In the following example where B spawns a joined subflow of two tasks B1 and B2, do they run concurrently with task A?
111112
112113<p>
113114<img src="../image/dynamic_graph.png" width="60%">
@@ -119,7 +120,7 @@ This graph may looks strange because B seems to run twice!
119120However, Cpp-Taskflow will schedule B only once to create its subflow.
120121Whether this subflow joins or detaches from B only affects the future object returned from B.
121122
122- ### Q: How can I parallelize multiple runs on the same function with different arguments?
123+ ## Q: How can I parallelize multiple runs on the same function with different arguments?
123124
124125Many people have been asking how to apply Taskflow's `parallel_for` method
125126to parallelize a sequential loop over an index sequence.
@@ -142,7 +143,7 @@ for(int i=0; i<N; ++i) {
142143tf.wait_for_all();
143144```
144145
145- ### Q: What is a Task?
146+ ## Q: What is a Task?
146147
147148A `Task` is a lightweight handle associated with an internal graph node
148149for users to build task dependencies.
0 commit comments