Skip to content

Commit 382e247

Browse files
authored
Merge pull request #1679 from MicrosoftDocs/master
1/28/2019 AM Publish
2 parents 774db6a + 498861b commit 382e247

43 files changed

Lines changed: 1188 additions & 1262 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.openpublishing.redirection.json‎

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10404,6 +10404,161 @@
1040410404
"source_path": "docs/parallel/openmp/3-3-2-omp-get-wtick-function.md",
1040510405
"redirect_url": "/cpp/parallel/openmp/3-run-time-library-functions#332-omp_get_wtick-function",
1040610406
"redirect_document_id": false
10407+
},
10408+
{
10409+
"source_path": "docs/parallel/openmp/a-1-executing-a-simple-loop-in-parallel.md",
10410+
"redirect_url": "/cpp/parallel/openmp/a-examples#a1-a-simple-loop-in-parallel",
10411+
"redirect_document_id": false
10412+
},
10413+
{
10414+
"source_path": "docs/parallel/openmp/a-2-specifying-conditional-compilation.md",
10415+
"redirect_url": "/cpp/parallel/openmp/a-examples#a2-conditional-compilation",
10416+
"redirect_document_id": false
10417+
},
10418+
{
10419+
"source_path": "docs/parallel/openmp/a-3-using-parallel-regions.md",
10420+
"redirect_url": "/cpp/parallel/openmp/a-examples#a3-parallel-regions",
10421+
"redirect_document_id": false
10422+
},
10423+
{
10424+
"source_path": "docs/parallel/openmp/a-4-using-the-nowait-clause.md",
10425+
"redirect_url": "/cpp/parallel/openmp/a-examples#a4-the-nowait-clause",
10426+
"redirect_document_id": false
10427+
},
10428+
{
10429+
"source_path": "docs/parallel/openmp/a-5-using-the-critical-directive.md",
10430+
"redirect_url": "/cpp/parallel/openmp/a-examples#a5-the-critical-directive",
10431+
"redirect_document_id": false
10432+
},
10433+
{
10434+
"source_path": "docs/parallel/openmp/a-6-using-the-lastprivate-clause.md",
10435+
"redirect_url": "/cpp/parallel/openmp/a-examples#a6-the-lastprivate-clause",
10436+
"redirect_document_id": false
10437+
},
10438+
{
10439+
"source_path": "docs/parallel/openmp/a-7-using-the-reduction-clause.md",
10440+
"redirect_url": "/cpp/parallel/openmp/a-examples#a7-the-reduction-clause",
10441+
"redirect_document_id": false
10442+
},
10443+
{
10444+
"source_path": "docs/parallel/openmp/a-8-specifying-parallel-sections.md",
10445+
"redirect_url": "/cpp/parallel/openmp/a-examples#a8-parallel-sections",
10446+
"redirect_document_id": false
10447+
},
10448+
{
10449+
"source_path": "docs/parallel/openmp/a-9-using-single-directives.md",
10450+
"redirect_url": "/cpp/parallel/openmp/a-examples#a9-single-directives",
10451+
"redirect_document_id": false
10452+
},
10453+
{
10454+
"source_path": "docs/parallel/openmp/a-10-specifying-sequential-ordering.md",
10455+
"redirect_url": "/cpp/parallel/openmp/a-examples#a10-sequential-ordering",
10456+
"redirect_document_id": false
10457+
},
10458+
{
10459+
"source_path": "docs/parallel/openmp/a-11-specifying-a-fixed-number-of-threads.md",
10460+
"redirect_url": "/cpp/parallel/openmp/a-examples#a11-a-fixed-number-of-threads",
10461+
"redirect_document_id": false
10462+
},
10463+
{
10464+
"source_path": "docs/parallel/openmp/a-12-using-the-atomic-directive.md",
10465+
"redirect_url": "/cpp/parallel/openmp/a-examples#a12-the-atomic-directive",
10466+
"redirect_document_id": false
10467+
},
10468+
{
10469+
"source_path": "docs/parallel/openmp/a-13-using-the-flush-directive-with-a-list.md",
10470+
"redirect_url": "/cpp/parallel/openmp/a-examples#a13-a-flush-directive-with-a-list",
10471+
"redirect_document_id": false
10472+
},
10473+
{
10474+
"source_path": "docs/parallel/openmp/a-14-using-the-flush-directive-without-a-list.md",
10475+
"redirect_url": "/cpp/parallel/openmp/a-examples#a14-a-flush-directive-without-a-list",
10476+
"redirect_document_id": false
10477+
},
10478+
{
10479+
"source_path": "docs/parallel/openmp/a-15-determining-the-number-of-threads-used.md",
10480+
"redirect_url": "/cpp/parallel/openmp/a-examples#a15-the-number-of-threads-used",
10481+
"redirect_document_id": false
10482+
},
10483+
{
10484+
"source_path": "docs/parallel/openmp/a-16-using-locks.md",
10485+
"redirect_url": "/cpp/parallel/openmp/a-examples#a16-locks",
10486+
"redirect_document_id": false
10487+
},
10488+
{
10489+
"source_path": "docs/parallel/openmp/a-17-using-nestable-locks.md",
10490+
"redirect_url": "/cpp/parallel/openmp/a-examples#a17-nestable-locks",
10491+
"redirect_document_id": false
10492+
},
10493+
{
10494+
"source_path": "docs/parallel/openmp/a-18-nested-for-directives.md",
10495+
"redirect_url": "/cpp/parallel/openmp/a-examples#a18-nested-for-directives",
10496+
"redirect_document_id": false
10497+
},
10498+
{
10499+
"source_path": "docs/parallel/openmp/a-19-examples-showing-incorrect-nesting-of-work-sharing-directives.md",
10500+
"redirect_url": "/cpp/parallel/openmp/a-examples#a19-examples-showing-incorrect-nesting-of-work-sharing-directives",
10501+
"redirect_document_id": false
10502+
},
10503+
{
10504+
"source_path": "docs/parallel/openmp/a-20-binding-of-barrier-directives.md",
10505+
"redirect_url": "/cpp/parallel/openmp/a-examples#a20-bind-barrier-directives",
10506+
"redirect_document_id": false
10507+
},
10508+
{
10509+
"source_path": "docs/parallel/openmp/a-21-scoping-variables-with-the-private-clause.md",
10510+
"redirect_url": "/cpp/parallel/openmp/a-examples#a21-scope-variables-with-the-private-clause",
10511+
"redirect_document_id": false
10512+
},
10513+
{
10514+
"source_path": "docs/parallel/openmp/a-22-using-the-default-none-clause.md",
10515+
"redirect_url": "/cpp/parallel/openmp/a-examples#a22-the-defaultnone-clause",
10516+
"redirect_document_id": false
10517+
},
10518+
{
10519+
"source_path": "docs/parallel/openmp/a-23-examples-of-the-ordered-directive.md",
10520+
"redirect_url": "/cpp/parallel/openmp/a-examples#a23-examples-of-the-ordered-directive",
10521+
"redirect_document_id": false
10522+
},
10523+
{
10524+
"source_path": "docs/parallel/openmp/a-24-example-of-the-private-clause.md",
10525+
"redirect_url": "/cpp/parallel/openmp/a-examples#a24-example-of-the-private-clause",
10526+
"redirect_document_id": false
10527+
},
10528+
{
10529+
"source_path": "docs/parallel/openmp/a-25-examples-of-the-copyprivate-data-attribute-clause.md",
10530+
"redirect_url": "/cpp/parallel/openmp/a-examples#a25-examples-of-the-copyprivate-data-attribute-clause",
10531+
"redirect_document_id": false
10532+
},
10533+
{
10534+
"source_path": "docs/parallel/openmp/a-26-using-the-threadprivate-directive.md",
10535+
"redirect_url": "/cpp/parallel/openmp/a-examples#a26-the-threadprivate-directive",
10536+
"redirect_document_id": false
10537+
},
10538+
{
10539+
"source_path": "docs/parallel/openmp/a-27-use-of-c99-variable-length-arrays.md",
10540+
"redirect_url": "/cpp/parallel/openmp/a-examples#a27-c99-variable-length-arrays",
10541+
"redirect_document_id": false
10542+
},
10543+
{
10544+
"source_path": "docs/parallel/openmp/a-28-use-of-num-threads-clause.md",
10545+
"redirect_url": "/cpp/parallel/openmp/a-examples#a28-the-num_threads-clause",
10546+
"redirect_document_id": false
10547+
},
10548+
{
10549+
"source_path": "docs/parallel/openmp/a-29-use-of-work-sharing-constructs-inside-a-critical-construct.md",
10550+
"redirect_url": "/cpp/parallel/openmp/a-examples#a29-work-sharing-constructs-inside-a-critical-construct",
10551+
"redirect_document_id": false
10552+
},
10553+
{
10554+
"source_path": "docs/parallel/openmp/a-30-use-of-reprivatization.md",
10555+
"redirect_url": "/cpp/parallel/openmp/a-examples#a30-reprivatization",
10556+
"redirect_document_id": false
10557+
},
10558+
{
10559+
"source_path": "docs/parallel/openmp/a-31-thread-safe-lock-functions.md",
10560+
"redirect_url": "/cpp/parallel/openmp/a-examples#a31-thread-safe-lock-functions",
10561+
"redirect_document_id": false
1040710562
}
1040810563
]
1040910564
}

