Consider the following OpenMP code:
#pragma omp target teams distribute parallel for collapse(4) map(tofrom: a) private(i,j,k,l)
for (i = 0; i < SIZE_N; i++) {
for (j = 0; j < SIZE_M; j++) {
for (k = i; k < SIZE_N; k++) {
for (l = 0; l < SIZE_M; l++) {
a[i][j][k][l] += i+2*j+3*k+4*l;
}
}
}
}
Is this code OpenMP Spec 5.1 compliant? I could not find in the spec any wording that does not allowed this kind of code, but I am not sure I am missing something.
Thanks!