@@ -54,25 +54,28 @@ For a brief revision history, see `Changes.log` in the repo.
54
54
* Insert the code in the sources directory for each chapter, and include the following metadata:
55
55
* Metadata Tags for example sources:
56
56
```
57
- @@name: <ename>.<seq-no>[c|cpp|f|f90]
57
+ @@name: <ename>.<seq-no>
58
58
@@type: C|C++|F-fixed|F-free
59
+ @@requires: preprocessing
59
60
@@compilable: yes|no|maybe
60
61
@@linkable: yes|no|maybe
61
- @@expect: success|failure|nothing|rt -error
62
+ @@expect: success|compile-time-error|runtime -error|undefined-behavior
62
63
@@version: omp_<verno>
63
64
```
64
65
* **name**
65
66
is the name of an example
66
67
* **type**
67
- is the source code type, which can be translated into or from proper file extension (c,cpp,f,f90)
68
+ is the source code type, which can be translated into or from proper file extension (C:c,C++:cpp,F-fixed:f,F-free:f90)
69
+ * **requires**
70
+ any additional requirements, currently `preprocessing` for requiring preprocessing
68
71
* **compilable**
69
72
indicates whether the source code is compilable
70
73
* **linkable**
71
74
indicates whether the source code is linkable
72
75
* **expect**
73
- indicates some expected result for testing purpose "`success|failure|nothing `" applies
74
- to the result of code compilation "`rt-error`" is for a case where compilation may be
75
- successful, but the code contains potential runtime issues (such as race condition).
76
+ indicates some expected result for testing purpose "`success|compile-time-error|ct-error `" applies
77
+ to the result of code compilation; "`runtime-error| rt-error`" is for a case where compilation may be
78
+ successful, but the code contains potential runtime issues (such as race condition); `undefined-behavior` could result from a non-conforming code .
76
79
Alternative would be to just use "`conforming`" or "`non-conforming`".
77
80
* **version**
78
81
indicates features for a specific OpenMP version, such as "`omp_5.0`"
@@ -94,23 +97,30 @@ For a brief revision history, see `Changes.log` in the repo.
94
97
95
98
96
99
97
- # LaTeX macros for examples
100
+ ## LaTeX macros for examples
98
101
102
+ The following describes LaTeX macros defined specifically for examples.
99
103
* Source code with language h-rules
104
+ * Source code without language h-rules
105
+ * Language h-rules
106
+ * Other macros
107
+ * See `openmp.sty` for more information
108
+
109
+ ### Source code with language h-rules
100
110
```
101
- \cexample[ <verno >] {<ename >}{<seq-no >} % for C/C++ examples
102
- \cppexample[ <verno >] {<ename >}{<seq-no >} % for C++ examples
103
- \fexample[ <verno >] {<ename >}{<seq-no >} % for fixed-form Fortran examples
104
- \ffreeexample[ <verno >] {<ename >}{<seq-no >} % for free-form Fortran examples
111
+ \cexample[ <verno >] {<ename >}{<seq-no >}[ < s > ] % for C/C++ examples
112
+ \cppexample[ <verno >] {<ename >}{<seq-no >}[ < s > ] % for C++ examples
113
+ \fexample[ <verno >] {<ename >}{<seq-no >}[ < s > ] % for fixed-form Fortran examples
114
+ \ffreeexample[ <verno >] {<ename >}{<seq-no >}[ < s > ] % for free-form Fortran examples
105
115
```
106
116
107
- * Source code without language h-rules
117
+ ### Source code without language h-rules
108
118
```
109
- \cnexample[ <verno >] {<ename >}{<seq-no >}
110
- \cppnexample[ <verno >] {<ename >}{<seq-no >}
111
- \fnexample[ <verno >] {<ename >}{<seq-no >}
112
- \ffreenexample[ <verno >] {<ename >}{<seq-no >}
113
- \srcnexample[ <verno >] {<ename >}{<seq-no >}{<ext >}
119
+ \cnexample[ <verno >] {<ename >}{<seq-no >}[ < s > ]
120
+ \cppnexample[ <verno >] {<ename >}{<seq-no >}[ < s > ]
121
+ \fnexample[ <verno >] {<ename >}{<seq-no >}[ < s > ]
122
+ \ffreenexample[ <verno >] {<ename >}{<seq-no >}[ < s > ]
123
+ \srcnexample[ <verno >] {<ename >}{<seq-no >}{<ext >}[ < s > ]
114
124
```
115
125
116
126
Optional `<verno>` can be supplied in a macro to include a specific OpenMP
@@ -123,17 +133,23 @@ For a brief revision history, see `Changes.log` in the repo.
123
133
source code should not contain any `@@` metadata tags. The `ext` argument
124
134
to this macro is the file extension (such as `h`, `hpp`, `inc`).
125
135
126
- * Language h-rules
136
+ The `<s>` option to each macro allows finer-control of any additional lines
137
+ to be skipped due to addition of new `@@` tags, such as `@@requires`.
138
+ The default value for `<s>` is 0.
139
+
140
+ ### Language h-rules
127
141
```
128
142
\cspecificstart, \cspecificend
129
143
\cppspecificstart, \cppspecificend
130
144
\ccppspecificstart, \ccppspecificend
131
145
\fortranspecificstart, \fortranspecificend
132
146
```
133
147
134
- * Chapter and section macros
148
+ ### Other macros
135
149
```
136
150
\cchapter{<Chapter Name >}{<chap_directory>}
151
+ \hexentry[ ext1] {<example_name>}[ ext2] {<earlier_tag>}
152
+ \hexmentry[ ext1] {<example_name>}[ ext2] {<earlier_tag>}{<prior_name>}
137
153
```
138
154
139
155
The `\cchapter` macro is used for starting a chapter with proper page spacing.
@@ -146,8 +162,15 @@ A previously-defined macro `\sinput{<section_file>}` to import a section
146
162
file from `<chap_directory>` is no longer supported. Please use
147
163
`\input{<chap_directory>/<section_file>}` explicitly.
148
164
149
- * See `openmp.sty` for more information
165
+ The two macros `\hexentry` and `\hexmentry` are defined for simplifying
166
+ entries in the feature deprecation and update tables. Option `[ext1]` is
167
+ the file extension with a default value of `c` and option `[ext2]` is
168
+ the file extension for the associated second file if present.
169
+ `<earlier_tag>` is the version tag of the corresponding example
170
+ in the earlier version. `\hexentry` assumes no name change for an example
171
+ in different versions; `\hexmentry` can be used to specify a prior name
172
+ if it is different.
150
173
151
- ### License
174
+ ## License
152
175
153
176
For copyright information, please see `omp_copyright.txt`.
0 commit comments