
3.3 Orchestration for Performance 147
Contiguity in memory layout
(a) Two-dimensional array (b) Four-dimensional array
FIGURE 3.8 Two-dimensional and four-dimensional arrays used to represent a two-
dimensional grid in a shared address space
we would like it to be allocated in local memory so that the misses can be satisfied
locally. The problem is that consecutive subrows of this partition are not contiguous
with one another in the address space but are separated by the length of an entire
row of the grid (which contains subrows of other partitions). This makes it
impossible to distribute data appropriately across main memories if a subrow