‎docs/parallel/openmp/1-introduction.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The following terms are used in this document:
2525

2626
- construct
2727

28-
A construct is a statement. It consists of a directive, followed by a structured block. Some directives aren't part of a construct. (See *openmp-directive* in [Appendix C](c-openmp-c-and-cpp-grammar.md)).
28+
A construct is a statement. It consists of a directive, followed by a structured block. Some directives aren't part of a construct. (See *openmp-directive* in [appendix C](c-openmp-c-and-cpp-grammar.md)).
2929

3030
- directive
3131

@@ -111,7 +111,7 @@ The OpenMP C and C++ API is an extension to the base language that's supported b
111111

112112
All standard C and C++ library functions and built-in functions (that is, functions of which the compiler has specific knowledge) must be thread-safe. Unsynchronized use of thread-safe functions by different threads inside a parallel region doesn't produce undefined behavior. However, the behavior might not be the same as in a serial region. (A random number generation function is an example.)
113113

114-
The OpenMP C/C++ API specifies that certain behavior is *implementation-defined.* A conforming OpenMP implementation is required to define and document its behavior in these cases. For a list of implementation-defined behaviors, see [Appendix E](e-implementation-defined-behaviors-in-openmp-c-cpp.md).
114+
The OpenMP C/C++ API specifies that certain behavior is *implementation-defined.* A conforming OpenMP implementation is required to define and document its behavior in these cases. For a list of implementation-defined behaviors, see [appendix E](e-implementation-defined-behaviors-in-openmp-c-cpp.md).
115115

