编译器错误 C3036
“operator”:OpenMP“reduction”子句中的运算符标记无效
未正确指定 reduction 子句。
下面的示例生成 C3036:
// C3036.cpp
// compile with: /openmp
static float a[1000], b[1000], c[1000];
void test1(int first, int last) {
static float dp = 0.0f;
#pragma omp for nowait reduction(.:dp) // C3036
// try the following line instead
// #pragma omp for nowait reduction(+: dp)
for (int i = first ; i <= last ; ++i)
dp += a[i] * b[i];
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