In this step, you will implement the report recommendations by defining a directive in the compiler options and then compiling the source code. The recommendations are implemented in the source code if you define the directive TEST_GAP
in the compiler options.
In Solution Explorer, right-click on the GAP-c project and select Properties. The Property Pages dialog box appears.
In Configuration Properties> > C/C++> Preprocessor> Preprocessor Definitions, click the dropdown list box and select <Edit>. The Preprocessor Definitions dialog box appears.
In a new line in the text box, type
TEST_GAP
.Click OK. The preprocessor definition appears in the dropdown list box.
Select Configuration Properties> C/C++> Diagnostics [Intel C++].
For Optimization Diagnostics Level, select Level 1 (/Qopt-report:1) from the dropdown list.
For Optimization Diagnostics Phase, select Auto-Parallelization (/Qopt-report-phase:par) from the dropdown list.
Click OK to close the property pages.
Select Build > Build Solution.
The compiler parallelized and vectorized the loop if the Compiler Optimization Report window shows the following under Main loop:
LOOP BEGIN at scalar_dep.cpp(71,3) remark #17109: LOOP WAS AUTO-PARALLELIZED LOOP END
Note
Your line and column numbers in the output may be different.For more information on using these compiler options, see the Compiler Options section in the Compiler User Guide and Reference.
This step is the last step in the tutorial.