Aracılığıyla paylaş


Derleyici Hatası C3056

'symbol' : symbol , 'threadprivate' yönergesiyle aynı kapsamda değil

Açıklamalar

Threadprivate yan tümcesinde kullanılan bir simge yan tümcesi threadprivate ile aynı kapsamda olmalıdır.

Example

Aşağıdaki örnek C3056 oluşturur:

// C3056.cpp
// compile with: /openmp
int x, y;
void test() {
   #pragma omp threadprivate(x, y)   // C3056
   #pragma omp parallel copyin(x, y)
   {
      x = y;
   }
}

Olası çözüm:

// C3056b.cpp
// compile with: /openmp /LD
int x, y;
#pragma omp threadprivate(x, y)
void test() {
   #pragma omp parallel copyin(x, y)
   {
      x = y;
   }
}