User Guide

Contents

Inserting
Annotations Using the Annotation Wizard

Adding annotations requires you to reference the annotation definitions include file as well as include it from each source file that contains
Intel® Advisor
annotations.
The Annotation Wizard is supported only in the Microsoft Visual Studio* code editor. Alternatively, you can copy annotation code snippets using any editor.
Use the annotation wizard to add
Intel® Advisor
annotations to your program.
  1. In the Visual Studio* editor, select the code section that you wish to annotate.
  2. Right-click to open the context menu and select
    Intel Advisor [version]
    > Annotation Wizard...
    The Annotation Wizard opens with the default
    Annotate Site – select task annotations below
    annotation selected:
    Annotation Wizard first dialog box
  3. From the
    Choose the Annotation Type
    drop-down, choose the appropriate annotation type. For example, if you want to add the parallel site (parallel code region) annotations and a single task annotation within that site, start by selecting the site code block and choose
    Site and Iteration Task Snippet, single iteration task in loop
    . In other cases, you may need to add two separate annotations - one for the site and one for the task(s). In this case, after adding them, move individual annotation lines around your existing site and task(s) code.
    Your code appears in the
    Example
    section of the dialog, with the annotation line(s) highlighted in red font.
  4. Click
    Next
    to configure the parameters of the opening annotation line.
    For Annotation types that include parameters, page 2 of the wizard appears. Site, task, and other annotations take name arguments. You should replace the added name with a name that helps you quickly identify its source location. For example, if
    MySite1
    is the argument to a site annotation, replace it with a meaningful function or loop name. The added name must be unique amongst the annotations in this project. For Annotation types that do not include parameters, go to step 8.
  5. Specify the parameter values for the first parameter in the Annotation type, or use the default text that appears in the wizard.
    The highlighted annotation line now has your specified parameter value entered in the annotation line.
  6. Click
    Next
    to configure, or keep the default text for the next parameter. Repeat for all the parameters.
    The highlighted annotation line now has all parameters filled in with values entered in the annotation line.
  7. Click
    Next
    to go to page 3 of the wizard and review the annotation line(s) before adding it to you code.
  8. Click
    Finish
    to add the annotation line with your specified parameters to your code.
    The Wizard closes and the editor shows the annotation lines added to the code.
The annotation line(s) are added in the code editor.
If a 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.
Code After Adding a Pair of Parallel Site Annotations
The following screen capture shows the C/C++ annotation lines for an annotation of type
Annotate Site
, where the site name
MySite
n
parameter was replaced by typing a meaningful name
queens
:
Annotation Wizard example

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