Skip to content

Commit 4e5a238

Browse files
committed
feat: update README.md with images
1 parent a0a99f9 commit 4e5a238

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ To install **fastflow**, ensure you have the following dependencies: `python3`,
3434

3535
## Usage
3636

37+
<img src="https://github.com/user-attachments/assets/f94620dc-3133-4002-9238-1416a602f10c" align="right" height="92"/>
38+
3739
### Farm
3840

3941
The Farm pattern consists of an emitter, multiple workers, and a collector. It distributes tasks from the emitter to workers and collects the results in the collector. Both emitter and collector are optional.
@@ -79,6 +81,7 @@ farm.add_collector(sinknode)
7981
# finally run the farm. Blocking call: will resume when the farm ends
8082
farm.run_and_wait_end()
8183
```
84+
<img src="https://github.com/user-attachments/assets/65bd9fa0-4c01-47e9-afa4-82209352157d" align="right" height="42"/>
8285

8386
### Pipeline
8487

@@ -118,21 +121,20 @@ pipe = FFPipeline(True)
118121
sourcenode = source()
119122
# create the second stage
120123
st1 = stage('st1')
121-
# create the third stage
122-
st2 = stage('st2')
123124
# create last stage
124125
sinknode = sink()
125126
# add all the stages
126127
pipe.add_stage(sourcenode)
127128
pipe.add_stage(st1)
128-
pipe.add_stage(st2)
129129
pipe.add_stage(sinknode)
130130
# finally run the pipeline. Blocking call: will resume when the pipeline ends
131131
pipe.run_and_wait_end()
132132
# print how many milliseconds the pipeline took
133133
print(f"pipeline done in {farm.ffTime()}ms")
134134
```
135135

136+
<img src="https://github.com/user-attachments/assets/cc074e33-d059-4edd-bef8-33a46d50ea9c" align="right" height="92"/>
137+
136138
### All-to-All
137139

138140
The All-to-All pattern connects multiple nodes to the left to other multiple nodes to the right, where every node to the left can send data to every node to the right.
@@ -485,4 +487,4 @@ pipeline.run_and_wait_end()
485487

486488
## Contributing
487489

488-
Contributions are welcome! Please submit pull requests or open issues to help improve this project.
490+
Contributions are welcome! Please submit pull requests or open issues to help improve this project.

0 commit comments

Comments
 (0)