/Qpar
(Auto-parallelizer)
Enables the Auto-parallelizer feature of the compiler to automatically parallelize loops in your code.
Syntax
/Qpar
Remarks
When the compiler automatically parallelizes loops in code, it spreads computation across multiple processor cores. The compiler parallelizes a loop only if it determines that it's legal to do so and that parallelization would improve performance.
The #pragma loop()
directives are available to help the optimizer parallelize specific loops. For more information, see loop
.
For information about how to enable output messages for the auto-parallelizer, see /Qpar-report
(Auto-parallelizer reporting level).
To set the /Qpar
compiler option in Visual Studio
Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
Select the Configuration Properties > C/C++ > Code Generation property page.
Modify the Enable Parallel Code Generation property. Choose OK or Apply to save your changes.
To set the /Qpar
compiler option programmatically
- Use the code example in AdditionalOptions.
See also
/Q
options (Low-level operations)
/Qpar-report
(Auto-parallelizer reporting level)
MSVC compiler options
MSVC compiler command-line syntax
#pragma loop()
Native code vectorization in Visual Studio
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru