Diagnostic 15015: loop was not vectorized: unsupported data type


The loop has an assignment statement which assigns one struct variable to another one. But the assignment operator is not defined inside the structure such that there is a transilation of this struct assignment in terms of scalars. Below is an example for this scenario.


struct char4 {
  char c1;
  char c2;
 char c3;
  char c4;
extern struct char4 *a;
void vecmsg_testcore003 ()
  int i;
  const struct char4 n = {0, 0, 0, 0};
#pragma omp simd
  for(i = 0; i < 1024; i++) {
      a[i] = n;

$ icpc testing.cc -c -vec-report2 -openmp
testing.cc(15): (col. 7) remark: loop was not vectorized: unsupported data type

testing.cc(14): (col. 7) warning #13379: loop was not vectorized with "simd"


Provide the struct assignment operator in terms of scalars as follows:

inline char4 operator=(const char4 &x){
char4 temp;
temp.c1 = x.c1;
temp.c2 = x.c2;
temp.c3 = x.c3;
temp.c4 = x.c4;
return temp;

For more complete information about compiler optimizations, see our Optimization Notice.