Diagnostic 15144: vectorization support: unroll factor set to xxxx

Cause: 

The partial loop which is getting vectorized is also unrolled by a factor of 4. This loop unrolling done by compiler as a part of optimization and is reported by the vectorizer as "unroll factor set to x". Below is an example for this scenario:

Example:

#include<iostream>
#define N 70
int main(){
static short tab1[N], tab2[N];
int i, j;
static short const data[] = {32768, -256, -255, -128, -127, -1, 0, 1, 127, 128, 255, 256, 32767};
for (j = i = 0; i < N; i++) {
tab1[i] = i;
tab2[i] = data[j++];
if (j > 12) j = 0;
}
int sum = __sec_reduce_add(tab1[:]) + __sec_reduce_add(tab2[:]);
return 0;
}


$ icpc example9.cc -vec-report6
example9.cc(8): (col. 5) remark: vectorization support: reference tab1 has aligned access
example9.cc(7): (col. 1) remark: vectorization support: unroll factor set to 4
example9.cc(7): (col. 1) remark: PARTIAL LOOP WAS VECTORIZED
example9.cc(8): (col. 5) remark: vectorization support: reference tab1 has aligned access
example9.cc(7): (col. 1) remark: remainder loop was not vectorized: vectorization possible but seems inefficient
example9.cc(7): (col. 1) remark: loop was not vectorized: existence of vector dependence

Per informazioni più dettagliate sulle ottimizzazioni basate su compilatore, vedere il nostro Avviso sull'ottimizzazione.