共用方式為


編譯器錯誤 C3024

'schedule(runtime)' : 不允許 chunk_size 運算式

無法將值傳遞給排程子句的執行階段參數。

下列範例會產生 C3024:

// C3024.cpp
// compile with: /openmp /link vcomps.lib
#include <stdio.h>
#include "omp.h"

int main() {
   int i;

   #pragma omp parallel for schedule(runtime, 10)   // C3024
   for (i = 0; i < 10; ++i) ;

   #pragma omp parallel for schedule(runtime)   // OK
   for (i = 0; i < 10; ++i) ;
}