Skip to content

Commit 335b96e

Browse files
authored
Use 'main' instead of 'master' where possible.
1 parent b15fb5f commit 335b96e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/parallel/openmp/reference/openmp-directives.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ For parallel work-sharing:
1919
|[parallel](#parallel)|Defines a parallel region, which is code that will be executed by multiple threads in parallel.|
2020
|[for](#for-openmp)|Causes the work done in a `for` loop inside a parallel region to be divided among threads.|
2121
|[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.|
2323

24-
For master and synchronization:
24+
For main thread and synchronization:
2525

2626
|Directive|Description|
2727
|---------|-----------|
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.|
2929
|[critical](#critical)|Specifies that code is only executed on one thread at a time.|
3030
|[barrier](#barrier)|Synchronizes all threads in a team; all threads pause at the barrier, until all threads execute the barrier.|
3131
|[atomic](#atomic)|Specifies that a memory location that will be updated atomically.|
@@ -356,7 +356,7 @@ The sum of 1 through 10 is 55
356356

357357
## <a name="master"></a> master
358358

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.
360360

361361
```cpp
362362
#pragma omp master
@@ -371,12 +371,11 @@ The `master` directive supports no clauses.
371371

372372
For more information, see [2.6.1 master construct](../2-directives.md#261-master-construct).
373373

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.
375375

376376
### Example
377377

378378
```cpp
379-
// omp_master.cpp
380379
// compile with: /openmp
381380
#include <omp.h>
382381
#include <stdio.h>
@@ -606,7 +605,7 @@ Hello from thread 0
606605

607606
## <a name="single"></a> single
608607

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.
610609

611610
```cpp
612611
#pragma omp single [clauses]
@@ -631,7 +630,7 @@ The `single` directive supports the following clauses:
631630

632631
For more information, see [2.4.3 single construct](../2-directives.md#243-single-construct).
633632

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.
635634

636635
### Example
637636

0 commit comments

Comments
 (0)