Resolve Issue
In the
Source
window, the
multiply1
function was identified as a Memory Bound hotspot. To solve this issue, do the following:
The proposed solution is one of the multiple ways to optimize memory access and is used for demonstration purposes only.
- Open themultiply.hfile from the sample code source files. You can find the source files in the following location:C:\Users\.<user>\Documents\VTune\sample\matrix\srcIf you are using Microsoft Visual Studio* as your code editor, a project is available in theC:\Users\directory.<user>\Documents\VTune\sample\matrix\vc15 (vc14 or vc12)For this sample, themultiply.hfile is used to define the functions used in themultiply.cfile.
- In line 36, replace themultiply1function name with themultiply2function.This new function uses the loop interchange mechanism that optimizes the memory access in the code, which can be seen in themultiply.cfile.
- Save files and rebuild the project using the compiler of your choice.For example, from the Visual Studio menu, select.
Next Step
Optimization Notice
|
---|
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804
|