Enable Platform-Appropriate Vectorization

At this point in the Tutorial, you enable the use of vector registers appropriate for the platform and check vectorization efficiency.

Note

Enable Full Vectorization

To enable the use of a vector instruction set appropriate for the platform, one possible way is to instruct the compiler to use the same vector extension as the best one available in the processor performing the compilation.

Follow these steps to enable platform-appropriate vectorization using Visual Studio*:

  1. In the Solution Explorer pane, right-click the matrix project and select Properties.

  2. Navigate to the C/C++ > Code Generation [Intel C++] menu.

  3. Set the Intel Processor-Specific Optimization option to Same as the host processor performing the compilation (/QxHost) to instruct the compiler to use the best instruction set extension available on the processor that is performing the compilation.

  4. Save changes to the Properties.

  5. Build the application.

Check Vectorization with Performance Snapshot

Run the Performance Snapshot analysis to ensure that the application is properly vectorized.

Once the application exits, Intel® VTune™ Profiler opens the Performance Snapshot Summary window.

Observe these main indicators:

Next step: Analyze Microarchitecture Usage.