Weird data dependency in solveMatrix
@elena In the main loop of solveMatrix:
for (int i = 1 + int(stepBit); i < nr-1; i += 2) {
...
for ( int h = 1; h < ni-1; h++) {
...
// this loop cannot be vectorized
for (int j = 0; j < ns; j++) {
int l = j+h*ns+i*ni*ns;
int ljp = l+1;
int ljm = l-1;
...
resid[j] = (+ aat[l]*enrad[ljm]
+ cct[l]*enrad[ljp] //this enrad[ljp] was computed at previous iteration
+ bb[l]*enrad[l]
+ aap[l]*enrad[lhm]
- rhs[l]);
...
// This is the enrad[ljp] of next iteration!!!!!
enrad[l] -= omega*resid[j]/bb[l];
}
.....
I suspect this is an error.
What do you think ?