I have to parallelize the following code, the data dependence is i -> i-3
for(i=3; i<N2; i++)
for(j=0; j<N3; j++)
{
D[i][j] = D[i-3][j] / 3.0 + x + E[i];
if (D[i][j] < 6.5) bat = bat + D[i][j]/100.0;
}
I tried with #pragma omp parallel for reduction(+:bat) private(i,j) shared(D,x,E)
and similar things but it wasn't correct