Intel® C++ Compiler 16.0 User and Reference Guide
Insert a "%s loop count min(%d)" statement right before the loop at line %d to parallelize the loop.
Add "#pragma loop count" before the specified loop. This pragma indicates the minimum trip count (number of iterations) of the loop that enables the parallelization of the loop.
The minimum trip count required to parallelize the loop may differ depending on the target architecture, and this will be reflected in the message generated.
Consider the following:
#define N 10000 float A[N], B[N]; void foo(int n) { int i; for (i =0; i < n; i++) { A[i] = A[i] + B[i] * B[i] + 1.5; } }
In this case, the compiler may not parallelize the loop because it is not sure that n is large enough for the parallelization to be beneficial.
If you determine it is safe to do so, you can add the pragma as follows:
#define N 10000 float A[N], B[N]; void foo(int n) { int i; #pragma loop count min(128) for (i =0; i < n; i++) { A[i] = A[i] + B[i] * B[i] + 1.5; } }
Confirm that the loop has the minimum number of iterations, as specified in the diagnostic message.