共用方式為


編譯器錯誤 C3013

'clause' : 子句只能在 OpenMP 'directive' 指示詞上出現一次

某個子句在同一個指示詞上出現兩次。 請刪除其中一個子句。

下列範例會產生 C3013:

// C3013.cpp
// compile with: /openmp
int main() {
   int a, b, c, x, y, z;

   #pragma omp parallel shared(a,b,c) private(x)

   #pragma omp for nowait private(x) nowait   // C3013
   // The previous line generates C3013, with two nowait clauses
   // try the following line instead:
   // #pragma omp for nowait private(x)
   for (a = 0 ; a < 10 ; ++a) {
   }
}