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.
'symbol' : 'threadprivate' is only valid for global or static data items
Remarks
Symbols passed to threadprivate must either be global or static.
Example
The following example generates C3053:
// C3053.cpp
// compile with: /openmp
void Test() {
   int x, y;
   #pragma omp threadprivate(x, y)   // C3053
   #pragma omp parallel copyin(x, y)
   {
      x = y;
   }
}
Possible resolution:
// C3053b.cpp
// compile with: /openmp /LD
int x, y;
#pragma omp threadprivate(x, y)
void Test() {
   #pragma omp parallel copyin(x, y)
   {
      x = y;
   }
}