Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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