User Guide

Contents

Multiple Parallel Sites

You may be able to introduce parallelism independently in more than one place in a program.
For example, consider a C/C++ program with the general structure:
initialize(data); while (!done) {     display_on_screen(data);     update(data); }
You might be able to parallelize the display and update operations independently:
display_on_screen(data) {     ANNOTATE_SITE_BEGIN(site_display);     for (each block of data) {         ANNOTATE_ITERATION_TASK(task_display);         display the block of data;     }     ANNOTATE_SITE_END(); } update(data) {     ANNOTATE_SITE_BEGIN(site_update);     for (each block of data) {         ANNOTATE_ITERATION_TASK(task_update);         update the block of data;     }     ANNOTATE_SITE_END(); }
Each iteration of the main loop would still do the display and then the update, but the display and update operations could be performed much faster.
Depending on your program, you need to decide whether to implement multiple parallel sites at the same or at different times:
  • When two parallel sites are truly disjoint or have overlapping functions that are purely functional and do not show problems reported by the Dependencies tool, you can consider parallelizing those sites separately at different times.
  • When considering multiple parallel sites that overlap on the same call trees - such as multiple sites that call the same (common) utility functions - consider parallelizing or not parallelizing the entire set of parallel sites at the same time.
You need to determine the cause of each dependency and fix it. If you have multiple parallel sites that overlap on the same call trees - such as multiple sites that call the same utility functions (common code) - read the help topic Fixing Problems in Code Used by Multiple Parallel Sites.

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