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. You can use the same terminal session from the previous step. If you open a new terminal session, you will have to set the environment variables in the new terminal session.
Compile the source code with the following command in the sample code directory:
icpc -c -parallel -D TEST_GAP -par-report1 scalar_dep.cpp
The compiler parallelized and vectorized the loop if you see the following compiler output:
scalar_dep.cpp(71) (col. 3): remark: LOOP WAS AUTO-PARALLELIZED.
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.