FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
taskflow/examples/visualization.cpp at master · githubCode3a/taskflow · GitHub
githubCode3a
/
taskflow
Public
forked from
taskflow/taskflow
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
taskflow
/
examples
/
visualization.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
42 lines (30 loc) · 1.09 KB
Breadcrumbs
taskflow
/
examples
/
visualization.cpp
Copy path
File metadata and controls
42 lines (30 loc) · 1.09 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
//
This example demonstrates how to use 'dump' method to inspect
//
a taskflow graph.
#
include
<
taskflow/taskflow.hpp
>
int
main
(){
tf::Taskflow
tf
(
"
Visualization Demo
"
);
//
------------------------------------------------------
//
Static Tasking
//
------------------------------------------------------
auto
A = tf.
emplace
([] () { std::cout <<
"
Task A
"
<< std::endl; });
auto
B = tf.
emplace
([] () { std::cout <<
"
Task B
"
<< std::endl; });
auto
C = tf.
emplace
([] () { std::cout <<
"
Task C
"
<< std::endl; });
auto
D = tf.
emplace
([] () { std::cout <<
"
Task D
"
<< std::endl; });
auto
E = tf.
emplace
([] () { std::cout <<
"
Task E
"
<< std::endl; });
A.
precede
(B, C, E);
C.
precede
(D);
B.
precede
(D, E);
std::cout <<
"
[dump without name assignment]
\n
"
;
tf.
dump
(std::cout);
std::cout <<
"
[dump with name assignment]
\n
"
;
A.
name
(
"
A
"
);
B.
name
(
"
B
"
);
C.
name
(
"
C
"
);
D.
name
(
"
D
"
);
E.
name
(
"
E
"
);
tf.
dump
(std::cout);
//
------------------------------------------------------
//
Dynamic Tasking
//
------------------------------------------------------
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL