Tutorial III – Spatial Programming
The lessons before this group placed each PE by hand. This group puts one
kernel on a whole row of PEs and gives each PE its own data. It covers three
ways a row works together: a wavefront, where a computation moves across the
PEs step by step; a collective, where every PE adds to a result and gets it
back; and a shared color, where PEs take turns sending. Along the way it
teaches rectangles of PEs, colorpairs, moats, per-PE miset, and switch
positions. The next group builds grids from the same pieces.
| Lesson | What it teaches |
|---|---|
| Lesson 8 — Space and time: a wavefront along a row | One code() on a rectangle, per-PE data, a colorpair row with moats, and a recurrence mapped onto PEs and steps |
| Lesson 9 — Broadcast and reduce along a row | Arithmetic on a passing stream, a multicast back, a region per role, and _word for 32-bit data |
| Lesson 10 — Switches: PEs that take turns on one color | Switch positions, flip, control wavelets and their commands, and the rules nothing checks |