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_threadmodel
135      parameter(omp_atk_threadmodel=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      ! Reserved for future use
152      integer(kind=omp_alloctrait_val_kind)omp_atv_false
153      parameter(omp_atv_false=0)
154      ! Reserved for future use
155      integer(kind=omp_alloctrait_val_kind)omp_atv_true
156      parameter(omp_atv_true=1)
157      integer(kind=omp_alloctrait_val_kind)omp_atv_default
158      parameter(omp_atv_default=2)
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_sequential
164      parameter(omp_atv_sequential=5)
165      integer(kind=omp_alloctrait_val_kind)omp_atv_private
166      parameter(omp_atv_private=6)
167      integer(kind=omp_alloctrait_val_kind)omp_atv_all
168      parameter(omp_atv_all=7)
169      integer(kind=omp_alloctrait_val_kind)omp_atv_thread
170      parameter(omp_atv_thread=8)
171      integer(kind=omp_alloctrait_val_kind)omp_atv_pteam
172      parameter(omp_atv_pteam=9)
173      integer(kind=omp_alloctrait_val_kind)omp_atv_cgroup
174      parameter(omp_atv_cgroup=10)
175      integer(kind=omp_alloctrait_val_kind)omp_atv_default_mem_fb
176      parameter(omp_atv_default_mem_fb=11)
177      integer(kind=omp_alloctrait_val_kind)omp_atv_null_fb
178      parameter(omp_atv_null_fb=12)
179      integer(kind=omp_alloctrait_val_kind)omp_atv_abort_fb
180      parameter(omp_atv_abort_fb=13)
181      integer(kind=omp_alloctrait_val_kind)omp_atv_allocator_fb
182      parameter(omp_atv_allocator_fb=14)
183      integer(kind=omp_alloctrait_val_kind)omp_atv_environment
184      parameter(omp_atv_environment=15)
185      integer(kind=omp_alloctrait_val_kind)omp_atv_nearest
186      parameter(omp_atv_nearest=16)
187      integer(kind=omp_alloctrait_val_kind)omp_atv_blocked
188      parameter(omp_atv_blocked=17)
189      integer(kind=omp_alloctrait_val_kind)omp_atv_interleaved
190      parameter(omp_atv_interleaved=18)
191
192      type omp_alloctrait
193        integer (kind=omp_alloctrait_key_kind) key
194        integer (kind=omp_alloctrait_val_kind) value
195      end type omp_alloctrait
196
197      integer(kind=omp_allocator_handle_kind)omp_null_allocator
198      parameter(omp_null_allocator=0)
199      integer(kind=omp_allocator_handle_kind)omp_default_mem_alloc
200      parameter(omp_default_mem_alloc=1)
201      integer(kind=omp_allocator_handle_kind)omp_large_cap_mem_alloc
202      parameter(omp_large_cap_mem_alloc=2)
203      integer(kind=omp_allocator_handle_kind)omp_const_mem_alloc
204      parameter(omp_const_mem_alloc=3)
205      integer(kind=omp_allocator_handle_kind)omp_high_bw_mem_alloc
206      parameter(omp_high_bw_mem_alloc=4)
207      integer(kind=omp_allocator_handle_kind)omp_low_lat_mem_alloc
208      parameter(omp_low_lat_mem_alloc=5)
209      integer(kind=omp_allocator_handle_kind)omp_cgroup_mem_alloc
210      parameter(omp_cgroup_mem_alloc=6)
211      integer(kind=omp_allocator_handle_kind)omp_pteam_mem_alloc
212      parameter(omp_pteam_mem_alloc=7)
213      integer(kind=omp_allocator_handle_kind)omp_thread_mem_alloc
214      parameter(omp_thread_mem_alloc=8)
215
216      integer(kind=omp_memspace_handle_kind)omp_default_mem_space
217      parameter(omp_default_mem_space=0)
218      integer(kind=omp_memspace_handle_kind)omp_large_cap_mem_space
219      parameter(omp_large_cap_mem_space=1)
220      integer(kind=omp_memspace_handle_kind)omp_const_mem_space
221      parameter(omp_const_mem_space=2)
222      integer(kind=omp_memspace_handle_kind)omp_high_bw_mem_space
223      parameter(omp_high_bw_mem_space=3)
224      integer(kind=omp_memspace_handle_kind)omp_low_lat_mem_space
225      parameter(omp_low_lat_mem_space=4)
226
227      integer(kind=omp_pause_resource_kind)omp_pause_resume
228      parameter(omp_pause_resume=0)
229      integer(kind=omp_pause_resource_kind)omp_pause_soft
230      parameter(omp_pause_soft=1)
231      integer(kind=omp_pause_resource_kind)omp_pause_hard
232      parameter(omp_pause_hard=2)
233
234      interface
235
236!       ***
237!       *** omp_* entry points
238!       ***
239
240        subroutine omp_set_num_threads(num_threads) bind(c)
241          import
242          integer (kind=omp_integer_kind), value :: num_threads
243        end subroutine omp_set_num_threads
244
245        subroutine omp_set_dynamic(dynamic_threads) bind(c)
246          import
247          logical (kind=omp_logical_kind), value :: dynamic_threads
248        end subroutine omp_set_dynamic
249
250        subroutine omp_set_nested(nested) bind(c)
251          import
252          logical (kind=omp_logical_kind), value :: nested
253        end subroutine omp_set_nested
254
255        function omp_get_num_threads() bind(c)
256          import
257          integer (kind=omp_integer_kind) omp_get_num_threads
258        end function omp_get_num_threads
259
260        function omp_get_max_threads() bind(c)
261          import
262          integer (kind=omp_integer_kind) omp_get_max_threads
263        end function omp_get_max_threads
264
265        function omp_get_thread_num() bind(c)
266          import
267          integer (kind=omp_integer_kind) omp_get_thread_num
268        end function omp_get_thread_num
269
270        function omp_get_num_procs() bind(c)
271          import
272          integer (kind=omp_integer_kind) omp_get_num_procs
273        end function omp_get_num_procs
274
275        function omp_in_parallel() bind(c)
276          import
277          logical (kind=omp_logical_kind) omp_in_parallel
278        end function omp_in_parallel
279
280        function omp_in_final() bind(c)
281          import
282          logical (kind=omp_logical_kind) omp_in_final
283        end function omp_in_final
284
285        function omp_get_dynamic() bind(c)
286          import
287          logical (kind=omp_logical_kind) omp_get_dynamic
288        end function omp_get_dynamic
289
290        function omp_get_nested() bind(c)
291          import
292          logical (kind=omp_logical_kind) omp_get_nested
293        end function omp_get_nested
294
295        function omp_get_thread_limit() bind(c)
296          import
297          integer (kind=omp_integer_kind) omp_get_thread_limit
298        end function omp_get_thread_limit
299
300        subroutine omp_set_max_active_levels(max_levels) bind(c)
301          import
302          integer (kind=omp_integer_kind), value :: max_levels
303        end subroutine omp_set_max_active_levels
304
305        function omp_get_max_active_levels() bind(c)
306          import
307          integer (kind=omp_integer_kind) omp_get_max_active_levels
308        end function omp_get_max_active_levels
309
310        function omp_get_level() bind(c)
311          import
312          integer (kind=omp_integer_kind) omp_get_level
313        end function omp_get_level
314
315        function omp_get_active_level() bind(c)
316          import
317          integer (kind=omp_integer_kind) omp_get_active_level
318        end function omp_get_active_level
319
320        function omp_get_ancestor_thread_num(level) bind(c)
321          import
322          integer (kind=omp_integer_kind) omp_get_ancestor_thread_num
323          integer (kind=omp_integer_kind), value :: level
324        end function omp_get_ancestor_thread_num
325
326        function omp_get_team_size(level) bind(c)
327          import
328          integer (kind=omp_integer_kind) omp_get_team_size
329          integer (kind=omp_integer_kind), value :: level
330        end function omp_get_team_size
331
332        subroutine omp_set_schedule(kind, chunk_size) bind(c)
333          import
334          integer (kind=omp_sched_kind), value :: kind
335          integer (kind=omp_integer_kind), value :: chunk_size
336        end subroutine omp_set_schedule
337
338        subroutine omp_get_schedule(kind, chunk_size) bind(c)
339          import
340          integer (kind=omp_sched_kind) kind
341          integer (kind=omp_integer_kind) chunk_size
342        end subroutine omp_get_schedule
343
344        function omp_get_proc_bind() bind(c)
345          import
346          integer (kind=omp_proc_bind_kind) omp_get_proc_bind
347        end function omp_get_proc_bind
348
349        function omp_get_num_places() bind(c)
350          import
351          integer (kind=omp_integer_kind) omp_get_num_places
352        end function omp_get_num_places
353
354        function omp_get_place_num_procs(place_num) bind(c)
355          import
356          integer (kind=omp_integer_kind), value :: place_num
357          integer (kind=omp_integer_kind) omp_get_place_num_procs
358        end function omp_get_place_num_procs
359
360        subroutine omp_get_place_proc_ids(place_num, ids) bind(c)
361          import
362          integer (kind=omp_integer_kind), value :: place_num
363          integer (kind=omp_integer_kind) ids(*)
364        end subroutine omp_get_place_proc_ids
365
366        function omp_get_place_num() bind(c)
367          import
368          integer (kind=omp_integer_kind) omp_get_place_num
369        end function omp_get_place_num
370
371        function omp_get_partition_num_places() bind(c)
372          import
373          integer (kind=omp_integer_kind) omp_get_partition_num_places
374        end function omp_get_partition_num_places
375
376        subroutine omp_get_partition_place_nums(place_nums) bind(c)
377          import
378          integer (kind=omp_integer_kind) place_nums(*)
379        end subroutine omp_get_partition_place_nums
380
381        function omp_get_wtime() bind(c)
382          double precision omp_get_wtime
383        end function omp_get_wtime
384
385        function omp_get_wtick() bind(c)
386          double precision omp_get_wtick
387        end function omp_get_wtick
388
389        function omp_get_default_device() bind(c)
390          import
391          integer (kind=omp_integer_kind) omp_get_default_device
392        end function omp_get_default_device
393
394        subroutine omp_set_default_device(device_num) bind(c)
395          import
396          integer (kind=omp_integer_kind), value :: device_num
397        end subroutine omp_set_default_device
398
399        function omp_get_num_devices() bind(c)
400          import
401          integer (kind=omp_integer_kind) omp_get_num_devices
402        end function omp_get_num_devices
403
404        function omp_get_num_teams() bind(c)
405          import
406          integer (kind=omp_integer_kind) omp_get_num_teams
407        end function omp_get_num_teams
408
409        function omp_get_team_num() bind(c)
410          import
411          integer (kind=omp_integer_kind) omp_get_team_num
412        end function omp_get_team_num
413
414        function omp_is_initial_device() bind(c)
415          import
416          logical (kind=omp_logical_kind) omp_is_initial_device
417        end function omp_is_initial_device
418
419        function omp_get_initial_device() bind(c)
420          import
421          integer (kind=omp_integer_kind) omp_get_initial_device
422        end function omp_get_initial_device
423
424        function omp_get_device_num() bind(c)
425          import
426          integer (kind=omp_integer_kind) omp_get_device_num
427        end function omp_get_device_num
428
429        function omp_pause_resource(kind, device_num) bind(c)
430          import
431          integer (kind=omp_pause_resource_kind), value :: kind
432          integer (kind=omp_integer_kind), value :: device_num
433          integer (kind=omp_integer_kind) omp_pause_resource
434        end function omp_pause_resource
435
436        function omp_pause_resource_all(kind) bind(c)
437          import
438          integer (kind=omp_pause_resource_kind), value :: kind
439          integer (kind=omp_integer_kind) omp_pause_resource_all
440        end function omp_pause_resource_all
441
442        function omp_get_supported_active_levels() bind(c)
443          import
444          integer (kind=omp_integer_kind) omp_get_supported_active_levels
445        end function omp_get_supported_active_levels
446
447        subroutine omp_fulfill_event(event) bind(c)
448          import
449          integer (kind=omp_event_handle_kind), value :: event
450        end subroutine omp_fulfill_event
451
452        subroutine omp_init_lock(svar) bind(c)
453!DIR$ IF(__INTEL_COMPILER.GE.1400)
454!DIR$ attributes known_intrinsic :: omp_init_lock
455!DIR$ ENDIF
456          import
457          integer (kind=omp_lock_kind) svar
458        end subroutine omp_init_lock
459
460        subroutine omp_destroy_lock(svar) bind(c)
461!DIR$ IF(__INTEL_COMPILER.GE.1400)
462!DIR$ attributes known_intrinsic :: omp_destroy_lock
463!DIR$ ENDIF
464          import
465          integer (kind=omp_lock_kind) svar
466        end subroutine omp_destroy_lock
467
468        subroutine omp_set_lock(svar) bind(c)
469!DIR$ IF(__INTEL_COMPILER.GE.1400)
470!DIR$ attributes known_intrinsic :: omp_set_lock
471!DIR$ ENDIF
472          import
473          integer (kind=omp_lock_kind) svar
474        end subroutine omp_set_lock
475
476        subroutine omp_unset_lock(svar) bind(c)
477!DIR$ IF(__INTEL_COMPILER.GE.1400)
478!DIR$ attributes known_intrinsic :: omp_unset_lock
479!DIR$ ENDIF
480          import
481          integer (kind=omp_lock_kind) svar
482        end subroutine omp_unset_lock
483
484        function omp_test_lock(svar) bind(c)
485!DIR$ IF(__INTEL_COMPILER.GE.1400)
486!DIR$ attributes known_intrinsic :: omp_test_lock
487!DIR$ ENDIF
488          import
489          logical (kind=omp_logical_kind) omp_test_lock
490          integer (kind=omp_lock_kind) svar
491        end function omp_test_lock
492
493        subroutine omp_init_nest_lock(nvar) bind(c)
494!DIR$ IF(__INTEL_COMPILER.GE.1400)
495!DIR$ attributes known_intrinsic :: omp_init_nest_lock
496!DIR$ ENDIF
497          import
498          integer (kind=omp_nest_lock_kind) nvar
499        end subroutine omp_init_nest_lock
500
501        subroutine omp_destroy_nest_lock(nvar) bind(c)
502!DIR$ IF(__INTEL_COMPILER.GE.1400)
503!DIR$ attributes known_intrinsic :: omp_destroy_nest_lock
504!DIR$ ENDIF
505          import
506          integer (kind=omp_nest_lock_kind) nvar
507        end subroutine omp_destroy_nest_lock
508
509        subroutine omp_set_nest_lock(nvar) bind(c)
510!DIR$ IF(__INTEL_COMPILER.GE.1400)
511!DIR$ attributes known_intrinsic :: omp_set_nest_lock
512!DIR$ ENDIF
513          import
514          integer (kind=omp_nest_lock_kind) nvar
515        end subroutine omp_set_nest_lock
516
517        subroutine omp_unset_nest_lock(nvar) bind(c)
518!DIR$ IF(__INTEL_COMPILER.GE.1400)
519!DIR$ attributes known_intrinsic :: omp_unset_nest_lock
520!DIR$ ENDIF
521          import
522          integer (kind=omp_nest_lock_kind) nvar
523        end subroutine omp_unset_nest_lock
524
525        function omp_test_nest_lock(nvar) bind(c)
526!DIR$ IF(__INTEL_COMPILER.GE.1400)
527!DIR$ attributes known_intrinsic :: omp_test_nest_lock
528!DIR$ ENDIF
529          import
530          integer (kind=omp_integer_kind) omp_test_nest_lock
531          integer (kind=omp_nest_lock_kind) nvar
532        end function omp_test_nest_lock
533
534        function omp_get_max_task_priority() bind(c)
535          import
536          integer (kind=omp_integer_kind) omp_get_max_task_priority
537        end function omp_get_max_task_priority
538
539        function omp_init_allocator(memspace, ntraits, traits)
540          import
541          integer (omp_allocator_handle_kind) omp_init_allocator
542          integer (omp_memspace_handle_kind) :: memspace
543          integer (omp_integer_kind) :: ntraits
544          type(omp_alloctrait), intent(in) :: traits(*)
545        end function omp_init_allocator
546
547        subroutine omp_destroy_allocator(allocator) bind(c)
548          import
549          integer (omp_allocator_handle_kind), value :: allocator
550        end subroutine omp_destroy_allocator
551
552        subroutine omp_set_default_allocator(allocator) bind(c)
553          import
554          integer (omp_allocator_handle_kind), value :: allocator
555        end subroutine omp_set_default_allocator
556
557        function omp_get_default_allocator() bind(c)
558          import
559          integer (omp_allocator_handle_kind) omp_get_default_allocator
560        end function omp_get_default_allocator
561
562        subroutine omp_set_affinity_format(format)
563          character (len=*) :: format
564        end subroutine omp_set_affinity_format
565
566        function omp_get_affinity_format(buffer)
567          import
568          character (len=*) :: buffer
569          integer (kind=kmp_size_t_kind) :: omp_get_affinity_format
570        end function omp_get_affinity_format
571
572        subroutine omp_display_affinity(format)
573          character (len=*) :: format
574        end subroutine omp_display_affinity
575
576        function omp_capture_affinity(buffer, format)
577          import
578          character (len=*) :: format
579          character (len=*) :: buffer
580          integer (kind=kmp_size_t_kind) :: omp_capture_affinity
581        end function omp_capture_affinity
582
583        subroutine omp_display_env(verbose) bind(c)
584          import
585          logical (kind=omp_logical_kind), value :: verbose
586        end subroutine omp_display_env
587
588!       ***
589!       *** kmp_* entry points
590!       ***
591
592        subroutine kmp_set_stacksize(size) bind(c)
593          import
594          integer (kind=omp_integer_kind), value :: size
595        end subroutine kmp_set_stacksize
596
597        subroutine kmp_set_stacksize_s(size) bind(c)
598          import
599          integer (kind=kmp_size_t_kind), value :: size
600        end subroutine kmp_set_stacksize_s
601
602        subroutine kmp_set_blocktime(msec) bind(c)
603          import
604          integer (kind=omp_integer_kind), value :: msec
605        end subroutine kmp_set_blocktime
606
607        subroutine kmp_set_library_serial() bind(c)
608        end subroutine kmp_set_library_serial
609
610        subroutine kmp_set_library_turnaround() bind(c)
611        end subroutine kmp_set_library_turnaround
612
613        subroutine kmp_set_library_throughput() bind(c)
614        end subroutine kmp_set_library_throughput
615
616        subroutine kmp_set_library(libnum) bind(c)
617          import
618          integer (kind=omp_integer_kind), value :: libnum
619        end subroutine kmp_set_library
620
621        subroutine kmp_set_defaults(string) bind(c)
622          character string(*)
623        end subroutine kmp_set_defaults
624
625        function kmp_get_stacksize() bind(c)
626          import
627          integer (kind=omp_integer_kind) kmp_get_stacksize
628        end function kmp_get_stacksize
629
630        function kmp_get_stacksize_s() bind(c)
631          import
632          integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
633        end function kmp_get_stacksize_s
634
635        function kmp_get_blocktime() bind(c)
636          import
637          integer (kind=omp_integer_kind) kmp_get_blocktime
638        end function kmp_get_blocktime
639
640        function kmp_get_library() bind(c)
641          import
642          integer (kind=omp_integer_kind) kmp_get_library
643        end function kmp_get_library
644
645        subroutine kmp_set_disp_num_buffers(num) bind(c)
646          import
647          integer (kind=omp_integer_kind), value :: num
648        end subroutine kmp_set_disp_num_buffers
649
650        function kmp_set_affinity(mask) bind(c)
651          import
652          integer (kind=omp_integer_kind) kmp_set_affinity
653          integer (kind=kmp_affinity_mask_kind) mask
654        end function kmp_set_affinity
655
656        function kmp_get_affinity(mask) bind(c)
657          import
658          integer (kind=omp_integer_kind) kmp_get_affinity
659          integer (kind=kmp_affinity_mask_kind) mask
660        end function kmp_get_affinity
661
662        function kmp_get_affinity_max_proc() bind(c)
663          import
664          integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
665        end function kmp_get_affinity_max_proc
666
667        subroutine kmp_create_affinity_mask(mask) bind(c)
668          import
669          integer (kind=kmp_affinity_mask_kind) mask
670        end subroutine kmp_create_affinity_mask
671
672        subroutine kmp_destroy_affinity_mask(mask) bind(c)
673          import
674          integer (kind=kmp_affinity_mask_kind) mask
675        end subroutine kmp_destroy_affinity_mask
676
677        function kmp_set_affinity_mask_proc(proc, mask) bind(c)
678          import
679          integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
680          integer (kind=omp_integer_kind), value :: proc
681          integer (kind=kmp_affinity_mask_kind) mask
682        end function kmp_set_affinity_mask_proc
683
684        function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
685          import
686          integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
687          integer (kind=omp_integer_kind), value :: proc
688          integer (kind=kmp_affinity_mask_kind) mask
689        end function kmp_unset_affinity_mask_proc
690
691        function kmp_get_affinity_mask_proc(proc, mask) bind(c)
692          import
693          integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
694          integer (kind=omp_integer_kind), value :: proc
695          integer (kind=kmp_affinity_mask_kind) mask
696        end function kmp_get_affinity_mask_proc
697
698        function kmp_malloc(size) bind(c)
699          import
700          integer (kind=kmp_pointer_kind) kmp_malloc
701          integer (kind=kmp_size_t_kind), value :: size
702        end function kmp_malloc
703
704        function kmp_aligned_malloc(size, alignment) bind(c)
705          import
706          integer (kind=kmp_pointer_kind) kmp_aligned_malloc
707          integer (kind=kmp_size_t_kind), value :: size
708          integer (kind=kmp_size_t_kind), value :: alignment
709        end function kmp_aligned_malloc
710
711        function kmp_calloc(nelem, elsize) bind(c)
712          import
713          integer (kind=kmp_pointer_kind) kmp_calloc
714          integer (kind=kmp_size_t_kind), value :: nelem
715          integer (kind=kmp_size_t_kind), value :: elsize
716        end function kmp_calloc
717
718        function kmp_realloc(ptr, size) bind(c)
719          import
720          integer (kind=kmp_pointer_kind) kmp_realloc
721          integer (kind=kmp_pointer_kind), value :: ptr
722          integer (kind=kmp_size_t_kind), value :: size
723        end function kmp_realloc
724
725        subroutine kmp_free(ptr) bind(c)
726          import
727          integer (kind=kmp_pointer_kind), value :: ptr
728        end subroutine kmp_free
729
730        subroutine kmp_set_warnings_on() bind(c)
731        end subroutine kmp_set_warnings_on
732
733        subroutine kmp_set_warnings_off() bind(c)
734        end subroutine kmp_set_warnings_off
735
736        subroutine omp_init_lock_with_hint(svar, hint) bind(c)
737          import
738          integer (kind=omp_lock_kind) svar
739          integer (kind=omp_lock_hint_kind), value :: hint
740        end subroutine omp_init_lock_with_hint
741
742        subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c)
743          import
744          integer (kind=omp_nest_lock_kind) nvar
745          integer (kind=omp_lock_hint_kind), value :: hint
746        end subroutine omp_init_nest_lock_with_hint
747
748        function omp_control_tool(command, modifier, arg) bind(c)
749          import
750          integer (kind=omp_integer_kind) omp_control_tool
751          integer (kind=omp_control_tool_kind), value :: command
752          integer (kind=omp_control_tool_kind), value :: modifier
753          integer (kind=kmp_pointer_kind), optional :: arg
754        end function omp_control_tool
755
756      end interface
757
758!DIR$ IF DEFINED (__INTEL_OFFLOAD)
759
760!DIR$ IF(__INTEL_COMPILER.LT.1900)
761!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads
762!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic
763!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested
764!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads
765!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads
766!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num
767!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs
768!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel
769!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final
770!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic
771!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested
772!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit
773!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels
774!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels
775!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level
776!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level
777!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num
778!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size
779!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule
780!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule
781!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind
782!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime
783!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick
784!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device
785!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device
786!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device
787!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_initial_device
788!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices
789!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_device_num
790!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource
791!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource_all
792!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_supported_active_levels
793!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_fulfill_event
794!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams
795!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num
796!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock
797!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock
798!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock
799!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock
800!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock
801!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock
802!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock
803!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock
804!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock
805!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock
806!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_task_priority
807!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_affinity_format
808!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_affinity_format
809!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_display_affinity
810!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_capture_affinity
811!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize
812!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s
813!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime
814!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial
815!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround
816!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput
817!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library
818!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults
819!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize
820!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s
821!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime
822!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library
823!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_disp_num_buffers
824!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity
825!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity
826!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc
827!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask
828!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask
829!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc
830!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc
831!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc
832!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc
833!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc
834!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc
835!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc
836!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free
837!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on
838!DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off
839!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock_with_hint
840!DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock_with_hint
841!DIR$ ENDIF
842
843!DIR$ IF(__INTEL_COMPILER.GE.1400)
844!$omp declare target(omp_set_num_threads )
845!$omp declare target(omp_set_dynamic )
846!$omp declare target(omp_set_nested )
847!$omp declare target(omp_get_num_threads )
848!$omp declare target(omp_get_max_threads )
849!$omp declare target(omp_get_thread_num )
850!$omp declare target(omp_get_num_procs )
851!$omp declare target(omp_in_parallel )
852!$omp declare target(omp_in_final )
853!$omp declare target(omp_get_dynamic )
854!$omp declare target(omp_get_nested )
855!$omp declare target(omp_get_thread_limit )
856!$omp declare target(omp_set_max_active_levels )
857!$omp declare target(omp_get_max_active_levels )
858!$omp declare target(omp_get_level )
859!$omp declare target(omp_get_active_level )
860!$omp declare target(omp_get_ancestor_thread_num )
861!$omp declare target(omp_get_team_size )
862!$omp declare target(omp_set_schedule )
863!$omp declare target(omp_get_schedule )
864!$omp declare target(omp_get_proc_bind )
865!$omp declare target(omp_get_wtime )
866!$omp declare target(omp_get_wtick )
867!$omp declare target(omp_get_default_device )
868!$omp declare target(omp_set_default_device )
869!$omp declare target(omp_is_initial_device )
870!$omp declare target(omp_get_initial_device )
871!$omp declare target(omp_get_num_devices )
872!$omp declare target(omp_get_device_num )
873!$omp declare target(omp_pause_resource )
874!$omp declare target(omp_pause_resource_all )
875!$omp declare target(omp_get_supported_active_levels )
876!$omp declare target(omp_fulfill_event)
877!$omp declare target(omp_get_num_teams )
878!$omp declare target(omp_get_team_num )
879!$omp declare target(omp_init_lock )
880!$omp declare target(omp_destroy_lock )
881!$omp declare target(omp_set_lock )
882!$omp declare target(omp_unset_lock )
883!$omp declare target(omp_test_lock )
884!$omp declare target(omp_init_nest_lock )
885!$omp declare target(omp_destroy_nest_lock )
886!$omp declare target(omp_set_nest_lock )
887!$omp declare target(omp_unset_nest_lock )
888!$omp declare target(omp_test_nest_lock )
889!$omp declare target(omp_get_max_task_priority )
890!$omp declare target(omp_set_affinity_format )
891!$omp declare target(omp_get_affinity_format )
892!$omp declare target(omp_display_affinity )
893!$omp declare target(omp_capture_affinity )
894!$omp declare target(kmp_set_stacksize )
895!$omp declare target(kmp_set_stacksize_s )
896!$omp declare target(kmp_set_blocktime )
897!$omp declare target(kmp_set_library_serial )
898!$omp declare target(kmp_set_library_turnaround )
899!$omp declare target(kmp_set_library_throughput )
900!$omp declare target(kmp_set_library )
901!$omp declare target(kmp_set_defaults )
902!$omp declare target(kmp_get_stacksize )
903!$omp declare target(kmp_get_stacksize_s )
904!$omp declare target(kmp_get_blocktime )
905!$omp declare target(kmp_get_library )
906!$omp declare target(kmp_set_disp_num_buffers )
907!$omp declare target(kmp_set_affinity )
908!$omp declare target(kmp_get_affinity )
909!$omp declare target(kmp_get_affinity_max_proc )
910!$omp declare target(kmp_create_affinity_mask )
911!$omp declare target(kmp_destroy_affinity_mask )
912!$omp declare target(kmp_set_affinity_mask_proc )
913!$omp declare target(kmp_unset_affinity_mask_proc )
914!$omp declare target(kmp_get_affinity_mask_proc )
915!$omp declare target(kmp_malloc )
916!$omp declare target(kmp_aligned_malloc )
917!$omp declare target(kmp_calloc )
918!$omp declare target(kmp_realloc )
919!$omp declare target(kmp_free )
920!$omp declare target(kmp_set_warnings_on )
921!$omp declare target(kmp_set_warnings_off )
922!$omp declare target(omp_init_lock_with_hint )
923!$omp declare target(omp_init_nest_lock_with_hint )
924!DIR$ ENDIF
925!DIR$ ENDIF
926