编译器错误 C3024
“schedule(runtime)”: 不允许使用 chunk_size 表达式
不能将值传递给 schedule 子句的运行时参数。
下面的示例生成 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) ;
}