description | title | ms.date | f1_keywords | ms.assetid | |
---|---|---|---|---|---|
Learn more about: /Qpar (Auto-parallelizer) |
/Qpar (Auto-parallelizer) |
02/22/2022 |
|
33ecf49d-c0d5-4f34-bce3-84ff03f38918 |
Enables the Auto-parallelizer feature of the compiler to automatically parallelize loops in your code.
/Qpar
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).
-
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.
- Use the code example in xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A.
/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