Data / Domain Decomposition
Same operation on every slice. This is data parallelism — what GPUs live for.
The full array (24 items):
Functional / Task Decomposition (a pipeline)
Different operations, each on a different stage, data flowing through.
Worker 1 — Load
reads each item from disk
→
Worker 2 — Transform
applies the compute (square, filter…)
→
Worker 3 — Combine
accumulates the running result
3 different jobs, running at once on a stream of data — like an
assembly line. While Worker 2 transforms item 5, Worker 1 is already loading
item 6 and Worker 3 is combining item 4. The catch: you only get as many parallel
pieces as you have distinct stages (here, 3) — adding a 10th
worker doesn't help unless you invent a 10th stage. That's the ceiling of task
decomposition.