Quantcast
Channel: Intel Developer Zone Articles
Viewing all articles
Browse latest Browse all 3384

Diagnostic 15541: outer loop was not auto-vectorized: consider using SIMD directive

$
0
0

Cause:

This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0. This diagnostic message is emitted when the outer loop vectorization is not possible using auto-vectorization. This decision is based on vectorizer heuristics and cost model. One way to override the vectorizer cost model is to use explicit vectorization tools like #pragma simd.

Examples:

void foo(float **a, float **b, int N){
  int i, j;
#pragma ivdep
  for (i=0;i<N;i++){
    float *ap = a[i];
    float *bp = b[i];
    for (j=0;j<N;j++){
      ap[j] = bp[j];
    }
  }
}

$ icpc test51.cc -c -qopt-report2 -qopt-report-phase=vec -qopt-report-file=stderr

Begin optimization report for: foo(float **, float **, int)

    Report from: Vector optimizations [vec]


LOOP BEGIN at test51.cc(4,3)
   remark #15541: outer loop was not auto-vectorized: consider using SIMD directive

   LOOP BEGIN at test51.cc(7,5)
      remark #15541: outer loop was not auto-vectorized: consider using SIMD directive

      LOOP BEGIN at test51.cc(7,5)
      <Multiversioned v2>
         remark #15304: loop was not vectorized: non-vectorizable loop instance from multiversioning
      LOOP END

      LOOP BEGIN at test51.cc(7,5)
      <Remainder, Multiversioned v2>
      LOOP END
   LOOP END
LOOP END


Viewing all articles
Browse latest Browse all 3384

Trending Articles