Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following example demonstrates the reprivatization of variables. Private variables can be marked private again in a nested directive. They do not have to be shared in the enclosing parallel region.
int i, a;
...
#pragma omp parallel private(a)
{
...
#pragma omp parallel for private(a)
for (i=0; i<10; i++)
{
...
}
}