13.07.2015 Views

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

Intel® 64 and IA-32 Architectures Optimization Reference Manual

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPLICATION PERFORMANCE TOOLSA.1.2.1Multithreading with OpenMP*Both the Intel C++ <strong>and</strong> Fortran Compilers support shared memory parallelism usingOpenMP compiler directives, library functions <strong>and</strong> environment variables. OpenMPdirectives are activated by the compiler switch /Qopenmp (-openmp on Linux <strong>and</strong>Mac OS). The available directives are described in the Compiler User's Guides availablewith the Intel C++ <strong>and</strong> Fortran Compilers. For information about the OpenMPst<strong>and</strong>ard, see http://www.openmp.org.A.1.2.2Automatic MultithreadingBoth the Intel C++ <strong>and</strong> Fortran Compilers can generate multithreaded code automaticallyfor simple loops with no dependencies. This is activated by the compilerswitch /Qparallel (-parallel in Linux <strong>and</strong> Mac OS).A.1.3Inline Expansion of Library Functions (/Oi, /Oi-)The compiler inlines a number of st<strong>and</strong>ard C, C++, <strong>and</strong> math library functions bydefault. This usually results in faster execution. Sometimes, however, inline expansionof library functions can cause unexpected results. For explanation, see theIntel C++ Compiler documentation.A.1.4Floating-point Arithmetic Precision (/Op, /Op-, /Qprec,/Qprec_div, /Qpc, /Qlong_double)These options provide a means of controlling optimization that might result in a smallchange in the precision of floating-point arithmetic.A.1.5Rounding Control Option (/Qrcr, /Qrcd)The compiler uses the -Qrcd option to improve the performance of code that requiresfloating-point calculations. The optimization is obtained by controlling the change ofthe rounding mode.The -Qrcd option disables the change to truncation of the rounding mode in floatingpoint-to-integerconversions.For more on code optimization options, see the Intel C++ Compiler documentation.A.1.6Interprocedural <strong>and</strong> Profile-Guided <strong>Optimization</strong>sThe following are two methods to improve the performance of your code based on itsunique profile <strong>and</strong> procedural dependencies.A-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!