Share via


/Qpar (Auto-Parallelizer)

Enables the Auto-Parallelizer feature of the compiler to automatically parallelize loops in your code.

/Qpar

Remarks

When the compiler automatically parallelizes loops in code, it spreads computation across multiple processor cores. A loop is parallelized only if the compiler determines that it is 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. In Solution Explorer, open the shortcut menu for the project and then choose Properties.

  2. In the Property Pages dialog box, under C/C++, select Command Line.

  3. In the Additional Options box, enter /Qpar.

To set the /Qpar compiler option programmatically

See Also

Reference

/Q Options (Low-Level Operations)

/Qpar-report (Auto-Parallelizer Reporting Level)

Compiler Options

Setting Compiler Options

#pragma loop()

Other Resources

Parallel Programming in Native Code