Is this the area for asking Intel compiler questions? I was referred to that area by the Intel Cilk Plus forum whenI started askng questions about the icc compiler.I need to ask some icc questions; soifI am in the correct place please let me know, ifI am not then direct me.
Well, my quetion is really a c source code question. i read in a c tutorial book that a while loopcan be considered a for loop without an idex and a stopping criterion. This of course applies to gcc, but does it apply to icc?
Also, in C and its descendants, a while loop is a for loop with no initialization or counting expressions, i.e.,
for ( ; condition; )
Is this true for icc?I want to replace while loops with for loops. If this works in icc great.
Yes, the syntax is equivalent. It isn't likely to help with optimization; unless the compiler can pick up a trip count to make the loop countable, neither gcc nor icc will be able to vectorize, and _Cilk_for probably won't work.