116116
## 1.5 Normative references
117117

@@ -128,4 +128,4 @@ Where this OpenMP API specification refers to C, reference is made to the base l
128128
- [Run-time library functions](3-run-time-library-functions.md)
129129
- [Environment variables](4-environment-variables.md)
130130
- [Implementation-defined behaviors in OpenMP C/C++](e-implementation-defined-behaviors-in-openmp-c-cpp.md)
131-
- [New features in OpenMP C/C++ Version 2.0](f-new-features-and-clarifications-in-version-2-0.md)
131+
- [New features in OpenMP C/C++ version 2.0](f-new-features-and-clarifications-in-version-2-0.md)

‎docs/parallel/openmp/2-directives.md‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ Restrictions to the `parallel` directive are as follows:
105105
### Cross-references
106106

107107
- `private`, `firstprivate`, `default`, `shared`, `copyin`, and `reduction` clauses ([section 2.7.2](#272-data-sharing-attribute-clauses))
108-
- [OMP_NUM_THREADS](4-2-omp-num-threads.md) environment variable
109-
- [omp_set_dynamic](3-1-7-omp-set-dynamic-function.md) library function
110-
- [OMP_DYNAMIC](4-3-omp-dynamic.md) environment variable
111-
- [omp_set_nested](3-1-9-omp-set-nested-function.md) function
112-
- [OMP_NESTED](4-4-omp-nested.md) environment variable
113-
- [omp_set_num_threads](3-1-1-omp-set-num-threads-function.md) library function
108+
- [OMP_NUM_THREADS](4-environment-variables.md#42-omp_num_threads) environment variable
109+
- [omp_set_dynamic](3-run-time-library-functions.md#317-omp_set_dynamic-function) library function
110+
- [OMP_DYNAMIC](4-environment-variables.md#43-omp_dynamic) environment variable
111+
- [omp_set_nested](3-run-time-library-functions.md#319-omp_set_nested-function) function
112+
- [OMP_NESTED](4-environment-variables.md#44-omp_nested) environment variable
113+
- [omp_set_num_threads](3-run-time-library-functions.md#311-omp_set_num_threads-function) library function
114114

115115
## 2.4 Work-sharing constructs
116116

@@ -221,7 +221,7 @@ Restrictions to the `for` directive are as follows:
221221
#### Cross-references
222222

223223
- `private`, `firstprivate`, `lastprivate`, and `reduction` clauses ([section 2.7.2](#272-data-sharing-attribute-clauses))
224-
- [OMP_SCHEDULE](4-1-omp-schedule.md) environment variable
224+
- [OMP_SCHEDULE](4-environment-variables.md#41-omp_schedule) environment variable
225225
- [ordered](#266-ordered-construct) construct
226226
- [schedule](d-using-the-schedule-clause.md) clause
227227

@@ -514,7 +514,7 @@ Restrictions to the `ordered` directive are as follows:
514514

515515
This section presents a directive and several clauses for controlling the data environment during the execution of parallel regions, as follows:
516516

517-
- A `threadprivate` directive (see the following section) is provided to make file- scope, namespace-scope, or static block-scope variables local to a thread.
517+
- A [threadprivate](#271-threadprivate-directive) directive is provided to make file- scope, namespace-scope, or static block-scope variables local to a thread.
518518

519519
- Clauses that may be specified on the directives to control the sharing attributes of variables for the duration of the parallel or work-sharing constructs are described in [section 2.7.2](#272-data-sharing-attribute-clauses).
520520

@@ -576,8 +576,8 @@ void f(int n) {
576576
577577
#### Cross-references
578578
579-
- [dynamic threads](3-1-7-omp-set-dynamic-function.md)
580-
- [OMP_DYNAMIC](4-3-omp-dynamic.md) environment variable
579+
- [dynamic threads](3-run-time-library-functions.md#317-omp_set_dynamic-function)
580+
- [OMP_DYNAMIC](4-environment-variables.md#43-omp_dynamic) environment variable
581581
582582
### 2.7.2 Data-sharing attribute clauses
583583

‎docs/parallel/openmp/3-run-time-library-functions.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The `omp_set_num_threads` function sets the default number of threads to use for
4343
void omp_set_num_threads(int num_threads);
4444
```
4545
46-
The value of the parameter *num_threads* must be a positive integer. Its effect depends upon whether dynamic adjustment of the number of threads is enabled. For a comprehensive set of rules about the interaction between the `omp_set_num_threads` function and dynamic adjustment of threads, see Section 2.3.
46+
The value of the parameter *num_threads* must be a positive integer. Its effect depends upon whether dynamic adjustment of the number of threads is enabled. For a comprehensive set of rules about the interaction between the `omp_set_num_threads` function and dynamic adjustment of threads, see [section 2.3](2-directives.md#23-parallel-construct).
4747
4848
This function has the effects described above when called from a portion of the program where the `omp_in_parallel` function returns zero. If it's called from a portion of the program where the `omp_in_parallel` function returns a nonzero value, the behavior of this function is undefined.
4949
@@ -54,7 +54,7 @@ This call has precedence over the `OMP_NUM_THREADS` environment variable. The de
5454
- [omp_set_dynamic](#317-omp_set_dynamic-function) function
5555
- [omp_get_dynamic](#318-omp_get_dynamic-function) function
5656
- [OMP_NUM_THREADS](4-environment-variables.md#42-omp_num_threads) environment variable
57-
- [num_threads](2-3-parallel-construct.md) clause
57+
- [num_threads](2-directives.md#23-parallel-construct) clause
5858
5959
### 3.1.2 omp_get_num_threads function
6060
@@ -72,8 +72,8 @@ If the number of threads hasn't been explicitly set by the user, the default is
7272
#### Cross-references
7373

7474
- [OMP_NUM_THREADS](4-environment-variables.md#42-omp_num_threads)
75-
- [num_threads](2-3-parallel-construct.md)
76-
- [parallel](2-3-parallel-construct.md)
75+
- [num_threads](2-directives.md#23-parallel-construct)
76+
- [parallel](2-directives.md#23-parallel-construct)
7777

7878
### 3.1.3 omp_get_max_threads function
7979

@@ -101,7 +101,7 @@ The `omp_get_max_threads` function's return value can be used to dynamically all
101101
- [omp_get_num_threads](#312-omp_get_num_threads-function)
102102
- [omp_set_num_threads](#311-omp_set_num_threads-function)
103103
- [omp_set_dynamic](#317-omp_set_dynamic-function)
104-
- [num_threads](2-3-parallel-construct.md)
104+
- [num_threads](2-directives.md#23-parallel-construct)
105105
106106
### 3.1.4 omp_get_thread_num function
107107

‎docs/parallel/openmp/4-environment-variables.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ setenv OMP_SCHEDULE "dynamic"
4040

4141
### Cross-references
4242

43-
- [for](2-4-1-for-construct.md) directive
44-
- [parallel for](2-5-1-parallel-for-construct.md) directive
43+
- [for](2-directives.md#241-for-construct) directive
44+
- [parallel for](2-directives.md#251-parallel-for-construct) directive
4545

4646
## 4.2 OMP_NUM_THREADS
4747

4848
The `OMP_NUM_THREADS` environment variable sets the default number of threads to use during execution. `OMP_NUM_THREADS` is ignored if that number is explicitly changed by calling the `omp_set_num_threads` library routine. It's also ignored if there's an explicit `num_threads` clause on a `parallel` directive.
4949

50-
The value of the `OMP_NUM_THREADS` environment variable must be a positive integer. Its effect depends upon whether dynamic adjustment of the number of threads is enabled. For a comprehensive set of rules about the interaction between the `OMP_NUM_THREADS` environment variable and dynamic adjustment of threads, see Section 2.3.
50+
The value of the `OMP_NUM_THREADS` environment variable must be a positive integer. Its effect depends upon whether dynamic adjustment of the number of threads is enabled. For a comprehensive set of rules about the interaction between the `OMP_NUM_THREADS` environment variable and dynamic adjustment of threads, see [section 2.3](2-directives.md#23-parallel-construct).
5151

5252
The number of threads to use is implementation-defined if:
5353

@@ -63,9 +63,9 @@ setenv OMP_NUM_THREADS 16
6363

6464
### Cross-references
6565

66-
- [num_threads](2-3-parallel-construct.md) clause
67-
- [omp_set_num_threads](3-1-1-omp-set-num-threads-function.md) function
68-
- [omp_set_dynamic](3-1-7-omp-set-dynamic-function.md) function
66+
- [num_threads](2-directives.md#23-parallel-construct) clause
67+
- [omp_set_num_threads](3-run-time-library-functions.md#311-omp_set_num_threads-function) function
68+
- [omp_set_dynamic](3-run-time-library-functions.md#317-omp_set_dynamic-function) function
6969

7070
## 4.3 OMP_DYNAMIC
7171

@@ -81,8 +81,8 @@ setenv OMP_DYNAMIC TRUE
8181

8282
### Cross-references
8383

84-
- [Parallel regions](2-3-parallel-construct.md)
85-
- [omp_set_dynamic](3-1-7-omp-set-dynamic-function.md) function
84+
- [Parallel regions](2-directives.md#23-parallel-construct)
85+
- [omp_set_dynamic](3-run-time-library-functions.md#317-omp_set_dynamic-function) function
8686

8787
## 4.4 OMP_NESTED
8888

@@ -96,4 +96,4 @@ setenv OMP_NESTED TRUE
9696

9797
### Cross-reference
9898

99-
- [omp_set_nested](3-1-9-omp-set-nested-function.md) function
99+
- [omp_set_nested](3-run-time-library-functions.md#319-omp_set_nested-function) function

0 commit comments

Comments
 (0)