Skip to content

Commit e6eb5c1

Browse files
Tsung-Wei HuangTsung-Wei Huang
authored andcommitted
updated README with image
1 parent 1e62637 commit e6eb5c1

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,35 @@ The table below summarizes its methods.
293293
| num_dependents | none | size | return the number of dependents (inputs) of this task |
294294
| num_successors | none | size | return the number of successors (outputs) of this task |
295295

296+
### *precede*
297+
298+
<img align="right" width="20%" src="image/precede.png">
299+
300+
```cpp
301+
// make A runs before B
302+
A.precede(B);
303+
```
304+
305+
### *broadcast*
306+
307+
<img align="right" height="20%" src="image/broadcast.png">
308+
309+
```cpp
310+
// make A runs before B, C, D, and E
311+
// B, C, D, and E run in parallel
312+
A.broadcast(B, C, D, E);
313+
```
314+
315+
### *gather*
316+
317+
<img align="right" height="20%" src="image/gather.png">
318+
319+
```cpp
320+
// B, C, D, and E run in parallel
321+
// A runs after B, C, D, and E complete
322+
A.gather(B, C, D, E);
323+
```
324+
296325
# Caveats
297326
While Cpp-Taskflow enables the expression of very complex task dependency graph that might contain
298327
thousands of task nodes and links, there are a few amateur pitfalls and mistakes to be aware of.

image/broadcast.png

35.6 KB
Loading

image/gather.png

35.3 KB
Loading

image/precede.png

10.8 KB
Loading

0 commit comments

Comments
 (0)