Annotating Parallel Sites and Tasks

You insert 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 serial 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 parallelism. Annotations are used by the Intel Advisor Suitability and Correctness tools.

After you decide on the program site and tasks, insert the annotations listed in the help topic Summary of Annotation Types.

To simplify inserting Intel Advisor annotations:

  • When using the Microsoft Visual Studio* code editor, you can use the Annotation Wizard, as described in the Inserting Annotations Using the Annotation Wizard help topic.

  • With any editor, use the annotation assistant in the Survey Report window, Survey Source window, or the No Data message to copy example annotated 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 parallelism, you will find some areas are not feasible. Adding a comment that explains 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 
// July 2013. Need to first re-write the function to improve parallel 
// performance and fix the data race. 

For a summary of annotations, see the help topic Summary of Annotation Types.

For more complete information about compiler optimizations, see our Optimization Notice.