Informs the compiler about the number of hardware threads per core that will be used for an application. This option only applies when targeting Intel® Xeon Phi™ products.

Architecture Restrictions

Only available when targeting Intel® Xeon Phi™ products

Syntax

Linux:

-qopt-threads-per-core=n

macOS:

None

Windows:

/Qopt-threads-per-core:n

Arguments

n

Is the number of hardware threads per core that the compiler should assume that will be used while executing the application. Possible values are 1, 2, 3, or 4.

Default

4

Four hardware threads per core are used for the application.

Description

This option informs the compiler about the number of hardware threads per core that will be used for an application. This enables the compiler to perform better code optimizations (such as instruction scheduling).

You should choose a value for n that is based on how many threads will be used per core while executing the application. For example, if the application is parallelized using OpenMP* API, use the value of n that uses the same number of threads per core as the OpenMP* API affinity setting will use when executing the application code on the Intel® Xeon Phi™ processor.

This option does not affect the number of threads per core that will be used at run time.

Code compiled with this option can run correctly on any (hardware-supported) number of threads per core.

IDE Equivalent

None

Alternate Options

None

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.