Visible to Intel only — GUID: GUID-0D902B36-B0C5-49B1-B87B-98302747E447
Visible to Intel only — GUID: GUID-0D902B36-B0C5-49B1-B87B-98302747E447
GAP Message (Diagnostic ID 30525)
Message
Insert a "%s loop count min(%d)" statement right before the loop at line %d to parallelize the loop.
Advice
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.
Example
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;
}
}
Verify
Confirm that the loop has the minimum number of iterations, as specified in the diagnostic message.