FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cpp-taskflow/example/debug.cpp at master · vikchopde/cpp-taskflow · GitHub
vikchopde
/
cpp-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
cpp-taskflow
/
example
/
debug.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
34 lines (26 loc) · 750 Bytes
Breadcrumbs
cpp-taskflow
/
example
/
debug.cpp
Copy path
File metadata and controls
34 lines (26 loc) · 750 Bytes
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
//
This example demonstrates how to use 'dump' method to inspect
//
a taskflow graph.
#
include
<
taskflow/taskflow.hpp
>
int
main
(){
tf::Taskflow tf;
auto
[A, B, C, D, E] = tf.
emplace
(
[] () { std::cout <<
"
Task A
"
<< std::endl; },
[] () { std::cout <<
"
Task B
"
<< std::endl; },
[] () { std::cout <<
"
Task C
"
<< std::endl; },
[] () { std::cout <<
"
Task D
"
<< std::endl; },
[] () { 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);
return
0
;
}
Back
|
FazBrowse Home
|
New Git URL