Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 2.11 KB

qpar-auto-parallelizer.md

File metadata and controls

43 lines (28 loc) · 2.11 KB
description title ms.date f1_keywords ms.assetid
Learn more about: /Qpar (Auto-parallelizer)
/Qpar (Auto-parallelizer)
02/22/2022
VC.Project.VCCLCompilerTool.EnableParallelCodeGeneration
33ecf49d-c0d5-4f34-bce3-84ff03f38918

/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

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Code Generation property page.

  3. 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 xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A.

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