Developer Guide and Reference

Contents

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.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804