@@ -32,7 +32,7 @@ Directive | Description
3232[ single] ( #single ) | Lets you specify that a section of code should be executed on a single thread, not necessarily the master thread.
3333[ threadprivate] ( #threadprivate ) | Specifies that a variable is private to a thread.
3434
35- ## atomic
35+ ## < a name = " atomic " ></ a > atomic
3636
3737Specifies that a memory location that will be updated atomically.
3838
@@ -77,7 +77,7 @@ int main() {
7777Number of threads: 10
7878```
7979
80- ## barrier
80+ ## < a name = " barrier " ></ a > barrier
8181
8282Synchronizes all threads in a team; all threads pause at the barrier, until all threads execute the barrier.
8383
@@ -95,7 +95,7 @@ For more information, see [2.6.3 barrier Directive](../../../parallel/openmp/2-6
9595
9696For a sample of how to use ` barrier ` , see [ master] ( #master ) .
9797
98- ## critical
98+ ## < a name = " critical " ></ a > critical
9999
100100Specifies that code is only be executed on one thread at a time.
101101
@@ -175,7 +175,7 @@ int main()
175175max = 29358
176176```
177177
178- ## flush (OpenMP)
178+ ## < a name = " flush-openmp " ></ a > flush (OpenMP)
179179
180180Specifies that all threads have the same view of memory for all shared objects.
181181
@@ -251,7 +251,7 @@ Thread 1: process data
251251data = 2
252252```
253253
254- ## for (OpenMP)
254+ ## < a name = " for-openmp " ></ a > for (OpenMP)
255255
256256Causes the work done in a ` for ` loop inside a parallel region to be divided among threads.
257257
@@ -348,7 +348,7 @@ int main() {
348348The sum of 1 through 10 is 55
349349```
350350
351- ## master
351+ ## < a name = " master " ></ a > master
352352
353353Specifies that only the master thread should execute a section of the program.
354354
@@ -410,7 +410,7 @@ a[3] = 9
410410a[4] = 16
411411```
412412
413- ## ordered (OpenMP directives)
413+ ## < a name = " ordered-openmp-directives " ></ a > ordered (OpenMP directives)
414414
415415Specifies that code under a parallelized ` for ` loop should be executed like a sequential loop.
416416
@@ -481,7 +481,7 @@ test2() iteration 3
481481test2() iteration 4
482482```
483483
484- ## parallel
484+ ## < a name = " parallel " ></ a > parallel
485485
486486Defines a parallel region, which is code that will be executed by multiple threads in parallel.
487487
@@ -544,7 +544,7 @@ Hello from thread 3
544544
545545Note that the order of output can vary on different machines.
546546
547- ## sections (OpenMP)
547+ ## < a name = " sections-openmp " ></ a > sections (OpenMP)
548548
549549Identifies code sections to be divided among all threads.
550550
@@ -602,7 +602,7 @@ Hello from thread 0
602602Hello from thread 0
603603```
604604
605- ## single
605+ ## < a name = " single " ></ a > single
606606
607607Lets you specify that a section of code should be executed on a single thread, not necessarily the master thread.
608608
@@ -663,7 +663,7 @@ compute results
663663write output
664664```
665665
666- ## threadprivate
666+ ## < a name = " threadprivate " ></ a > threadprivate
667667
668668Specifies that a variable is private to a thread.
669669
0 commit comments