User Guide

  • 2020
  • 06/18/2020
  • Public Content
Contents

Examine the Task's Static and Dynamic Extent

Consider the example of incidental sharing from the help topic Incidental Sharing :
extern int x; ANNOTATE_SITE_BEGIN(site1); for (i = 0; i != n; ++i) {     ANNOTATE_ITERATION_TASK(task1);     x = a[i];     b[i] = x * b[i]; } ANNOTATE_SITE_END();

Examining the Static Extent of the Task

If you define a substitute variable inside the static extent, then each task will get its own private storage for it:
extern int x; // ... ANNOTATE_SITE_BEGIN(site2); for (i = 0; i != n; ++i) {     ANNOTATE_ITERATION_TASK(task2);     int x_sub;     x_sub = a[i];     b[i] = x_sub * b[i]; } ANNOTATE_SITE_END();

Examining the Dynamic Extent of the Task

In the simplest cases, like the example above, the task's dynamic extent is the same as its static extent - it does not contain any function calls. When it does contain function calls, all the functions that might be called while the task is executing are part of its dynamic extent, and you need to consider all reads and writes of the memory location in all of those functions.
So, you need to examine not only the static extent, but also the dynamic extent of a task.

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