You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/parallel/openmp/reference/openmp-directives.md
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,13 @@ For parallel work-sharing:
19
19
|[parallel](#parallel)|Defines a parallel region, which is code that will be executed by multiple threads in parallel.|
20
20
|[for](#for-openmp)|Causes the work done in a `for` loop inside a parallel region to be divided among threads.|
21
21
|[sections](#sections-openmp)|Identifies code sections to be divided among all threads.|
22
-
|[single](#single)|Lets you specify that a section of code should be executed on a single thread, not necessarily the master thread.|
22
+
|[single](#single)|Lets you specify that a section of code should be executed on a single thread, not necessarily the main thread.|
23
23
24
-
For master and synchronization:
24
+
For main thread and synchronization:
25
25
26
26
|Directive|Description|
27
27
|---------|-----------|
28
-
|[master](#master)|Specifies that only the master thread should execute a section of the program.|
28
+
|[master](#master)|Specifies that only the main thread should execute a section of the program.|
29
29
|[critical](#critical)|Specifies that code is only executed on one thread at a time.|
30
30
|[barrier](#barrier)|Synchronizes all threads in a team; all threads pause at the barrier, until all threads execute the barrier.|
31
31
|[atomic](#atomic)|Specifies that a memory location that will be updated atomically.|
@@ -356,7 +356,7 @@ The sum of 1 through 10 is 55
356
356
357
357
## <aname="master"></a> master
358
358
359
-
Specifies that only the master thread should execute a section of the program.
359
+
Specifies that only the main thread should execute a section of the program.
360
360
361
361
```cpp
362
362
#pragma omp master
@@ -371,12 +371,11 @@ The `master` directive supports no clauses.
371
371
372
372
For more information, see [2.6.1 master construct](../2-directives.md#261-master-construct).
373
373
374
-
To specify that a section of code should be executed on a single thread, not necessarily the master thread, use the [single](#single) directive instead.
374
+
To specify that a section of code should be executed on a single thread, not necessarily the main thread, use the [single](#single) directive instead.
375
375
376
376
### Example
377
377
378
378
```cpp
379
-
// omp_master.cpp
380
379
// compile with: /openmp
381
380
#include<omp.h>
382
381
#include<stdio.h>
@@ -606,7 +605,7 @@ Hello from thread 0
606
605
607
606
## <aname="single"></a> single
608
607
609
-
Lets you specify that a section of code should be executed on a single thread, not necessarily the master thread.
608
+
Lets you specify that a section of code should be executed on a single thread, not necessarily the main thread.
610
609
611
610
```cpp
612
611
#pragma omp single [clauses]
@@ -631,7 +630,7 @@ The `single` directive supports the following clauses:
631
630
632
631
For more information, see [2.4.3 single construct](../2-directives.md#243-single-construct).
633
632
634
-
To specify that a section of code should only be executed on the master thread, use the [master](#master) directive instead.
633
+
To specify that a section of code should only be executed on the main thread, use the [master](#master) directive instead.
0 commit comments