Maxwell Example - continued
Problem:
- array dimensions are small even numbers, power of 2 and map to the same location in both 1st level and the 2nd level caches
-
-
-
-
-
- for the Maxwell example the print shows with NX=NY=NZ=64:
-
-
- Compiler is able to pad the arrays automatically. Compiling with the default optimizations: -mips4 -O3 gives for the performance 162 Mflop/s
primary cache 32 KB = 2(way-set-ass) * 4(size-real) * 4096
secondary cache 8 MB = 2(way-set-ass) * 4(size-real) * 1048576
C print position of arrays in memory with the code:
print *,’Addr EX=‘,mod(aEX,4096), mod(aEX,1048576),’words’
All arrays map to the same locations