Array Placement Effects
“Poor” data placement in memory can lead to the effect of
There are 2 techniques built into the compiler to avoid the cache thrashing:
- array padding
- leading dimension extension
-
-
NOTE: leading dimension of arrays should be an odd number, if the multi-dimensional array has small extensions (e.g. a(64,64,64,..)) several leading dimensions should be odd numbers.