Intel® Advisor User Guide

ID 766448
Date 12/16/2022
Public

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

Document Table of Contents

Special-purpose Annotations

All Intel Advisor special-purpose annotations are recognized by the Dependencies tool, which observes memory accesses in great detail. Some of these annotations prevent the Dependencies tool from reporting all or specific data sharing problems, while one (Observe Uses of Storage) provides more detail about memory accesses.

NOTE:

In the C/C++ syntax descriptions below, addresses and sizes are C++ expressions. Similarly, the Fortran var is a Fortran integer address.

NOTE:
C# and .NET support is deprecated starting Intel® Advisor 2021.1.

This topic describes the following special-purpose annotations:

Inductive Expressions Uses

Induction variables (such as ++i) can often be eliminated when you add parallel framework code. Use this annotation to disable reporting data sharing problems for the specified memory region. This annotation is only recognized by the Dependencies tool.

Terminate this annotation with a Clear Uses of Storage annotation.

Syntax:

C/C++:

ANNOTATE_INDUCTION_USES(address, size);

Fortran:

call annotate_induction_uses(var)

C#:

Not supported

  • address is a C++ identifier or expression that provides information about the memory region for this annotation.

  • size is a C++ identifier or expression that provides information about the memory region for this annotation.

  • var is a Fortran integer address that provides information about the memory region for this annotation.

Reduction Uses

Reduction variables (such as sum += data[i]) can often be replaced with reduction operations when you add parallel framework code. Use this annotation to disable reporting data sharing problems for the specified memory region. This annotation is only recognized by the Dependencies tool.

Terminate this annotation with a Clear Uses of Storage annotation. For example, with C/C++ code:

 ANNOTATE_REDUCTION_USES(&sum, 4); 
    sum += a[i];
 ANNOTATE_CLEAR_USES(&sum); 

Syntax:

C/C++:

ANNOTATE_REDUCTION_USES(address, size);

Fortran:

call annotate_reduction_uses(var)

C#:

Not supported

  • address is a C++ identifier or expression that provides information about the memory region location for this annotation.

  • size is a C++ identifier or expression that provides information about the memory region location for this annotation.

  • var is a Fortran integer address that provides information about the memory region for this annotation.

Observe Uses of Storage

Use this annotation to report all accesses to the specified memory region. For example, this can help you find all of the uses of a variable to determine how you should refactor your code. This annotation gets reported as a Memory watch remark message in the Dependencies Report. This annotation is only recognized by the Dependencies tool.

NOTE:

For performance reasons, this annotation may not report memory access for variables stor