I have the following nested for loops. I want to parallelize the first loop but the second loop must NOT be parallelized. So I want that each thread executes the second loop in itself, which means that second loop must be special for each thread (for each "i" in the code).
How can I do that?
#pragma omp parallel for
for (i=k+1;i<row;i++){
for (n=0;n<k;n++){
// #pragma omp atomic
dummy += L[i][n]*L[k][n];
L[i][k] = (A[i][k] - dummy)/L[k][k];
}
dummy = 0;
}