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

Diagnostic 15309: xxxx was not vectorized: statement cannot be vectorized

$
0
0

Cause:

Usage of _Cilk_for or any other threading solution like OpenMP parallel for inside a SIMD loop is not allowed. When such a code construct is enocuntered, the compiler vetorizer emits "statement cannot be vectorized". Below is an examples for this scenario. 


Example:
 

extern int *a;
extern int **b;

int bar (int val);
int foo (int val)
{
  int i;
  _Cilk_for(i = 0; i < val; i++)  {
       b[i][val] += i;
    }
  return val;
}

void vevmsg_testcore005()
{   int i;
#pragma omp simd safelen(32)
  for(i = 0; i < 1024; i++) {
      a[i] = foo (i);
  }
}


>icpc -c -vec-report2 example5.cc -openmp 

example5.c(18): (col. 14) remark: loop was not vectorized: statement cannot be vectorized
example5.c(17): (col. 7) warning #13379: loop was not vectorized with "simd"
example5.c(8): (col. 35) remark: loop was not vectorized: vectorization possible but seems inefficient

Resolution Status:


Follow a methodology where inner loops are vectorized and outer loops are threaded.


Viewing all articles
Browse latest Browse all 3384

Trending Articles



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