Manual Processor Dispatch

The Intel® compilers support two code paths when using automatic processor dispatch. However, with the Intel C++ Compiler you can use manual processor dispatch to support up to seven different versions of any one function, targeting up to seven different processors.

To use manual processor dispatch, create processor-specific versions of each function that you want to optimize using processor dispatch.

Use the following statements:

__declspec(cpu_specific(cpuid))

per implementation

__declspec(cpu_dispatch(cpuid-list))

for dispatch function stub

where cpuid is one of the following strings:

  • generic
  • pentium
  • pentium_pro
  • pentium_MMX
  • pentium_II
  • pentium_III
  • pentium_4

You can use manual processor dispatch in conjunction with the -Qx (-x on Linux*) options.

See the example on the next page.