12.07.2015 Views

Cache Usage Tutorial - MGNet

Cache Usage Tutorial - MGNet

Cache Usage Tutorial - MGNet

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data layout optimizationsStride-1 access is usually fastest for severalreasons; particularly the reuse of cache linecontentsData layout for multidimensional arrays inFORTRAN: column-major orderExample:4x3 arrayA(i,j)MemoryaddressProf. Craig C. DouglasUniversity of Kentucky andYale University840A(1,1)A(1,2)A(1,3)A(2,1)A(2,2)A(2,3)A(3,1)A(3,2)A(3,3)A(4,1)A(4,2)A(4,3)Data arrangement is “transpose” of usualmatrix layoutHiPC2003, 12/17/2003 vHPC <strong>Cache</strong> Aware Methods 83

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!