problem with vectorization

problem with vectorization

We use Intel compiler 6.0 build 020312Z, Debian 2.4.18
It works great, but:

During the compilation of this part of code,vectorizer reports for inner loop:
"unsupported loop structure"

void mv_crspec (double *a,float *b,float *c,long *adr,long *ci,long n)
float **d_pole;
int *d_zac,j,i;
float *x,*y;
for (i=zbyly_vrstvy[i2];i {
//#pragma ivdep
for (j=0;j<=(d_kon-d_zac);j++)

Used switches:
-O3 -fno_alias -pc64 -tpp6 -xK -ipo -align -Zp16

where is the problem ?
All arrays are float,cycle is "normal" with stride 1.


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

xsimecek - Welcome! I apologize for not having had a chance to go into this in more detail!

Is there a chance you could post a compilable snippet. That would be easier to read...



The answer is found in the User's Guide, under Optimizations->Vectorization->Loop Constructs:

Loop Exit Conditions

Loop exit conditions determine the number of iterations that a loop executes. For example, fixed indexes
for loops determine the iterations. The loop iterations must be countable; that is, the number of iterations
must be expressed as one of the following:
A constant
A loop invariant term
A linear function of outermost loop indices
Loops whose exit depends on computation are not countable.

So your loop that reads:

for (j=0;j<=(d_kon-d_zac);j++)
{ ... }

can't be vectorized because the exit condition is a calculation - d_kon-d_zac.

Intel Developer Support

For on-line assistance:
For product support information:
* Intel and Pentium are registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries
* Other names and brands may be claimed as the property of others

Leave a Comment

Please sign in to add a comment. Not a member? Join today