Consider this code:
include <iostream>
int main()
{
int x = 100;
#pragma omp parallel
{
#pragma omp single
{
#pragma omp task depend (in: x)
{ x += 1; }
#pragma omp task depend (out: x)
{ x *= 2; }
}
}
}
notice that in the dependency clauses we have "in: x" and "out: x" pointing to variable x. Do these dependency clauses need to actually point to a variable or are they just placeholder names? In other words if instead I use "in: bbb", "out: bbb" where bbb is some arbitrary name and does not correspond to a variable in my code, would this code still be correct?