Imagine you have a large file you would like to read in (WORK=1), compress(WORK=4), encrypt(WORK=2), and write out(WORK=3). This file can be split into a 10 parts and fed into a a four stage pipeline.
read(0) W=1 | |||
read(1) W=1 | compress(0) W=4 | ||
read(2) W=1 | compress(1) W=4 | encrypt(0) W=2 | |
read(3) W=1 | compress(2) W=4 | encrypt(1) W=2 | write(0) W=3 |
read(4) W=1 | compress(3) W=4 | encrypt(2) W=2 | write(1) W=3 |
read(5) W=1 | compress(4) W=4 | encrypt(3) W=2 | write(2) W=3 |
read(6) W=1 | compress(5) W=4 | encrypt(4) W=2 | write(3) W=3 |
read(7) W=1 | compress(6) W=4 | encrypt(5) W=2 | write(4) W=3 |
read(8) W=1 | compress(7) W=4 | encrypt(6) W=2 | write(5) W=3 |
read(9) W=1 | compress(8) W=4 | encrypt(7) W=2 | write(6) W=3 |
compress(9) W=4 | encrypt(8) W=2 | write(7) W=3 | |
encrypt(9) W=2 | write(8) W=3 | ||
write(9) W=3 |
Consider the butterfly network of 4 tasks below.
Horizontal lines represent dependences within each task.
Diagonal lines represent dependences between tasks that should be established by phasers.
note: the image below is identical to the one above.
it is simply provided just case you want a second copy of the image.