The Guided Auto Parallelism (GAP) feature helps you locate portions of your serial code that can be parallelized. When you enable analysis using GAP, the compiler guides you to places in your code where you can increase efficiency through automatic parallelization and vectorization.
Running Analysis on a Project
You can start analysis from the Microsoft Visual Studio* IDE in several ways:
From the Tools menu: Select Intel Compiler> Guided Auto Parallelism> Run Analysis....
Starting analysis in this way results in a one time run for the current project. The default values are taken from Tools> Options unless you have chosen to override them in the dialog box.
From the Diagnostics property page: use the Guided Auto Parallelism Analysis property.
Specifically, choose Project> Properties> C/C++> Diagnostics and enable analysis using the Guided Auto Parallelism Analysis property. Enabling analysis in the property page allows you to run an analysis as part of a normal project Build request in Visual Studio*. In this mode, GAP-related settings in Tools> Options are ignored, in favor of other GAP-related settings available in the property page.
From the context menu: Right-click and select Intel Compiler> Guided Auto Parallelism> Run Analysis... .
This is equivalent to using the Guided Auto Parallelism> Run Analysis option on the Tools menu.
To receive advice for auto parallelization, be sure that certain property page settings are correct. Select Project> Properties> C/C++> Optimization and enable auto-parallelization optimization using the Parallelization property page. You may also need to set the optimization level at option O2 or higher. To do this, use the Optimization property page.
GAP Scenarios
To illustrate how the various Guided Auto Parallelism settings work together, consider the following scenarios:
Scenario | Result |
The GAP analysis setting in the property pages is set to Enabled. | Analysis always occurs for the project, whenever a regular project build occurs. Other analysis settings specified in the property pages are used. Analysis settings in Tools> Options are ignored. |
The GAP analysis setting in the property pages is set to Disabled, and GAP is run from the Tools menu. | Analysis occurs for this one run. The default values for this analysis are taken from Tools> Options and can be overridden in the dialog box. Options specified in the property pages are also used but will be overridden by any specified analysis option. |
The GAP analysis setting in the property pages is set to Disabled, and GAP options are set in Tools> Options. | No analysis occurs, unless analysis is explicitly run from the Tools menu. |
Running Analysis on a File or within a File
Use the right-click Guided Auto Parallelism context menu item to run analysis on the following:
Single file: Select a file and right-click.
Function (routine): Right-click within the function scope.
Range of lines: Select one or more lines for analysis and right-click.