Vector Update: Loop Interchange
To interchange the loops they have to be properly nested
- substitution expressions and eliminating temporary variables
-
-
-
-
-
-
-
-
- now the loops can be interchanged
naa1=nma1+ii+(n-1)*nra+(i-1)*nru+(l-1)*nra*nrub
res can be eliminated by placing
naa1=nma1+ii+(n-1)*nra+(i-1)*nru+(l-1)*nra*nrub
dp(lle1)=dp(lle1)+p(naa1)*dp(nbb1)