Community
cancel
Showing results for 
Search instead for 
Did you mean: 
50 Views

How portable is Intel C++ Compiler.

Jump to solution
I would like to know if Intel C++ Compiler is exactly the same for all platform. I mean.. Should I expect different behaviors in my code when are compiled in different platforms?

I guess that the parameters that Intel C++ Compiler is the same for all platform. So.. could I take from Eclipse or Visual Studio the command line to run the compiler from the console in a easy way?

Thanks in advance.
0 Kudos

Accepted Solutions
Brandon_H_Intel
Employee
50 Views
Tim is right. The Intel C++ Compiler aims mostly for compatibility with the Microsoft* compiler on Windows* and gcc* on Linux*. There are source and binary differences between the two. For example, you use __declspec on Windows* whereas you would use __attribute__ on Linux* for certain compiler extensions. From a binary perspective, there are differences in the ABI on the two operating systems that can affect how the compiler is required to generate code that can affect optimizations.

Where there are no such requirements, you can expect the Intel compiler to behave pretty similarly across platforms. PGO for example works exactly the same on both platforms, except for the slight option name changes Tim refers to.

View solution in original post

2 Replies
TimP
Black Belt
50 Views
Obviously, the command line options are spelled differently in the Windows compilers, but the options do have consistent meanings between the Intel compilers of the same version numbers:
/Qansi-alias vs. -ansi-alias
/arch:SSE3 vs. -msse3
/fp:source vs. -fp-model source (Microsoft /fp:fast)
.....
and the Visual Studio buildlog gives you a bunch of Microsoft specific spellings in addition to Intel ones.
Brandon_H_Intel
Employee
51 Views
Tim is right. The Intel C++ Compiler aims mostly for compatibility with the Microsoft* compiler on Windows* and gcc* on Linux*. There are source and binary differences between the two. For example, you use __declspec on Windows* whereas you would use __attribute__ on Linux* for certain compiler extensions. From a binary perspective, there are differences in the ABI on the two operating systems that can affect how the compiler is required to generate code that can affect optimizations.

Where there are no such requirements, you can expect the Intel compiler to behave pretty similarly across platforms. PGO for example works exactly the same on both platforms, except for the slight option name changes Tim refers to.

View solution in original post