Using Guided Auto Parallelism in the Eclipse* IDE

The following topic applies to Eclipse* for C/C++.

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 shows code that can increase efficiency by executing through automatic parallelization and vectorization.

Running Analysis on a Project

To start analysis from the Eclipse* IDE:

  • Run a one-time analysis for the current project. Select Intel Tools > Guided Auto Parallelism > Quick Analysis.

    The Intel Tools menu can be accessed from the Project portion of the main menu bar, or from the project's context menu.

    The default configuration settings are defined in Intel Guided Auto Parallelism Preferences. To access the GAP preference page, select Window > Preferences > C/C++ > Intel Guided Auto Parallelism.

  • Run analysis as part of a normal project build.

    Select Project > Properties > C/C++ Build > Settings > Compilation Diagnostics and enable analysis by selecting one of the values from the Enable Guided Auto Parallelism Analysis drop-down list. In this mode, GAP-related settings in Intel Guided Auto Parallelism Preferences are ignored, in favor of other GAP-related settings available in the property page.

To receive advice, be sure that auto-parallelization is enabled and that the optimization level is set to option O2 (the default setting) or higher. To enable auto-parallelization, select Project > Properties > C/C++ Build Settings > Optimization using the Parallelization property page. To set the optimization level, select Project > Properties > C/C++ Build > Settings > General.

Running Analysis on a File or within a File

Use the Guided Auto Parallelism context menu item to run analysis on the following:

  • Single file: Select a file and right-click.

  • Function: Right-click within the function scope.

  • Range of lines: Select one or more lines for analysis and right-click.

    Note

    Eclipse* takes the highlighted selection and passes the corresponding line numbers or routine name parameter to the compiler.

    Select a project, folder, files, or any combination thereof.

Examples

To illustrate how the various Guided Auto Parallelism settings work together, consider the following scenarios:

Scenario: The GAP analysis setting in the property pages is set to Enabled.

Result: Analysis occurs for the project during all regular project builds. In the property pages define the Analysis settings, and the compiler ignores analysis settings in Intel Guided Auto Parallelism Preferences.

Scenario: The GAP analysis setting in the property pages is set to Disabled and GAP is run from the Intel Tools menu.

Result: Analysis occurs for one build. Default values for this analysis are taken from Intel Guided Auto Parallelism Preferences and can be overridden in the dialog box. Options specified in the property pages are also used, but will be overridden by specified analysis options.

Scenario: The GAP analysis setting in the property pages is set to Disabled, but GAP options are set in Intel Guided Auto Parallelism Preferences.

Result: No analysis occurs, unless explicitly selected in the Intel Tools menu.

For more complete information about compiler optimizations, see our Optimization Notice.