I am reading about loop tranformation techniques and i have a very hard time understanding how does loop skewing makes a loop parallelizable Here are are two loops, the initial one and the seconde one, what is the difference betwwen the two ? The two of them depends on previous iteration on both i and j, what make the second loop parallisable ? Or why can we make the interchange on the second one and not the first one ? Both of them have dependencies on i and j
for(int i =2; i < 5; i++){
for(int j =2; j < 5; j++){
A[i][j] = A[i-1][j] + A[i][j-1];
}
}
for(int i =2; i < 5; i++){
for(int j =2+i; j < 5+i; j++){
A[i][j-i] = A[i-1][j-i] + A[i][j-1-i];
}
}