Array Indexing
There are several ways to index arrays:
The addressing scheme will have impact on the performance
Arrays should be accessed in most natural direct way for compiler to apply loop optimization techniques
Direct Addressing ++
DO j=1,M
DO i=1,n
… A(i,j) ….
ENDDO ENDDO
Explicit Addressing +
DO j=1,M
DO i=1,N
… A(i+(j-1)*N) …
ENDDO ENDDO
Previous slide
Next slide
Back to first slide
View graphic version