Sometimes the loop control is spread across complex control flow. Using Intel TBB or Intel Cilk Plus in this situation requires more features than the simple loops. Note that the task body must not access any of the auto variables defined within the annotation site, because they may have been destroyed before or while the task is running. Consider this serial code:
After you launch the Microsoft Visual Studio* or Intel® Advisor GUI environment and choose your target, you can begin the process of using the Intel Advisor tools to help you add parallelism into parts of your program.
To launch the Intel Advisor tools, use one of the following:
The Intel® Advisor Dependencies tool runs your target application and watches its memory access operations to predict possible data sharing problems.
After the Intel® Advisor Memory Access Patterns tool runs your program to collect data, the Memory Access Patterns Report tab of the Refinement Reports window opens.
You can view the Memory Access Patterns analysis results in both the Refinement Reports top panel and in the Memory Access Patterns Report tab right beneath.
Intel Advisor tools are designed to collect data and analyze serial programs. If you have a partially parallel program, before you use the Intel Advisor Suitability and Dependencies tools to examine it to add more parallelism, read the guidelines in this topic and modify your program so it runs as a serial program with a single thread within each parallel site.
To access this dialog box: in the Visual Studio code editor, right-click to open the context menu, and select > Annotation Wizard.
The Annotation Wizard helps you add annotations into your code. After you are done adding annotations, rebuild your program.
Use page 1 of the wizard to select the type of annotation from the Choose the annotation type drop down list.