AnsweredAssumed Answered

Optimization using pragma's

Question asked by emi.rein on Nov 14, 2013
Latest reply on Dec 2, 2013 by emi.rein



I would like to optimize my program,  ...> Compiler > General > Enable optimization has been selected. But not any pragma seems to have effect. Some simple code:

   int N = 10;

   int k = 5;

   int a[20];

   int i;


   #pragma vector_for

   for (i = 0; i < N; i++)


      a[i] = a[i+k];



Compiling shows the warnings:

vectorization unsuccessful - compiler unable to ascertain criteria needed for vectorization

compiler unable to vectorize loop - pragma used instead to help scheduling


This also holds when the pragma's SIMD_for, all_aligned, loop_count(-,-,-) are used and in case of other simple loops like:

   for (i = 0; i < 256; i++)


      k = fBlockA.Rx_L1[i];         // reading ADC data from the AD1939 codec



What do I miss?