On for-loop structure with multiple variable in, I get the following error
#pragma acc parallel loop
for (int i = 0, j = 0; i < 16; ++i, j += 4) {
// Some stuff ..
}
PGC-S-0035-Syntax error: Recovery attempted by replacing ‘,’ by ‘%=’
PGC-S-0058-Illegal lvalue
I’m not sure what I’m missing. I’ve looked over documentation for how a for-loop should look and I’m still confused. What’s wrong here?
One solution would be to replace by
int i, j;
j = 0;
#pragma acc parallel loop
for (i = 0; i < 16; ++i)
{
j += 4;
// Some stuff ..
}
Is this correct with OpenACC?