xref: /freebsd/contrib/llvm-project/openmp/runtime/src/include/omp_lib.h.var (revision 77013d11e6483b970af25e13c9b892075742f7e5)
1! include/omp_lib.h.var
2
3!
4!//===----------------------------------------------------------------------===//
5!//
6!// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7!// See https://llvm.org/LICENSE.txt for license information.
8!// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9!//
10!//===----------------------------------------------------------------------===//
11!
12
13      integer omp_integer_kind
14      parameter(omp_integer_kind=4)
15      integer omp_logical_kind
16      parameter(omp_logical_kind=4)
17      integer omp_real_kind
18      parameter(omp_real_kind=4)
19      integer omp_lock_kind
20      parameter(omp_lock_kind=int_ptr_kind())
21      integer omp_nest_lock_kind
22      parameter(omp_nest_lock_kind=int_ptr_kind())
23      integer omp_sched_kind
24      parameter(omp_sched_kind=omp_integer_kind)
25      integer omp_proc_bind_kind
26      parameter(omp_proc_bind_kind=omp_integer_kind)
27      integer kmp_pointer_kind
28      parameter(kmp_pointer_kind=int_ptr_kind())
29      integer kmp_size_t_kind
30      parameter(kmp_size_t_kind=int_ptr_kind())
31      integer kmp_affinity_mask_kind
32      parameter(kmp_affinity_mask_kind=int_ptr_kind())
33      integer omp_sync_hint_kind
34      parameter(omp_sync_hint_kind=omp_integer_kind)
35      integer omp_lock_hint_kind
36      parameter(omp_lock_hint_kind=omp_sync_hint_kind)
37      integer omp_control_tool_kind
38      parameter(omp_control_tool_kind=omp_integer_kind)
39      integer omp_control_tool_result_kind
40      parameter(omp_control_tool_result_kind=omp_integer_kind)
41      integer omp_allocator_handle_kind
42      parameter(omp_allocator_handle_kind=int_ptr_kind())
43      integer omp_memspace_handle_kind
44      parameter(omp_memspace_handle_kind=int_ptr_kind())
45      integer omp_alloctrait_key_kind
46      parameter(omp_alloctrait_key_kind=omp_integer_kind)
47      integer omp_alloctrait_val_kind
48      parameter(omp_alloctrait_val_kind=int_ptr_kind())
49      integer omp_pause_resource_kind
50      parameter(omp_pause_resource_kind=omp_integer_kind)
51      integer omp_depend_kind
52      parameter(omp_depend_kind=int_ptr_kind())
53      integer omp_event_handle_kind
54      parameter(omp_event_handle_kind=int_ptr_kind())
55
56      integer(kind=omp_integer_kind)openmp_version
57      parameter(openmp_version=@LIBOMP_OMP_YEAR_MONTH@)
58      integer(kind=omp_integer_kind)kmp_version_major
59      parameter(kmp_version_major=@LIBOMP_VERSION_MAJOR@)
60      integer(kind=omp_integer_kind)kmp_version_minor
61      parameter(kmp_version_minor=@LIBOMP_VERSION_MINOR@)
62      integer(kind=omp_integer_kind)kmp_version_build
63      parameter(kmp_version_build=@LIBOMP_VERSION_BUILD@)
64      character(*)kmp_build_date
65      parameter(kmp_build_date='@LIBOMP_BUILD_DATE@')
66
67      integer(kind=omp_sched_kind)omp_sched_static
68      parameter(omp_sched_static=1)
69      integer(kind=omp_sched_kind)omp_sched_dynamic
70      parameter(omp_sched_dynamic=2)
71      integer(kind=omp_sched_kind)omp_sched_guided
72      parameter(omp_sched_guided=3)
73      integer(kind=omp_sched_kind)omp_sched_auto
74      parameter(omp_sched_auto=4)
75      integer(kind=omp_sched_kind)omp_sched_monotonic
76      parameter(omp_sched_monotonic=Z'80000000')
77
78      integer(kind=omp_proc_bind_kind)omp_proc_bind_false
79      parameter(omp_proc_bind_false=0)
80      integer(kind=omp_proc_bind_kind)omp_proc_bind_true
81      parameter(omp_proc_bind_true=1)
82      integer(kind=omp_proc_bind_kind)omp_proc_bind_master
83      parameter(omp_proc_bind_master=2)
84      integer(kind=omp_proc_bind_kind)omp_proc_bind_close
85      parameter(omp_proc_bind_close=3)
86      integer(kind=omp_proc_bind_kind)omp_proc_bind_spread
87      parameter(omp_proc_bind_spread=4)
88
89      integer(kind=omp_sync_hint_kind)omp_sync_hint_none
90      parameter(omp_sync_hint_none=0)
91      integer(kind=omp_sync_hint_kind)omp_sync_hint_uncontended
92      parameter(omp_sync_hint_uncontended=1)
93      integer(kind=omp_sync_hint_kind)omp_sync_hint_contended
94      parameter(omp_sync_hint_contended=2)
95      integer(kind=omp_sync_hint_kind)omp_sync_hint_nonspeculative
96      parameter(omp_sync_hint_nonspeculative=4)
97      integer(kind=omp_sync_hint_kind)omp_sync_hint_speculative
98      parameter(omp_sync_hint_speculative=8)
99      integer(kind=omp_lock_hint_kind)omp_lock_hint_none
100      parameter(omp_lock_hint_none=omp_sync_hint_none)
101      integer(kind=omp_lock_hint_kind)omp_lock_hint_uncontended
102      parameter(omp_lock_hint_uncontended=omp_sync_hint_uncontended)
103      integer(kind=omp_lock_hint_kind)omp_lock_hint_contended
104      parameter(omp_lock_hint_contended=omp_sync_hint_contended)
105      integer(kind=omp_lock_hint_kind)omp_lock_hint_nonspeculative
106      parameter(omp_lock_hint_nonspeculative=4)
107      integer(kind=omp_lock_hint_kind)omp_lock_hint_speculative
108      parameter(omp_lock_hint_speculative=omp_sync_hint_speculative)
109      integer(kind=omp_lock_hint_kind)kmp_lock_hint_hle
110      parameter(kmp_lock_hint_hle=65536)
111      integer(kind=omp_lock_hint_kind)kmp_lock_hint_rtm
112      parameter(kmp_lock_hint_rtm=131072)
113      integer(kind=omp_lock_hint_kind)kmp_lock_hint_adaptive
114      parameter(kmp_lock_hint_adaptive=262144)
115
116      integer(kind=omp_control_tool_kind)omp_control_tool_start
117      parameter(omp_control_tool_start=1)
118      integer(kind=omp_control_tool_kind)omp_control_tool_pause
119      parameter(omp_control_tool_pause=2)
120      integer(kind=omp_control_tool_kind)omp_control_tool_flush
121      parameter(omp_control_tool_flush=3)
122      integer(kind=omp_control_tool_kind)omp_control_tool_end
123      parameter(omp_control_tool_end=4)
124
125      integer(omp_control_tool_result_kind)omp_control_tool_notool
126      parameter(omp_control_tool_notool=-2)
127      integer(omp_control_tool_result_kind)omp_control_tool_nocallback
128      parameter(omp_control_tool_nocallback=-1)
129      integer(omp_control_tool_result_kind)omp_control_tool_success
130      parameter(omp_control_tool_success=0)
131      integer(omp_control_tool_result_kind)omp_control_tool_ignored
132      parameter(omp_control_tool_ignored=1)
133
134      integer(kind=omp_alloctrait_key_kind)omp_atk_sync_hint
135      parameter(omp_atk_sync_hint=1)
136      integer(kind=omp_alloctrait_key_kind)omp_atk_alignment
137      parameter(omp_atk_alignment=2)
138      integer(kind=omp_alloctrait_key_kind)omp_atk_access
139      parameter(omp_atk_access=3)
140      integer(kind=omp_alloctrait_key_kind)omp_atk_pool_size
141      parameter(omp_atk_pool_size=4)
142      integer(kind=omp_alloctrait_key_kind)omp_atk_fallback
143      parameter(omp_atk_fallback=5)
144      integer(kind=omp_alloctrait_key_kind)omp_atk_fb_data
145      parameter(omp_atk_fb_data=6)
146      integer(kind=omp_alloctrait_key_kind)omp_atk_pinned
147      parameter(omp_atk_pinned=7)
148      integer(kind=omp_alloctrait_key_kind)omp_atk_partition
149      parameter(omp_atk_partition=8)
150
151      integer(kind=omp_alloctrait_val_kind)omp_atv_default
152      parameter(omp_atv_default=-1)
153      ! Reserved for future use
154      integer(kind=omp_alloctrait_val_kind)omp_atv_false
155      parameter(omp_atv_false=0)
156      ! Reserved for future use
157      integer(kind=omp_alloctrait_val_kind)omp_atv_true
158      parameter(omp_atv_true=1)
159      integer(kind=omp_alloctrait_val_kind)omp_atv_contended
160      parameter(omp_atv_contended=3)
161      integer(kind=omp_alloctrait_val_kind)omp_atv_uncontended
162      parameter(omp_atv_uncontended=4)
163      integer(kind=omp_alloctrait_val_kind)omp_atv_serialized
164      parameter(omp_atv_serialized=5)
165      integer(kind=omp_alloctrait_val_kind)omp_atv_sequential
166      parameter(omp_atv_sequential=5)
167      integer(kind=omp_alloctrait_val_kind)omp_atv_private
168      parameter(omp_atv_private=6)
169      integer(kind=omp_alloctrait_val_kind)omp_atv_all
170      parameter(omp_atv_all=7)
171      integer(kind=omp_alloctrait_val_kind)omp_atv_thread
172      parameter(omp_atv_thread=8)
173      integer(kind=omp_alloctrait_val_kind)omp_atv_pteam
174      parameter(omp_atv_pteam=9)
175      integer(kind=omp_alloctrait_val_kind)omp_atv_cgroup
176      parameter(omp_atv_cgroup=10)
177      integer(kind=omp_alloctrait_val_kind)omp_atv_default_mem_fb
178      parameter(omp_atv_default_mem_fb=11)
179      integer(kind=omp_alloctrait_val_kind)omp_atv_null_fb
180      parameter(omp_atv_null_fb=12)
181      integer(kind=omp_alloctrait_val_kind)omp_atv_abort_fb
182      parameter(omp_atv_abort_fb=13)
183      integer(kind=omp_alloctrait_val_kind)omp_atv_allocator_fb
184      parameter(omp_atv_allocator_fb=14)
185      integer(kind=omp_alloctrait_val_kind)omp_atv_environment
186      parameter(omp_atv_environment=15)
187      integer(kind=omp_alloctrait_val_kind)omp_atv_nearest
188      parameter(omp_atv_nearest=16)
189      integer(kind=omp_alloctrait_val_kind)omp_atv_blocked
190      parameter(omp_atv_blocked=17)
191      integer(kind=omp_alloctrait_val_kind)omp_atv_interleaved
192      parameter(omp_atv_interleaved=18)
193
194      type omp_alloctrait
195        integer (kind=omp_alloctrait_key_kind) key
196        integer (kind=omp_alloctrait_val_kind) value
197      end type omp_alloctrait
198
199      integer(kind=omp_allocator_handle_kind)omp_null_allocator
200      parameter(omp_null_allocator=0)
201      integer(kind=omp_allocator_handle_kind)omp_default_mem_alloc
202      parameter(omp_default_mem_alloc=1)
203      integer(kind=omp_allocator_handle_kind)omp_large_cap_mem_alloc
204      parameter(omp_large_cap_mem_alloc=2)
205      integer(kind=omp_allocator_handle_kind)omp_const_mem_alloc
206      parameter(omp_const_mem_alloc=3)
207      integer(kind=omp_allocator_handle_kind)omp_high_bw_mem_alloc
208      parameter(omp_high_bw_mem_alloc=4)
209      integer(kind=omp_allocator_handle_kind)omp_low_lat_mem_alloc
210      parameter(omp_low_lat_mem_alloc=5)
211      integer(kind=omp_allocator_handle_kind)omp_cgroup_mem_alloc
212      parameter(omp_cgroup_mem_alloc=6)
213      integer(kind=omp_allocator_handle_kind)omp_pteam_mem_alloc
214      parameter(omp_pteam_mem_alloc=7)
215      integer(kind=omp_allocator_handle_kind)omp_thread_mem_alloc
216      parameter(omp_thread_mem_alloc=8)
217
218      integer(kind=omp_memspace_handle_kind)omp_default_mem_space
219      parameter(omp_default_mem_space=0)
220      integer(kind=omp_memspace_handle_kind)omp_large_cap_mem_space
221      parameter(omp_large_cap_mem_space=1)
222      integer(kind=omp_memspace_handle_kind)omp_const_mem_space
223      parameter(omp_const_mem_space=2)
224      integer(kind=omp_memspace_handle_kind)omp_high_bw_mem_space
225      parameter(omp_high_bw_mem_space=3)
226      integer(kind=omp_memspace_handle_kind)omp_low_lat_mem_space
227      parameter(omp_low_lat_mem_space=4)
228
229      integer(kind=omp_pause_resource_kind)omp_pause_resume
230      parameter(omp_pause_resume=0)
231      integer(kind=omp_pause_resource_kind)omp_pause_soft
232      parameter(omp_pause_soft=1)
233      integer(kind=omp_pause_resource_kind)omp_pause_hard
234      parameter(omp_pause_hard=2)
235
236      interface
237
238!       ***
239!       *** omp_* entry points
240!       ***
241
242        subroutine omp_set_num_threads(num_threads) bind(c)
243          import
244          integer (kind=omp_integer_kind), value :: num_threads
245        end subroutine omp_set_num_threads
246
247        subroutine omp_set_dynamic(dynamic_threads) bind(c)
248          import
249          logical (kind=omp_logical_kind), value :: dynamic_threads
250        end subroutine omp_set_dynamic
251
252        subroutine omp_set_nested(nested) bind(c)
253          import
254          logical (kind=omp_logical_kind), value :: nested
255        end subroutine omp_set_nested
256
257        function omp_get_num_threads() bind(c)
258          import
259          integer (kind=omp_integer_kind) omp_get_num_threads
260        end function omp_get_num_threads
261
262        function omp_get_max_threads() bind(c)
263          import
264          integer (kind=omp_integer_kind) omp_get_max_threads
265        end function omp_get_max_threads
266
267        function omp_get_thread_num() bind(c)
268          import
269          integer (kind=omp_integer_kind) omp_get_thread_num
270        end function omp_get_thread_num
271
272        function omp_get_num_procs() bind(c)
273          import
274          integer (kind=omp_integer_kind) omp_get_num_procs
275        end function omp_get_num_procs
276
277        function omp_in_parallel() bind(c)
278          import
279          logical (kind=omp_logical_kind) omp_in_parallel
280        end function omp_in_parallel
281
282        function omp_in_final() bind(c)
283          import
284          logical (kind=omp_logical_kind) omp_in_final
285        end function omp_in_final
286
287        function omp_get_dynamic() bind(c)
288          import
289          logical (kind=omp_logical_kind) omp_get_dynamic
290        end function omp_get_dynamic
291
292        function omp_get_nested() bind(c)
293          import
294          logical (kind=omp_logical_kind) omp_get_nested
295        end function omp_get_nested
296
297        function omp_get_thread_limit() bind(c)
298          import
299          integer (kind=omp_integer_kind) omp_get_thread_limit
300        end function omp_get_thread_limit
301
302        subroutine omp_set_max_active_levels(max_levels) bind(c)
303          import
304          integer (kind=omp_integer_kind), value :: max_levels
305        end subroutine omp_set_max_active_levels
306
307        function omp_get_max_active_levels() bind(c)
308          import
309          integer (kind=omp_integer_kind) omp_get_max_active_levels
310        end function omp_get_max_active_levels
311
312        function omp_get_level() bind(c)
313          import
314          integer (kind=omp_integer_kind) omp_get_level
315        end function omp_get_level
316
317        function omp_get_active_level() bind(c)
318          import
319          integer (kind=omp_integer_kind) omp_get_active_level
320        end function omp_get_active_level
321
322        function omp_get_ancestor_thread_num(level) bind(c)
323          import
324          integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
325          integer (kind=omp_integer_kind), value :: level
326        end function omp_get_ancestor_thread_num
327
328        function omp_get_team_size(level) bind(c)
329          import
330          integer (kind=omp_integer_kind) omp_get_team_size
331          integer (kind=omp_integer_kind), value :: level
332        end function omp_get_team_size
333
334        subroutine omp_set_schedule(kind, chunk_size) bind(c)
335          import
336          integer (kind=omp_sched_kind), value :: kind
337          integer (kind=omp_integer_kind), value :: chunk_size
338        end subroutine omp_set_schedule
339
340        subroutine omp_get_schedule(kind, chunk_size) bind(c)
341          import
342          integer (kind=omp_sched_kind) kind
343          integer (kind=omp_integer_kind) chunk_size
344        end subroutine omp_get_schedule
345
346        function omp_get_proc_bind() bind(c)
347          import
348          integer (kind=omp_proc_bind_kind) omp_get_proc_bind
349        end function omp_get_proc_bind
350
351        function omp_get_num_places() bind(c)
352          import
353          integer (kind=omp_integer_kind) omp_get_num_places
354        end function omp_get_num_places
355
356        function omp_get_place_num_procs(place_num) bind(c)
357          import
358          integer (kind=omp_integer_kind), value :: place_num
359          integer (kind=omp_integer_kind) omp_get_place_num_procs
360        end function omp_get_place_num_procs
361
362        subroutine omp_get_place_proc_ids(place_num, ids) bind(c)
363          import
364          integer (kind=omp_integer_kind), value :: place_num
365          integer (kind=omp_integer_kind) ids(*)
366        end subroutine omp_get_place_proc_ids
367
368        function omp_get_place_num() bind(c)
369          import
370          integer (kind=omp_integer_kind) omp_get_place_num
371        end function omp_get_place_num
372
373        function omp_get_partition_num_places() bind(c)
374          import
375          integer (kind=omp_integer_kind) omp_get_partition_num_places
376        end function omp_get_partition_num_places
377
378        subroutine omp_get_partition_place_nums(place_nums) bind(c)
379          import
380          integer (kind=omp_integer_kind) place_nums(*)
381        end subroutine omp_get_partition_place_nums
382
383        function omp_get_wtime() bind(c)
384          double precision omp_get_wtime
385        end function omp_get_wtime
386
387        function omp_get_wtick() bind(c)
388          double precision omp_get_wtick
389        end function omp_get_wtick
390
391        function omp_get_default_device() bind(c)
392          import
393          integer (kind=omp_integer_kind) omp_get_default_device
394        end function omp_get_default_device
395
396        subroutine omp_set_default_device(device_num) bind(c)
397          import
398          integer (kind=omp_integer_kind), value :: device_num
399        end subroutine omp_set_default_device
400
401        function omp_get_num_devices() bind(c)
402          import
403          integer (kind=omp_integer_kind) omp_get_num_devices
404        end function omp_get_num_devices
405
406        function omp_get_num_teams() bind(c)
407          import
408          integer (kind=omp_integer_kind) omp_get_num_teams
409        end function omp_get_num_teams
410
411        function omp_get_team_num() bind(c)
412          import
413          integer (kind=omp_integer_kind) omp_get_team_num
414        end function omp_get_team_num
415
416        function omp_is_initial_device() bind(c)
417          import
418          logical (kind=omp_logical_kind) omp_is_initial_device
419        end function omp_is_initial_device
420
421        function omp_get_initial_device() bind(c)
422          import
423          integer (kind=omp_integer_kind) omp_get_initial_device
424        end function omp_get_initial_device
425
426        function omp_get_device_num() bind(c)
427          import
428          integer (kind=omp_integer_kind) omp_get_device_num
429        end function omp_get_device_num
430
431        function omp_pause_resource(kind, device_num) bind(c)
432          import
433          integer (kind=omp_pause_resource_kind), value :: kind
434          integer (kind=omp_integer_kind), value :: device_num
435          integer (kind=omp_integer_kind) omp_pause_resource
436        end function omp_pause_resource
437
438        function omp_pause_resource_all(kind) bind(c)
439          import
440          integer (kind=omp_pause_resource_kind), value :: kind
441          integer (kind=omp_integer_kind) omp_pause_resource_all
442        end function omp_pause_resource_all
443
444        function omp_get_supported_active_levels() bind(c)
445          import
446          integer (kind=omp_integer_kind) omp_get_supported_active_levels
447        end function omp_get_supported_active_levels
448
449        subroutine omp_fulfill_event(event) bind(c)
450          import
451          integer (kind=omp_event_handle_kind), value :: event
452        end subroutine omp_fulfill_event
453
454        subroutine omp_init_lock(svar) bind(c)
455!DIR$ IF(__INTEL_COMPILER.GE.1400)
456!DIR$ attributes known_intrinsic :: omp_init_lock
457!DIR$ ENDIF
458          import
459          integer (kind=omp_lock_kind) svar
460        end subroutine omp_init_lock
461
462        subroutine omp_destroy_lock(svar) bind(c)
463!DIR$ IF(__INTEL_COMPILER.GE.1400)
464!DIR$ attributes known_intrinsic :: omp_destroy_lock
465!DIR$ ENDIF
466          import
467          integer (kind=omp_lock_kind) svar
468        end subroutine omp_destroy_lock
469
470        subroutine omp_set_lock(svar) bind(c)
471!DIR$ IF(__INTEL_COMPILER.GE.1400)
472!DIR$ attributes known_intrinsic :: omp_set_lock
473!DIR$ ENDIF
474          import
475          integer (kind=omp_lock_kind) svar
476        end subroutine omp_set_lock
477
478        subroutine omp_unset_lock(svar) bind(c)
479!DIR$ IF(__INTEL_COMPILER.GE.1400)
480!DIR$ attributes known_intrinsic :: omp_unset_lock
481!DIR$ ENDIF
482          import
483          integer (kind=omp_lock_kind) svar
484        end subroutine omp_unset_lock
485
486        function omp_test_lock(svar) bind(c)
487!DIR$ IF(__INTEL_COMPILER.GE.1400)
488!DIR$ attributes known_intrinsic :: omp_test_lock
489!DIR$ ENDIF
490          import
491          logical (kind=omp_logical_kind) omp_test_lock
492          integer (kind=omp_lock_kind) svar
493        end function omp_test_lock
494
495        subroutine omp_init_nest_lock(nvar) bind(c)
496!DIR$ IF(__INTEL_COMPILER.GE.1400)
497!DIR$ attributes known_intrinsic :: omp_init_nest_lock
498!DIR$ ENDIF
499          import
500          integer (kind=omp_nest_lock_kind) nvar
501        end subroutine omp_init_nest_lock
502
503        subroutine omp_destroy_nest_lock(nvar) bind(c)
504!DIR$ IF(__INTEL_COMPILER.GE.1400)
505!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
506!DIR$ ENDIF
507          import
508          integer (kind=omp_nest_lock_kind) nvar
509        end subroutine omp_destroy_nest_lock
510
511        subroutine omp_set_nest_lock(nvar) bind(c)
512!DIR$ IF(__INTEL_COMPILER.GE.1400)
513!DIR$ attributes known_intrinsic :: omp_set_nest_lock
514!DIR$ ENDIF
515          import
516          integer (kind=omp_nest_lock_kind) nvar
517        end subroutine omp_set_nest_lock
518
519        subroutine omp_unset_nest_lock(nvar) bind(c)
520!DIR$ IF(__INTEL_COMPILER.GE.1400)
521!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
522!DIR$ ENDIF
523          import
524          integer (kind=omp_nest_lock_kind) nvar
525        end subroutine omp_unset_nest_lock
526
527        function omp_test_nest_lock(nvar) bind(c)
528!DIR$ IF(__INTEL_COMPILER.GE.1400)
529!DIR$ attributes known_intrinsic :: omp_test_nest_lock
530!DIR$ ENDIF
531          import
532          integer (kind=omp_integer_kind) omp_test_nest_lock
533          integer (kind=omp_nest_lock_kind) nvar
534        end function omp_test_nest_lock
535
536        function omp_get_max_task_priority() bind(c)
537          import
538          integer (kind=omp_integer_kind) omp_get_max_task_priority
539        end function omp_get_max_task_priority
540
541        function omp_init_allocator(memspace, ntraits, traits)
542          import
543          integer (omp_allocator_handle_kind) omp_init_allocator
544          integer (omp_memspace_handle_kind) :: memspace
545          integer (omp_integer_kind) :: ntraits
546          type(omp_alloctrait), intent(in) :: traits(*)
547        end function omp_init_allocator
548
549        subroutine omp_destroy_allocator(allocator) bind(c)
550          import
551          integer (omp_allocator_handle_kind), value :: allocator
552        end subroutine omp_destroy_allocator
553
554        subroutine omp_set_default_allocator(allocator) bind(c)
555          import
556          integer (omp_allocator_handle_kind), value :: allocator
557        end subroutine omp_set_default_allocator
558
559        function omp_get_default_allocator() bind(c)
560          import
561          integer (omp_allocator_handle_kind) omp_get_default_allocator
562        end function omp_get_default_allocator
563
564        subroutine omp_set_affinity_format(format)
565          character (len=*) :: format
566        end subroutine omp_set_affinity_format
567
568        function omp_get_affinity_format(buffer)
569          import
570          character (len=*) :: buffer
571          integer (kind=kmp_size_t_kind) :: omp_get_affinity_format
572        end function omp_get_affinity_format
573
574        subroutine omp_display_affinity(format)
575          character (len=*) :: format
576        end subroutine omp_display_affinity
577
578        function omp_capture_affinity(buffer, format)
579          import
580          character (len=*) :: format
581          character (len=*) :: buffer
582          integer (kind=kmp_size_t_kind) :: omp_capture_affinity
583        end function omp_capture_affinity
584
585        subroutine omp_display_env(verbose) bind(c)
586          import
587          logical (kind=omp_logical_kind), value :: verbose
588        end subroutine omp_display_env
589
590        function omp_target_alloc(size, device_num) bind(c)
591          use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
592          type(c_ptr) omp_target_alloc
593          integer(c_size_t), value :: size
594          integer(c_int), value :: device_num
595        end function omp_target_alloc
596
597        subroutine omp_target_free(device_ptr, device_num) bind(c)
598          use, intrinsic :: iso_c_binding, only : c_ptr, c_int
599          type(c_ptr), value :: device_ptr
600          integer(c_int), value :: device_num
601        end subroutine omp_target_free
602
603        function omp_target_is_present(ptr, device_num) bind(c)
604          use, intrinsic :: iso_c_binding, only : c_ptr, c_int
605          integer(c_int) omp_target_is_present
606          type(c_ptr), value :: ptr
607          integer(c_int), value :: device_num
608        end function omp_target_is_present
609
610        function omp_target_memcpy(dst, src, length, dst_offset,                                                                    &
611     &      src_offset, dst_device_num, src_device_num) bind(c)
612          use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
613          integer(c_int) omp_target_memcpy
614          type(c_ptr), value :: dst, src
615          integer(c_size_t), value :: length, dst_offset, src_offset
616          integer(c_int), value :: dst_device_num, src_device_num
617        end function omp_target_memcpy
618
619        function omp_target_memcpy_rect(dst, src, element_size,                                                                     &
620     &      num_dims, volume, dst_offsets, src_offsets, dst_dimensions,                                                             &
621     &      src_dimensions, dst_device_num, src_device_num) bind(c)
622          use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
623          integer(c_int) omp_target_memcpy_rect
624          type(c_ptr), value :: dst, src
625          integer(c_size_t), value :: element_size
626          integer(c_int), value :: num_dims, dst_device_num,                                                                        &
627     &        src_device_num
628          integer(c_size_t), intent(in) :: volume(*), dst_offsets(*),                                                               &
629     &        src_offsets(*), dst_dimensions(*), src_dimensions(*)
630        end function omp_target_memcpy_rect
631
632        function omp_target_memcpy_async(dst, src, length, dst_offset,                                                              &
633     &      src_offset, dst_device_num, src_device_num, depobj_count,                                                               &
634     &      depobj_list) bind(c)
635          use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
636          import
637          integer(c_int) omp_target_memcpy_async
638          type(c_ptr), value :: dst, src
639          integer(c_size_t), value :: length, dst_offset, src_offset
640          integer(c_int), value :: dst_device_num, src_device_num,                                                                  &
641     &        depobj_count
642          integer(omp_depend_kind), optional :: depobj_list(*)
643        end function omp_target_memcpy_async
644
645        function omp_target_memcpy_rect_async(dst, src, element_size,                                                               &
646     &      num_dims, volume, dst_offsets, src_offsets, dst_dimensions,                                                             &
647     &      src_dimensions, dst_device_num, src_device_num,                                                                         &
648     &      depobj_count, depobj_list) bind(c)
649          use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
650          import
651          integer(c_int) omp_target_memcpy_rect_async
652          type(c_ptr), value :: dst, src
653          integer(c_size_t), value :: element_size
654          integer(c_int), value :: num_dims, dst_device_num,                                                                        &
655     &        src_device_num, depobj_count
656          integer(c_size_t), intent(in) :: volume(*), dst_offsets(*),                                                               &
657     &        src_offsets(*), dst_dimensions(*), src_dimensions(*)
658          integer(omp_depend_kind), optional :: depobj_list(*)
659        end function omp_target_memcpy_rect_async
660
661        function omp_target_associate_ptr(host_ptr, device_ptr, size,                                                               &
662     &      device_offset, device_num) bind(c)
663          use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
664          integer(c_int) omp_target_associate_ptr
665          type(c_ptr), value :: host_ptr, device_ptr
666          integer(c_size_t), value :: size, device_offset
667          integer(c_int), value :: device_num
668        end function omp_target_associate_ptr
669
670        function omp_get_mapped_ptr(ptr, device_num) bind(c)
671          use, intrinsic :: iso_c_binding, only : c_ptr, c_int
672          type(c_ptr) omp_get_mapped_ptr
673          type(c_ptr), value :: ptr
674          integer(c_int), value :: device_num
675        end function omp_get_mapped_ptr
676
677        function omp_target_disassociate_ptr(ptr, device_num) bind(c)
678          use, intrinsic :: iso_c_binding, only : c_ptr, c_int
679          integer(c_int) omp_target_disassociate_ptr
680          type(c_ptr), value :: ptr
681          integer(c_int), value :: device_num
682        end function omp_target_disassociate_ptr
683
684!       ***
685!       *** kmp_* entry points
686!       ***
687
688        subroutine kmp_set_stacksize(size) bind(c)
689          import
690          integer (kind=omp_integer_kind), value :: size
691        end subroutine kmp_set_stacksize
692
693        subroutine kmp_set_stacksize_s(size) bind(c)
694          import
695          integer (kind=kmp_size_t_kind), value :: size
696        end subroutine kmp_set_stacksize_s
697
698        subroutine kmp_set_blocktime(msec) bind(c)
699          import
700          integer (kind=omp_integer_kind), value :: msec
701        end subroutine kmp_set_blocktime
702
703        subroutine kmp_set_library_serial() bind(c)
704        end subroutine kmp_set_library_serial
705
706        subroutine kmp_set_library_turnaround() bind(c)
707        end subroutine kmp_set_library_turnaround
708
709        subroutine kmp_set_library_throughput() bind(c)
710        end subroutine kmp_set_library_throughput
711
712        subroutine kmp_set_library(libnum) bind(c)
713          import
714          integer (kind=omp_integer_kind), value :: libnum
715        end subroutine kmp_set_library
716
717        subroutine kmp_set_defaults(string) bind(c)
718          character string(*)
719        end subroutine kmp_set_defaults
720
721        function kmp_get_stacksize() bind(c)
722          import
723          integer (kind=omp_integer_kind) kmp_get_stacksize
724        end function kmp_get_stacksize
725
726        function kmp_get_stacksize_s() bind(c)
727          import
728          integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
729        end function kmp_get_stacksize_s
730
731        function kmp_get_blocktime() bind(c)
732          import
733          integer (kind=omp_integer_kind) kmp_get_blocktime
734        end function kmp_get_blocktime
735
736        function kmp_get_library() bind(c)
737          import
738          integer (kind=omp_integer_kind) kmp_get_library
739        end function kmp_get_library
740
741        subroutine kmp_set_disp_num_buffers(num) bind(c)
742          import
743          integer (kind=omp_integer_kind), value :: num
744        end subroutine kmp_set_disp_num_buffers
745
746        function kmp_set_affinity(mask) bind(c)
747          import
748          integer (kind=omp_integer_kind) kmp_set_affinity
749          integer (kind=kmp_affinity_mask_kind) mask
750        end function kmp_set_affinity
751
752        function kmp_get_affinity(mask) bind(c)
753          import
754          integer (kind=omp_integer_kind) kmp_get_affinity
755          integer (kind=kmp_affinity_mask_kind) mask
756        end function kmp_get_affinity
757
758        function kmp_get_affinity_max_proc() bind(c)
759          import
760          integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
761        end function kmp_get_affinity_max_proc
762
763        subroutine kmp_create_affinity_mask(mask) bind(c)
764          import
765          integer (kind=kmp_affinity_mask_kind) mask
766        end subroutine kmp_create_affinity_mask
767
768        subroutine kmp_destroy_affinity_mask(mask) bind(c)
769          import
770          integer (kind=kmp_affinity_mask_kind) mask
771        end subroutine kmp_destroy_affinity_mask
772
773        function kmp_set_affinity_mask_proc(proc, mask) bind(c)
774          import
775          integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
776          integer (kind=omp_integer_kind), value :: proc
777          integer (kind=kmp_affinity_mask_kind) mask
778        end function kmp_set_affinity_mask_proc
779
780        function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
781          import
782          integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
783          integer (kind=omp_integer_kind), value :: proc
784          integer (kind=kmp_affinity_mask_kind) mask
785        end function kmp_unset_affinity_mask_proc
786
787        function kmp_get_affinity_mask_proc(proc, mask) bind(c)
788          import
789          integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
790          integer (kind=omp_integer_kind), value :: proc
791          integer (kind=kmp_affinity_mask_kind) mask
792        end function kmp_get_affinity_mask_proc
793
794        function kmp_malloc(size) bind(c)
795          import
796          integer (kind=kmp_pointer_kind) kmp_malloc
797          integer (kind=kmp_size_t_kind), value :: size
798        end function kmp_malloc
799
800        function kmp_aligned_malloc(size, alignment) bind(c)
801          import
802          integer (kind=kmp_pointer_kind) kmp_aligned_malloc
803          integer (kind=kmp_size_t_kind), value :: size
804          integer (kind=kmp_size_t_kind), value :: alignment
805        end function kmp_aligned_malloc
806
807        function kmp_calloc(nelem, elsize) bind(c)
808          import
809          integer (kind=kmp_pointer_kind) kmp_calloc
810          integer (kind=kmp_size_t_kind), value :: nelem
811          integer (kind=kmp_size_t_kind), value :: elsize
812        end function kmp_calloc
813
814        function kmp_realloc(ptr, size) bind(c)
815          import
816          integer (kind=kmp_pointer_kind) kmp_realloc
817          integer (kind=kmp_pointer_kind), value :: ptr
818          integer (kind=kmp_size_t_kind), value :: size
819        end function kmp_realloc
820
821        subroutine kmp_free(ptr) bind(c)
822          import
823          integer (kind=kmp_pointer_kind), value :: ptr
824        end subroutine kmp_free
825
826        subroutine kmp_set_warnings_on() bind(c)
827        end subroutine kmp_set_warnings_on
828
829        subroutine kmp_set_warnings_off() bind(c)
830        end subroutine kmp_set_warnings_off
831
832        subroutine omp_init_lock_with_hint(svar, hint) bind(c)
833          import
834          integer (kind=omp_lock_kind) svar
835          integer (kind=omp_lock_hint_kind), value :: hint
836        end subroutine omp_init_lock_with_hint
837
838        subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c)
839          import
840          integer (kind=omp_nest_lock_kind) nvar
841          integer (kind=omp_lock_hint_kind), value :: hint
842        end subroutine omp_init_nest_lock_with_hint
843
844        function omp_control_tool(command, modifier, arg) bind(c)
845          import
846          integer (kind=omp_integer_kind) omp_control_tool
847          integer (kind=omp_control_tool_kind), value :: command
848          integer (kind=omp_control_tool_kind), value :: modifier
849          integer (kind=kmp_pointer_kind), optional :: arg
850        end function omp_control_tool
851
852      end interface
853
854!DIR$ IF DEFINED (__INTEL_OFFLOAD)
855
856!DIR$ IF(__INTEL_COMPILER.LT.1900)
857!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads
858!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic
859!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested
860!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads
861!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads
862!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num
863!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs
864!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel
865!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final
866!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic
867!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested
868!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit
869!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels
870!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels
871!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level
872!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level
873!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num
874!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size
875!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule
876!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule
877!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind
878!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime
879!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick
880!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device
881!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device
882!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device
883!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_initial_device
884!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices
885!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_device_num
886!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource
887!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource_all
888!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_supported_active_levels
889!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_fulfill_event
890!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams
891!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num
892!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock
893!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock
894!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock
895!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock
896!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock
897!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock
898!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock
899!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock
900!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock
901!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock
902!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_task_priority
903!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_affinity_format
904!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_affinity_format
905!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_display_affinity
906!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_capture_affinity
907!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize
908!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s
909!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime
910!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial
911!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround
912!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput
913!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library
914!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults
915!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize
916!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s
917!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime
918!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library
919!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_disp_num_buffers
920!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity
921!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity
922!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc
923!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask
924!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask
925!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc
926!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc
927!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc
928!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc
929!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc
930!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc
931!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc
932!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free
933!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on
934!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off
935!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock_with_hint
936!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock_with_hint
937!DIR$ ENDIF
938
939!DIR$ IF(__INTEL_COMPILER.GE.1400)
940!$omp declare target(omp_set_num_threads )
941!$omp declare target(omp_set_dynamic )
942!$omp declare target(omp_set_nested )
943!$omp declare target(omp_get_num_threads )
944!$omp declare target(omp_get_max_threads )
945!$omp declare target(omp_get_thread_num )
946!$omp declare target(omp_get_num_procs )
947!$omp declare target(omp_in_parallel )
948!$omp declare target(omp_in_final )
949!$omp declare target(omp_get_dynamic )
950!$omp declare target(omp_get_nested )
951!$omp declare target(omp_get_thread_limit )
952!$omp declare target(omp_set_max_active_levels )
953!$omp declare target(omp_get_max_active_levels )
954!$omp declare target(omp_get_level )
955!$omp declare target(omp_get_active_level )
956!$omp declare target(omp_get_ancestor_thread_num )
957!$omp declare target(omp_get_team_size )
958!$omp declare target(omp_set_schedule )
959!$omp declare target(omp_get_schedule )
960!$omp declare target(omp_get_proc_bind )
961!$omp declare target(omp_get_wtime )
962!$omp declare target(omp_get_wtick )
963!$omp declare target(omp_get_default_device )
964!$omp declare target(omp_set_default_device )
965!$omp declare target(omp_is_initial_device )
966!$omp declare target(omp_get_initial_device )
967!$omp declare target(omp_get_num_devices )
968!$omp declare target(omp_get_device_num )
969!$omp declare target(omp_pause_resource )
970!$omp declare target(omp_pause_resource_all )
971!$omp declare target(omp_get_supported_active_levels )
972!$omp declare target(omp_fulfill_event)
973!$omp declare target(omp_get_num_teams )
974!$omp declare target(omp_get_team_num )
975!$omp declare target(omp_init_lock )
976!$omp declare target(omp_destroy_lock )
977!$omp declare target(omp_set_lock )
978!$omp declare target(omp_unset_lock )
979!$omp declare target(omp_test_lock )
980!$omp declare target(omp_init_nest_lock )
981!$omp declare target(omp_destroy_nest_lock )
982!$omp declare target(omp_set_nest_lock )
983!$omp declare target(omp_unset_nest_lock )
984!$omp declare target(omp_test_nest_lock )
985!$omp declare target(omp_get_max_task_priority )
986!$omp declare target(omp_set_affinity_format )
987!$omp declare target(omp_get_affinity_format )
988!$omp declare target(omp_display_affinity )
989!$omp declare target(omp_capture_affinity )
990!$omp declare target(kmp_set_stacksize )
991!$omp declare target(kmp_set_stacksize_s )
992!$omp declare target(kmp_set_blocktime )
993!$omp declare target(kmp_set_library_serial )
994!$omp declare target(kmp_set_library_turnaround )
995!$omp declare target(kmp_set_library_throughput )
996!$omp declare target(kmp_set_library )
997!$omp declare target(kmp_set_defaults )
998!$omp declare target(kmp_get_stacksize )
999!$omp declare target(kmp_get_stacksize_s )
1000!$omp declare target(kmp_get_blocktime )
1001!$omp declare target(kmp_get_library )
1002!$omp declare target(kmp_set_disp_num_buffers )
1003!$omp declare target(kmp_set_affinity )
1004!$omp declare target(kmp_get_affinity )
1005!$omp declare target(kmp_get_affinity_max_proc )
1006!$omp declare target(kmp_create_affinity_mask )
1007!$omp declare target(kmp_destroy_affinity_mask )
1008!$omp declare target(kmp_set_affinity_mask_proc )
1009!$omp declare target(kmp_unset_affinity_mask_proc )
1010!$omp declare target(kmp_get_affinity_mask_proc )
1011!$omp declare target(kmp_malloc )
1012!$omp declare target(kmp_aligned_malloc )
1013!$omp declare target(kmp_calloc )
1014!$omp declare target(kmp_realloc )
1015!$omp declare target(kmp_free )
1016!$omp declare target(kmp_set_warnings_on )
1017!$omp declare target(kmp_set_warnings_off )
1018!$omp declare target(omp_init_lock_with_hint )
1019!$omp declare target(omp_init_nest_lock_with_hint )
1020!DIR$ ENDIF
1021!DIR$ ENDIF
1022