User Guide

Contents

Inserting
Annotations in the Visual Studio* Code Editor

To add
Intel® Advisor
annotations into your source files, you can use the
Visual Studio* code editor
.
Intel® Advisor
simplifies the process of adding annotations so you do not need to type the annotation names. Alternatively, you can use the annotation assistant in the Survey Report or Survey Source windows, or when using the Visual Studio code editor, the Annotation Wizard (on Windows* OS systems). Alternatively, you can type the exact macro name and its arguments manually.
To add
Intel® Advisor
annotations:
  1. Open the source file into which you want to add
    Intel® Advisor
    annotations in your code editor. You should start with the outermost code regions, such as a parallel site, and then add the tasks within the boundaries of the enclosing site.
  2. Select the code region around which you will add your first annotation, such as a parallel site. Carefully include the correct group of lines, including any opening and closing braces (
    {
    and
    }
    ) needed. For example:
    Select the code region by dragging the mouse pointer
  3. Within the highlighted code region, right-click the mouse to display the context menu. Select
    Intel Advisor [version]
    and the type of annotation to be added, such as
    Intel Advisor [version]
    > Annotate Site
    . For example:
  4. This adds the selected type of annotations. For the begin site annotation,
    Intel® Advisor
    adds a unique annotation identifier as an argument.
    Replace the placeholder (<site_name>) with a unique
			 identifier (solve)
    You should replace the added name with a name that helps you quickly identify its source location. For example, in place of
    MySite1
    in the argument to
    ANNOTATE_SITE_BEGIN()
    and
    ANNOTATE_SITE_END()
    shown above, you might instead type the word
    solve
    (the function name). The added name must be unique amongst the annotations in this project. Annotation name arguments for:
    • C/C++ code use an ASCII C++ identifier.
    • Fortran code use a character constant.
    • C# code use a string (Windows OS only)
    Choose a string that you will easily remember when it appears in
    Intel Advisor
    tool reports. Other annotations use address or size arguments.
  5. To add more annotations in the same file, repeat this process from step 2. To add annotations in a different file, repeat this process from step 1.
This enables you to quickly add annotations into the appropriate source files.
This wizard provides only the more frequently used annotations, so some annotations are not available in this wizard. Either use the Survey windows' annotation assistant to copy other annotations or type the annotations into your code editor.
If a C/C++ loop only executes a single statement and does not contain an opening brace (
{
) to allow multi-statement execution, add braces (
{
and
}
) around the existing statement and the annotation.

Product and Performance Information

1

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