1
- \pagebreak
2
- \chapter {Parallel Execution }
1
+ \cchapter {Parallel Execution}{parallel_execution}
3
2
\label {chap:parallel_execution }
4
3
5
4
A single thread, the \plc {initial thread}, begins sequential execution of
@@ -10,7 +9,7 @@ \chapter{Parallel Execution}
10
9
forming a parallel region. An \plc {initial thread} encountering a \code {parallel}
11
10
region forks (creates) a team of threads at the beginning of the
12
11
\code {parallel} region, and joins them (removes from execution) at the
13
- end of the region. The initial thread becomes the master thread of the team in a
12
+ end of the region. The initial thread becomes the primary thread of the team in a
14
13
\code {parallel} region with a \plc {thread} number equal to zero, the other
15
14
threads are numbered from 1 to number of threads minus 1.
16
15
A team may be comprised of just a single thread.
@@ -19,9 +18,9 @@ \chapter{Parallel Execution}
19
18
parallel region. The task that creates a parallel region is suspended while the
20
19
tasks of the team are executed. A thread is tied to its task; that is,
21
20
only the thread assigned to the task can execute that task. After completion
22
- of the \code {parallel} region, the master thread resumes execution of the generating task.
21
+ of the \code {parallel} region, the primary thread resumes execution of the generating task.
23
22
24
- % After the \code{parallel} region the master thread becomes the initial
23
+ % After the \code{parallel} region the primary thread becomes the initial
25
24
% thread again, and continues to execute the \plc{sequential part}.
26
25
27
26
Any task within a \code {parallel} region is allowed to encounter another
@@ -43,7 +42,8 @@ \chapter{Parallel Execution}
43
42
the number of threads becomes an upper limit for the number of threads to be
44
43
provided by the OpenMP runtime.
45
44
46
- \pagebreak
45
+ % \pagebreak
46
+ \bigskip
47
47
WORKSHARING CONSTRUCTS
48
48
49
49
A worksharing construct distributes the execution of the associated region
@@ -96,9 +96,33 @@ \chapter{Parallel Execution}
96
96
by threads of the team.
97
97
98
98
\bigskip
99
- MASTER CONSTRUCT
99
+ MASKED CONSTRUCT
100
+
101
+ The \code {masked} construct is not a worksharing construct. The \code {masked} region is
102
+ executed only by the primary thread. There is no implicit barrier (and flush)
103
+ at the end of the \code {masked} region; hence the other threads of the team continue
104
+ execution beyond code statements beyond the \code {masked} region.
105
+ The \code {master} contruct, which has been deprecated in OpenMP 5.1, has identical semantics
106
+ to the \code {masked} contruct with no \code {filter} clause.
107
+
108
+
109
+ % ===== Examples Sections =====
110
+ \input {parallel_execution/ploop }
111
+ \input {parallel_execution/parallel }
112
+ \input {parallel_execution/host_teams }
113
+ \input {parallel_execution/nthrs_nesting }
114
+ \input {parallel_execution/nthrs_dynamic }
115
+ \input {parallel_execution/fort_do }
116
+ \input {parallel_execution/nowait }
117
+ \input {parallel_execution/collapse }
118
+ \input {parallel_execution/linear_in_loop }
119
+ \input {parallel_execution/psections }
120
+ \input {parallel_execution/fpriv_sections }
121
+ \input {parallel_execution/single }
122
+ \input {parallel_execution/workshare }
123
+ \input {parallel_execution/masked }
124
+ \input {parallel_execution/loop }
125
+ \input {parallel_execution/pra_iterator }
126
+ \input {parallel_execution/set_dynamic_nthrs }
127
+ \input {parallel_execution/get_nthrs }
100
128
101
- The \code {master} construct is not a worksharing construct. The master region is
102
- is executed only by the master thread. There is no implicit barrier (and flush)
103
- at the end of the \code {master} region; hence the other threads of the team continue
104
- execution beyond code statements beyond the \code {master} region.
0 commit comments