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

Dianostic 15476: scalar loop cost: xxxx

$
0
0

Cause:

This vectorization diagnostic is emitted starting from Intel(R) C++ Compiler 15.0 and with report level 3 and above. This diagnostic message emits the static estimate of the number of execution cycles which each iteration of the loop body will take when it executes with scalar operands. Below is a code snippet which demonstrates this.

Examples:

#include<stdio.h>
#include<math.h>
#define SIZE 100
int main(){
    float a[SIZE], x;
    a[:] = __sec_implicit_index(0);
    x = __sec_reduce_all_zero(a[:] == 1 ? 0 : 1);
    printf("%fn",x);
    return 0;
}
$ icpc test11.cc -c -qopt-report3 -qopt-report-phase=vec -qopt-report-file=stderr

Begin optimization report for: main()

    Report from: Vector optimizations [vec]


LOOP BEGIN at test11.cc(6,12)
   remark #15300: LOOP WAS VECTORIZED
   remark #15449: unmasked aligned unit stride stores: 1
   remark #15475: --- begin vector loop cost summary ---
   remark #15476: scalar loop cost: 4
   remark #15477: vector loop cost: 1.000
   remark #15478: estimated potential speedup: 3.960
   remark #15479: lightweight vector operations: 4
   remark #15487: type converts: 1
   remark #15488: --- end vector loop cost summary ---
LOOP END

LOOP BEGIN at test11.cc(7,9)
   remark #15300: LOOP WAS VECTORIZED
   remark #15448: unmasked aligned unit stride loads: 1
   remark #15475: --- begin vector loop cost summary ---
   remark #15476: scalar loop cost: 165
   remark #15477: vector loop cost: 43.250
   remark #15478: estimated potential speedup: 3.810
   remark #15479: lightweight vector operations: 7
   remark #15481: heavy-overhead vector operations: 1
   remark #15488: --- end vector loop cost summary ---
LOOP END

 


Viewing all articles
Browse latest Browse all 3384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>