Intel® Advisor User Guide

ID 766448
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Annotate Parallel Sites and Tasks

You add annotations into your program to mark the tasks and parallel sites. The annotations are one-line macro uses or function calls that have no effect on the behavior of your program.

Annotations allow you to mark your tentative decisions about your program's task structure before you modify the program to use parallel execution. Annotations are used by the Intel® Advisor Suitability and Dependencies tools.

After you decide on the parallel site(s) and task(s), add the annotations into your source code.

To simplify adding Intel® Advisor annotations:

  • When using the Microsoft Visual Studio* code editor, you can use the Annotation Wizard.

    NOTE:
    In Visual Studio* 2022, Intel Advisor provides lightweight integration. You can configure and compile your application and open the standalone Intel Advisor interface from the Visual Studio for further analysis. All your settings will be inherited by the standalone Intel Advisor project.
  • With any editor, use the annotation assistant in the Survey Report window, Survey Source window, or the No Data message to copy example annotation code and build settings.

Code examples throughout this group of topics illustrate the use of these annotations.

As you use Intel® Advisor to investigate possible code regions for adding parallel execution, you will find some areas are not feasible. Adding a comment to explain why that site (or task) was not chosen may help later. For example, with C/C++ code:

...
// Investigated the following function call as a parallel task and dismissed 
// June 2014. Need to first re-write the function to improve parallel 
// performance and fix the data race. 
//
//  ANNOTATE_TASK_BEGIN(func1);
.
.
.