forked from OpenMP/Examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenmp-examples.tex
More file actions
196 lines (171 loc) · 6.49 KB
/
openmp-examples.tex
File metadata and controls
196 lines (171 loc) · 6.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
% Welcome to openmp-examples.tex.
% This is the master LaTex file for the OpenMP Examples document.
%
% The files in this set include:
%
% openmp-examples.tex - this file, the master file
% Makefile - makes the document
% openmp.sty - the main style file
% Title_Page.tex - the title page
% openmplogo.png - the logo
% Introduction_Chapt.tex - unnumbered introductory chapter
% Examples_Chapt.tex - unnumbered chapter
% Examples_Sects.tex - examples
% sources/*.c, *.f - C/C++/Fortran example source files
%
% When editing this file:
%
% 1. To change formatting, appearance, or style, please edit openmp.sty.
%
% 2. Custom commands and macros are defined in openmp.sty.
%
% 3. Be kind to other editors -- keep a consistent style by copying-and-pasting to
% create new content.
%
% 4. We use semantic markup, e.g. (see openmp.sty for a full list):
% \code{} % for bold monospace keywords, code, operators, etc.
% \plc{} % for italic placeholder names, grammar, etc.
%
% 5. Other recommendations:
% Use the convenience macros defined in openmp.sty for the minor headers
% such as Comments, Syntax, etc.
%
% To keep items together on the same page, prefer the use of
% \begin{samepage}.... Avoid \parbox for text blocks as it interrupts line numbering.
% When possible, avoid \filbreak, \pagebreak, \newpage, \clearpage unless that's
% what you mean. Use \needspace{} cautiously for troublesome paragraphs.
%
% Avoid absolute lengths and measures in this file; use relative units when possible.
% Vertical space can be relative to \baselineskip or ex units. Horizontal space
% can be relative to \linewidth or em units.
%
% Prefer \emph{} to italicize terminology, e.g.:
% This is a \emph{definition}, not a placeholder.
% This is a \plc{var-name}.
%
% The following says letter size, but the style sheet may change the size
\documentclass[10pt,letterpaper,twoside,makeidx,hidelinks]{scrreprt}
% Text to appear in the footer on even-numbered pages:
\newcommand{\VER}{4.5.0}
\newcommand{\VERDATE}{November 2016}
\newcommand{\footerText}{OpenMP Examples Version \VER{} - \VERDATE}
% Unified style sheet for OpenMP documents:
\input{openmp.sty}
\begin{document}
\pagenumbering{roman}
\input{Title_Page}
\setcounter{page}{0}
\setcounter{tocdepth}{2}
\begin{spacing}{1.3}
\tableofcontents
\end{spacing}
% Uncomment the next line to enable line numbering on the main body text:
\linenumbers\pagewiselinenumbers
\newpage\pagenumbering{arabic}
\input{Introduction_Chapt}
\input{Examples_Chapt}
\setcounter{chapter}{0} % start chapter numbering here
\input{Chap_parallel_execution}
\input{Examples_ploop}
\input{Examples_parallel}
\input{Examples_nthrs_nesting}
\input{Examples_nthrs_dynamic}
\input{Examples_fort_do}
\input{Examples_nowait}
\input{Examples_collapse}
% linear Clause 475
\input{Examples_linear_in_loop}
\input{Examples_psections}
\input{Examples_fpriv_sections}
\input{Examples_single}
\input{Examples_workshare}
\input{Examples_master}
\input{Examples_pra_iterator}
\input{Examples_set_dynamic_nthrs}
\input{Examples_get_nthrs}
\input{Chap_affinity}
\input{Examples_affinity}
\input{Examples_affinity_query}
\input{Chap_tasking}
\input{Examples_tasking}
\input{Examples_task_priority}
\input{Examples_task_dep}
\input{Examples_taskgroup}
\input{Examples_taskyield}
\input{Examples_taskloop}
\input{Chap_devices}
\input{Examples_target}
\input{Examples_target_data}
\input{Examples_target_unstructured_data}
\input{Examples_target_update}
\input{Examples_declare_target}
% Link clause 474
\input{Examples_teams}
\input{Examples_async_target_depend}
\input{Examples_async_target_with_tasks}
%Title change of 57.1 and 57.2
%New subsection
\input{Examples_async_target_nowait}
\input{Examples_async_target_nowait_depend}
\input{Examples_array_sections}
% Structure Element in map 487
\input{Examples_device}
% MemoryRoutine and Device ptr 473
\input{Chap_SIMD}
\input{Examples_SIMD}
% Forward Depend 370
% simdlen 476
% simd linear modifier 480
\input{Chap_synchronization}
\input{Examples_critical}
\input{Examples_worksharing_critical}
\input{Examples_barrier_regions}
\input{Examples_atomic}
\input{Examples_atomic_restrict}
\input{Examples_flush_nolist}
\input{Examples_ordered}
% Doacross loop 405
\input{Examples_doacross}
\input{Examples_locks}
\input{Examples_init_lock}
\input{Examples_init_lock_with_hint}
\input{Examples_lock_owner}
\input{Examples_simple_lock}
\input{Examples_nestable_lock}
% % LOCK with Hints 478
% % Hint Clause xxxxxx (included after init_lock)
% % Lock routines with hint
\input{Chap_data_environment}
\input{Examples_threadprivate}
\input{Examples_default_none}
\input{Examples_private}
\input{Examples_fort_loopvar}
\input{Examples_fort_sp_common}
\input{Examples_fort_sa_private}
\input{Examples_carrays_fpriv}
\input{Examples_lastprivate}
\input{Examples_reduction}
% User UDR 287
% C array reduction 377
\input{Examples_copyin}
\input{Examples_copyprivate}
\input{Examples_cpp_reference}
% Fortran 2003 features 482
\input{Examples_associate} %section--> subsection
\input{Chap_memory_model}
\input{Examples_mem_model}
\input{Examples_fort_race}
\input{Chap_program_control}
\input{Examples_cond_comp}
\input{Examples_icv}
% If multi-ifs 471
\input{Examples_standalone}
\input{Examples_cancellation}
% New Section Nested Regions
\input{Examples_nested_loop}
\input{Examples_nesting_restrict}
\setcounter{chapter}{0} % restart chapter numbering with "letter A"
\renewcommand{\thechapter}{\Alph{chapter}}%
\appendix
\input{History}
\end{document}