Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icc compiler questions

newport_j
Beginner
426 Views


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.

AmI in the icc compiler forum?

Thanks in advance.

Newport_j
0 Kudos
4 Replies
JenniferJ
Moderator
426 Views
yes, this is the right forum for Intel C++ compiler questions.

Jennifer
0 Kudos
newport_j
Beginner
426 Views
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; )

{

statements;

}

Is this true for icc?I want to replace while loops with for loops. If this works in icc great.

Thanks in advance.

Newport_j

0 Kudos
JenniferJ
Moderator
426 Views

This is C language feature, icc supports it. icc is compatible with gcc.

Jennifer

0 Kudos
TimP
Honored Contributor III
426 Views
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.
0 Kudos
Reply