xref: /llvm-project/clang/docs/OpenMPSupport.rst (revision ad38e24eb74e97148faec97c4f843b87768b6e9b)
1.. raw:: html
2
3  <style type="text/css">
4    .none { background-color: #FFCCCC }
5    .part { background-color: #FFFF99 }
6    .good { background-color: #CCFF99 }
7  </style>
8
9.. role:: none
10.. role:: part
11.. role:: good
12
13.. contents::
14   :local:
15
16==============
17OpenMP Support
18==============
19
20Clang fully supports OpenMP 4.5, almost all of 5.0 and most of 5.1/2.
21Clang supports offloading to X86_64, AArch64, PPC64[LE], NVIDIA GPUs (all models) and AMD GPUs (all models).
22
23In addition, the LLVM OpenMP runtime `libomp` supports the OpenMP Tools
24Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and macOS.
25OMPT is also supported for NVIDIA and AMD GPUs.
26
27For the list of supported features from OpenMP 5.0 and 5.1
28see `OpenMP implementation details`_ and `OpenMP 51 implementation details`_.
29
30General improvements
31====================
32- New collapse clause scheme to avoid expensive remainder operations.
33  Compute loop index variables after collapsing a loop nest via the
34  collapse clause by replacing the expensive remainder operation with
35  multiplications and additions.
36
37- When using the collapse clause on a loop nest the default behavior
38  is to automatically extend the representation of the loop counter to
39  64 bits for the cases where the sizes of the collapsed loops are not
40  known at compile time. To prevent this conservative choice and use
41  at most 32 bits, compile your program with the
42  `-fopenmp-optimistic-collapse`.
43
44
45GPU devices support
46===================
47
48Data-sharing modes
49------------------
50
51Clang supports two data-sharing models for Cuda devices: `Generic` and `Cuda`
52modes. The default mode is `Generic`. `Cuda` mode can give an additional
53performance and can be activated using the `-fopenmp-cuda-mode` flag. In
54`Generic` mode all local variables that can be shared in the parallel regions
55are stored in the global memory. In `Cuda` mode local variables are not shared
56between the threads and it is user responsibility to share the required data
57between the threads in the parallel regions. Often, the optimizer is able to
58reduce the cost of `Generic` mode to the level of `Cuda` mode, but the flag,
59as well as other assumption flags, can be used for tuning.
60
61Features not supported or with limited support for Cuda devices
62---------------------------------------------------------------
63
64- Cancellation constructs are not supported.
65
66- Doacross loop nest is not supported.
67
68- User-defined reductions are supported only for trivial types.
69
70- Nested parallelism: inner parallel regions are executed sequentially.
71
72- Debug information for OpenMP target regions is supported, but sometimes it may
73  be required to manually specify the address class of the inspected variables.
74  In some cases the local variables are actually allocated in the global memory,
75  but the debug info may be not aware of it.
76
77
78.. _OpenMP implementation details:
79
80OpenMP 5.0 Implementation Details
81=================================
82
83The following table provides a quick overview over various OpenMP 5.0 features
84and their implementation status. Please post on the
85`Discourse forums (Runtimes - OpenMP category)`_ for more
86information or if you want to help with the
87implementation.
88
89+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
90|Category                      | Feature                                                      | Status                   | Reviews                                                               |
91+==============================+==============================================================+==========================+=======================================================================+
92| loop                         | support != in the canonical loop form                        | :good:`done`             | D54441                                                                |
93+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
94| loop                         | #pragma omp loop (directive)                                 | :part:`partial`          | D145823 (combined forms)                                              |
95+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
96| loop                         | #pragma omp loop bind                                        | :part:`worked on`        | D144634 (needs review)                                                |
97+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
98| loop                         | collapse imperfectly nested loop                             | :good:`done`             |                                                                       |
99+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
100| loop                         | collapse non-rectangular nested loop                         | :good:`done`             |                                                                       |
101+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
102| loop                         | C++ range-base for loop                                      | :good:`done`             |                                                                       |
103+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
104| loop                         | clause: if for SIMD directives                               | :good:`done`             |                                                                       |
105+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
106| loop                         | inclusive scan (matching C++17 PSTL)                         | :good:`done`             |                                                                       |
107+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
108| memory management            | memory allocators                                            | :good:`done`             | r341687,r357929                                                       |
109+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
110| memory management            | allocate directive and allocate clause                       | :good:`done`             | r355614,r335952                                                       |
111+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
112| OMPD                         | OMPD interfaces                                              | :good:`done`             | https://reviews.llvm.org/D99914   (Supports only HOST(CPU) and Linux  |
113+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
114| OMPT                         | OMPT interfaces (callback support)                           | :good:`done`             |                                                                       |
115+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
116| thread affinity              | thread affinity                                              | :good:`done`             |                                                                       |
117+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
118| task                         | taskloop reduction                                           | :good:`done`             |                                                                       |
119+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
120| task                         | task affinity                                                | :part:`not upstream`     | https://github.com/jklinkenberg/openmp/tree/task-affinity             |
121+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
122| task                         | clause: depend on the taskwait construct                     | :good:`done`             | D113540 (regular codegen only)                                        |
123+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
124| task                         | depend objects and detachable tasks                          | :good:`done`             |                                                                       |
125+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
126| task                         | mutexinoutset dependence-type for tasks                      | :good:`done`             | D53380,D57576                                                         |
127+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
128| task                         | combined taskloop constructs                                 | :good:`done`             |                                                                       |
129+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
130| task                         | master taskloop                                              | :good:`done`             |                                                                       |
131+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
132| task                         | parallel master taskloop                                     | :good:`done`             |                                                                       |
133+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
134| task                         | master taskloop simd                                         | :good:`done`             |                                                                       |
135+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
136| task                         | parallel master taskloop simd                                | :good:`done`             |                                                                       |
137+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
138| SIMD                         | atomic and simd constructs inside SIMD code                  | :good:`done`             |                                                                       |
139+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
140| SIMD                         | SIMD nontemporal                                             | :good:`done`             |                                                                       |
141+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
142| device                       | infer target functions from initializers                     | :part:`worked on`        |                                                                       |
143+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
144| device                       | infer target variables from initializers                     | :good:`done`             | D146418                                                               |
145+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
146| device                       | OMP_TARGET_OFFLOAD environment variable                      | :good:`done`             | D50522                                                                |
147+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
148| device                       | support full 'defaultmap' functionality                      | :good:`done`             | D69204                                                                |
149+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
150| device                       | device specific functions                                    | :good:`done`             |                                                                       |
151+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
152| device                       | clause: device_type                                          | :good:`done`             |                                                                       |
153+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
154| device                       | clause: extended device                                      | :good:`done`             |                                                                       |
155+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
156| device                       | clause: uses_allocators clause                               | :good:`done`             |                                                                       |
157+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
158| device                       | clause: in_reduction                                         | :part:`worked on`        | r308768                                                               |
159+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
160| device                       | omp_get_device_num()                                         | :good:`done`             | D54342,D128347                                                        |
161+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
162| device                       | structure mapping of references                              | :none:`unclaimed`        |                                                                       |
163+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
164| device                       | nested target declare                                        | :good:`done`             | D51378                                                                |
165+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
166| device                       | implicitly map 'this' (this[:1])                             | :good:`done`             | D55982                                                                |
167+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
168| device                       | allow access to the reference count (omp_target_is_present)  | :good:`done`             |                                                                       |
169+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
170| device                       | requires directive                                           | :good:`done`             |                                                                       |
171+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
172| device                       | clause: unified_shared_memory                                | :good:`done`             | D52625,D52359                                                         |
173+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
174| device                       | clause: unified_address                                      | :part:`partial`          |                                                                       |
175+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
176| device                       | clause: reverse_offload                                      | :part:`partial`          | D52780,D155003                                                        |
177+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
178| device                       | clause: atomic_default_mem_order                             | :good:`done`             | D53513                                                                |
179+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
180| device                       | clause: dynamic_allocators                                   | :part:`unclaimed parts`  | D53079                                                                |
181+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
182| device                       | user-defined mappers                                         | :good:`done`             | D56326,D58638,D58523,D58074,D60972,D59474                             |
183+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
184| device                       | map array-section with implicit mapper                       | :good:`done`             |  https://github.com/llvm/llvm-project/pull/101101                     |
185+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
186| device                       | mapping lambda expression                                    | :good:`done`             | D51107                                                                |
187+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
188| device                       | clause: use_device_addr for target data                      | :good:`done`             |                                                                       |
189+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
190| device                       | support close modifier on map clause                         | :good:`done`             | D55719,D55892                                                         |
191+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
192| device                       | teams construct on the host device                           | :good:`done`             | r371553                                                               |
193+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
194| device                       | support non-contiguous array sections for target update      | :good:`done`             |                                                                       |
195+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
196| device                       | pointer attachment                                           | :good:`done`             |                                                                       |
197+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
198| atomic                       | hints for the atomic construct                               | :good:`done`             | D51233                                                                |
199+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
200| base language                | C11 support                                                  | :good:`done`             |                                                                       |
201+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
202| base language                | C++11/14/17 support                                          | :good:`done`             |                                                                       |
203+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
204| base language                | lambda support                                               | :good:`done`             |                                                                       |
205+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
206| misc                         | array shaping                                                | :good:`done`             | D74144                                                                |
207+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
208| misc                         | library shutdown (omp_pause_resource[_all])                  | :good:`done`             | D55078                                                                |
209+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
210| misc                         | metadirectives                                               | :part:`mostly done`      | D91944                                                                |
211+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
212| misc                         | conditional modifier for lastprivate clause                  | :good:`done`             |                                                                       |
213+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
214| misc                         | iterator and multidependences                                | :good:`done`             |                                                                       |
215+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
216| misc                         | depobj directive and depobj dependency kind                  | :good:`done`             |                                                                       |
217+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
218| misc                         | user-defined function variants                               | :good:`done`.            | D67294, D64095, D71847, D71830, D109635                               |
219+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
220| misc                         | pointer/reference to pointer based array reductions          | :good:`done`             |                                                                       |
221+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
222| misc                         | prevent new type definitions in clauses                      | :good:`done`             |                                                                       |
223+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
224| memory model                 | memory model update (seq_cst, acq_rel, release, acquire,...) | :good:`done`             |                                                                       |
225+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
226
227
228.. _OpenMP 51 implementation details:
229
230OpenMP 5.1 Implementation Details
231=================================
232
233The following table provides a quick overview over various OpenMP 5.1 features
234and their implementation status.
235Please post on the
236`Discourse forums (Runtimes - OpenMP category)`_ for more
237information or if you want to help with the
238implementation.
239
240+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
241|Category                      | Feature                                                      | Status                   | Reviews                                                               |
242+==============================+==============================================================+==========================+=======================================================================+
243| atomic                       | 'compare' clause on atomic construct                         | :good:`done`             | D120290, D120007, D118632, D120200, D116261, D118547, D116637         |
244+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
245| atomic                       | 'fail' clause on atomic construct                            | :part:`worked on`        | D123235 (in progress)                                                 |
246+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
247| base language                | C++ attribute specifier syntax                               | :good:`done`             | D105648                                                               |
248+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
249| device                       | 'present' map type modifier                                  | :good:`done`             | D83061, D83062, D84422                                                |
250+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
251| device                       | 'present' motion modifier                                    | :good:`done`             | D84711, D84712                                                        |
252+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
253| device                       | 'present' in defaultmap clause                               | :good:`done`             | D92427                                                                |
254+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
255| device                       | map clause reordering based on 'present' modifier            | :none:`unclaimed`        |                                                                       |
256+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
257| device                       | device-specific environment variables                        | :none:`unclaimed`        |                                                                       |
258+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
259| device                       | omp_target_is_accessible routine                             | :none:`unclaimed`        |                                                                       |
260+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
261| device                       | omp_get_mapped_ptr routine                                   | :good:`done`             | D141545                                                               |
262+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
263| device                       | new async target memory copy routines                        | :good:`done`             | D136103                                                               |
264+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
265| device                       | thread_limit clause on target construct                      | :part:`partial`          | D141540 (offload), D152054 (host, in progress)                        |
266+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
267| device                       | has_device_addr clause on target construct                   | :none:`unclaimed`        |                                                                       |
268+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
269| device                       | iterators in map clause or motion clauses                    | :none:`unclaimed`        |                                                                       |
270+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
271| device                       | indirect clause on declare target directive                  | :none:`unclaimed`        |                                                                       |
272+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
273| device                       | allow virtual functions calls for mapped object on device    | :part:`partial`          |                                                                       |
274+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
275| device                       | interop construct                                            | :part:`partial`          | parsing/sema done: D98558, D98834, D98815                             |
276+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
277| device                       | assorted routines for querying interoperable properties      | :part:`partial`          | D106674                                                               |
278+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
279| loop                         | Loop tiling transformation                                   | :good:`done`             | D76342                                                                |
280+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
281| loop                         | Loop unrolling transformation                                | :good:`done`             | D99459                                                                |
282+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
283| loop                         | 'reproducible'/'unconstrained' modifiers in 'order' clause   | :part:`partial`          | D127855                                                               |
284+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
285| memory management            | alignment for allocate directive and clause                  | :good:`done`             | D115683                                                               |
286+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
287| memory management            | 'allocator' modifier for allocate clause                     | :good:`done`             | https://github.com/llvm/llvm-project/pull/114883                      |
288+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
289| memory management            | 'align' modifier for allocate clause                         | :good:`done`             | https://github.com/llvm/llvm-project/pull/121814                      |
290+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
291| memory management            | new memory management routines                               | :none:`unclaimed`        |                                                                       |
292+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
293| memory management            | changes to omp_alloctrait_key enum                           | :none:`unclaimed`        |                                                                       |
294+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
295| memory model                 | seq_cst clause on flush construct                            | :good:`done`             | https://github.com/llvm/llvm-project/pull/114072                      |
296+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
297| misc                         | 'omp_all_memory' keyword and use in 'depend' clause          | :good:`done`             | D125828, D126321                                                      |
298+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
299| misc                         | error directive                                              | :good:`done`             | D139166                                                               |
300+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
301| misc                         | scope construct                                              | :good:`done`             | D157933, https://github.com/llvm/llvm-project/pull/109197             |
302+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
303| misc                         | routines for controlling and querying team regions           | :part:`partial`          | D95003 (libomp only)                                                  |
304+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
305| misc                         | changes to ompt_scope_endpoint_t enum                        | :none:`unclaimed`        |                                                                       |
306+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
307| misc                         | omp_display_env routine                                      | :good:`done`             | D74956                                                                |
308+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
309| misc                         | extended OMP_PLACES syntax                                   | :none:`unclaimed`        |                                                                       |
310+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
311| misc                         | OMP_NUM_TEAMS and OMP_TEAMS_THREAD_LIMIT env vars            | :good:`done`             | D138769                                                               |
312+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
313| misc                         | 'target_device' selector in context specifier                | :none:`worked on`        |                                                                       |
314+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
315| misc                         | begin/end declare variant                                    | :good:`done`             | D71179                                                                |
316+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
317| misc                         | dispatch construct and function variant argument adjustment  | :part:`worked on`        | D99537, D99679                                                        |
318+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
319| misc                         | assumes directives                                           | :part:`worked on`        |                                                                       |
320+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
321| misc                         | assume directive                                             | :good:`done`             |                                                                       |
322+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
323| misc                         | nothing directive                                            | :good:`done`             | D123286                                                               |
324+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
325| misc                         | masked construct and related combined constructs             | :good:`done`             | D99995, D100514, PR-121741(parallel_masked_taskloop)                  |
326|                              |                                                              |                          | PR-121746(parallel_masked_task_loop_simd),PR-121914(masked_taskloop)  |
327|                              |                                                              |                          | PR-121916(masked_taskloop_simd)                                       |
328+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
329| misc                         | default(firstprivate) & default(private)                     | :good:`done`             | D75591 (firstprivate), D125912 (private)                              |
330+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
331| other                        | deprecating master construct                                 | :none:`unclaimed`        |                                                                       |
332+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
333| OMPT                         | new barrier types added to ompt_sync_region_t enum           | :none:`unclaimed`        |                                                                       |
334+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
335| OMPT                         | async data transfers added to ompt_target_data_op_t enum     | :none:`unclaimed`        |                                                                       |
336+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
337| OMPT                         | new barrier state values added to ompt_state_t enum          | :none:`unclaimed`        |                                                                       |
338+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
339| OMPT                         | new 'emi' callbacks for external monitoring interfaces       | :good:`done`             |                                                                       |
340+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
341| OMPT                         | device tracing interface                                     | :none:`unclaimed`        |                                                                       |
342+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
343| task                         | 'strict' modifier for taskloop construct                     | :none:`unclaimed`        |                                                                       |
344+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
345| task                         | inoutset in depend clause                                    | :good:`done`             | D97085, D118383                                                       |
346+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
347| task                         | nowait clause on taskwait                                    | :part:`partial`          | parsing/sema done: D131830, D141531                                   |
348+------------------------------+--------------------------------------------------------------+--------------------------+-----------------------------------------------------------------------+
349
350
351.. _OpenMP 6.0 implementation details:
352
353OpenMP 6.0 Implementation Details
354=================================
355
356The following table provides a quick overview over various OpenMP 6.0 features
357and their implementation status. Please post on the
358`Discourse forums (Runtimes - OpenMP category)`_ for more
359information or if you want to help with the
360implementation.
361
362+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
363|Feature                                                      | C/C++ Status              |  Fortran Status           | Reviews                                                                  |
364+=============================================================+===========================+===========================+==========================================================================+
365| free-agent threads                                          | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
366+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
367| Recording of task graphs                                    | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
368+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
369| Parallel inductions                                         | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
370+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
371| init_complete for scan directive                            | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
372+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
373| Loop transformation constructs                              | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
374+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
375| work distribute construct                                   | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
376+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
377| task_iteration                                              | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
378+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
379| memscope clause for atomic and flush                        | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
380+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
381| transparent clause (hull tasks)                             | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
382+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
383| rule-based compound directives                              | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
384+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
385| C23, C++23                                                  | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
386+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
387| Fortran 2023                                                | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
388+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
389| decl attribute for declarative directives                   | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
390+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
391| C attribute syntax                                          | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
392+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
393| pure directives in DO CONCURRENT                            | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
394+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
395| Optional argument for all clauses                           | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
396+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
397| Function references for locator list items                  | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
398+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
399| All clauses accept directive name modifier                  | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
400+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
401| Extensions to depobj construct                              | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
402+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
403| Extensions to atomic construct                              | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
404+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
405| Private reductions                                          | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
406+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
407| Self maps                                                   | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
408+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
409| Release map type for declare mapper                         | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
410+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
411| Extensions to interop construct                             | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
412+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
413| no_openmp_constructs                                        | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
414+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
415| safe_sync and progress with identifier and API              | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
416+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
417| OpenMP directives in concurrent loop regions                | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
418+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
419| atomics constructs on concurrent loop regions               | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
420+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
421| Loop construct with DO CONCURRENT                           | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
422+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
423| device_type clause for target construct                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
424+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
425| nowait for ancestor target directives                       | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
426+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
427| New API for devices' num_teams/thread_limit                 | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
428+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
429| Host and device environment variables                       | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
430+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
431| num_threads ICV and clause accepts list                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
432+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
433| Numeric names for environment variables                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
434+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
435| Increment between places for OMP_PLACES                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
436+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
437| OMP_AVAILABLE_DEVICES envirable                             | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
438+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
439| Traits for default device envirable                         | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
440+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
441| Optionally omit array length expression                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
442+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
443| Canonical loop sequences                                    | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
444+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
445| Clarifications to Fortran map semantics                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
446+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
447| default clause at target construct                          | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
448+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
449| ref count update use_device_{ptr, addr}                     | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
450+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
451| Clarifications to implicit reductions                       | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
452+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
453| ref modifier for map clauses                                | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
454+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
455| map-type modifiers in arbitrary position                    | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
456+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
457| atomic constructs in loop region                            | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
458+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
459| Lift nesting restriction on concurrent loop                 | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
460+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
461| priority clause for target constructs                       | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
462+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
463| changes to target_data construct                            | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
464+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
465| Non-const do_not_sync for nowait/nogroup                    | :none:`unclaimed`         | :none:`unclaimed`         |                                                                          |
466+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
467
468OpenMP Extensions
469=================
470
471The following table provides a quick overview over various OpenMP
472extensions and their implementation status.  These extensions are not
473currently defined by any standard, so links to associated LLVM
474documentation are provided.  As these extensions mature, they will be
475considered for standardization. Please post on the
476`Discourse forums (Runtimes - OpenMP category)`_ to provide feedback.
477
478+------------------------------+-----------------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+
479|Category                      | Feature                                                                           | Status                   | Reviews                                                |
480+==============================+===================================================================================+==========================+========================================================+
481| atomic extension             | `'atomic' strictly nested within 'teams'                                          | :good:`prototyped`       | D126323                                                |
482|                              | <https://openmp.llvm.org/docs/openacc/OpenMPExtensions.html#atomicWithinTeams>`_  |                          |                                                        |
483+------------------------------+-----------------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+
484| device extension             | `'ompx_hold' map type modifier                                                    | :good:`prototyped`       | D106509, D106510                                       |
485|                              | <https://openmp.llvm.org/docs/openacc/OpenMPExtensions.html#ompx-hold>`_          |                          |                                                        |
486+------------------------------+-----------------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+
487| device extension             | `'ompx_bare' clause on 'target teams' construct                                   | :good:`prototyped`       | #66844, #70612                                         |
488|                              | <https://www.osti.gov/servlets/purl/2205717>`_                                    |                          |                                                        |
489+------------------------------+-----------------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+
490| device extension             | Multi-dim 'num_teams' and 'thread_limit' clause on 'target teams ompx_bare'       | :good:`partial`          | #99732, #101407, #102715                               |
491|                              | construct                                                                         |                          |                                                        |
492+------------------------------+-----------------------------------------------------------------------------------+--------------------------+--------------------------------------------------------+
493
494.. _Discourse forums (Runtimes - OpenMP category): https://discourse.llvm.org/c/runtimes/openmp/35
495