Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
increment in OpenMP 'for' statement has improper form
Remarks
The increment part of an OpenMP for loop must use the index variable both on the left and right side of the operator.
Example
The following example generates C3019:
// C3019.cpp
// compile with: /openmp
int main()
{
int i = 0, j = 1, n = 3;
#pragma omp parallel
{
#pragma omp for
for (i = 0; i < 10; i = j + n) // C3019
// Try the following line instead:
// for (i = 0; i < 10; i++)
j *= 2;
}
}