Key Terms

The following terms are used throughout this tutorial.

annotation: Intel® Advisor annotations are one-line statements that identify certain information to Intel Advisor tools, such as the location of proposed parallel sites. To insert annotations into your source code, you can copy code snippets from the annotation assistant pane into your code editor. On Windows systems, you can instead use the Intel Advisor annotation wizard.

data race: A bug that can occur after adding parallelism to parts of your program. A data race occurs when multiple tasks read and write data at a shared memory location without coordinating those read and write operations. This can produce parallel execution errors that are difficult to detect and reproduce. Using the Correctness tool helps you predict and fix likely data races before you add parallelism.

hotspot: A small code region that consumes much of the program's run time, such as a loop. Hotspots can be identified by a profiler, such as the Intel Advisor Survey tool or the Intel® VTune™ Amplifier. Hotspots are code regions that help you select candidates for adding parallelism that you mark as a parallel site and one or more task(s).

parallel framework: A combination of libraries, language features, or other software techniques that enable code for a program to execute in parallel. Examples for C/C++ include Intel® Threading Building Blocks and Intel® Cilk™ Plus, which are both included with Intel® Composer XE. The OpenMP* parallel framework for C/C++ and Fortran code is available with multiple compilers. After you find possible places to add parallelism with Intel Advisor, you identify parallel sites and their tasks, which are also used by high-level threading frameworks. In contrast, low-level threading APIs like Windows* or POSIX* Threads require that you directly create and control threads.

parallel site: A region of code that contains one or more tasks that may execute in parallel. An effective parallel site typically contains a hotspot that consumes much of your program's CPU time. To distribute these frequently executed instructions to different tasks that can run at the same time, your parallel site is not usually located at the hotspot, but higher in the call graph. For example, a parallel site might be located in a function whose code eventually executes the hotspot. All tasks that were started within a site must complete before execution is allowed to proceed past the end of a site.

synchronization: Coordinating the execution of multiple threads. For example, a lock or mutex can be used to restrict access to shared data to prevent a data race.

target: An executable file. The Intel Advisor tools run with your target executable to collect data and perform analysis about its execution characteristics.

task: A portion of time-consuming code and its data that can be executed in one or more parallel threads to distribute work. One or more tasks execute within a parallel site.

如需更全面地了解编译器优化,请参阅优化注意事项