]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/openmp/runtime/src/include/omp_lib.h.var
Merge openmp trunk r366426, resolve conflicts, and add FREEBSD-Xlist.
[FreeBSD/FreeBSD.git] / contrib / openmp / runtime / src / include / omp_lib.h.var
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 !       ***
584 !       *** kmp_* entry points
585 !       ***
586
587         subroutine kmp_set_stacksize(size) bind(c)
588           import
589           integer (kind=omp_integer_kind), value :: size
590         end subroutine kmp_set_stacksize
591
592         subroutine kmp_set_stacksize_s(size) bind(c)
593           import
594           integer (kind=kmp_size_t_kind), value :: size
595         end subroutine kmp_set_stacksize_s
596
597         subroutine kmp_set_blocktime(msec) bind(c)
598           import
599           integer (kind=omp_integer_kind), value :: msec
600         end subroutine kmp_set_blocktime
601
602         subroutine kmp_set_library_serial() bind(c)
603         end subroutine kmp_set_library_serial
604
605         subroutine kmp_set_library_turnaround() bind(c)
606         end subroutine kmp_set_library_turnaround
607
608         subroutine kmp_set_library_throughput() bind(c)
609         end subroutine kmp_set_library_throughput
610
611         subroutine kmp_set_library(libnum) bind(c)
612           import
613           integer (kind=omp_integer_kind), value :: libnum
614         end subroutine kmp_set_library
615
616         subroutine kmp_set_defaults(string) bind(c)
617           character string(*)
618         end subroutine kmp_set_defaults
619
620         function kmp_get_stacksize() bind(c)
621           import
622           integer (kind=omp_integer_kind) kmp_get_stacksize
623         end function kmp_get_stacksize
624
625         function kmp_get_stacksize_s() bind(c)
626           import
627           integer (kind=kmp_size_t_kind) kmp_get_stacksize_s
628         end function kmp_get_stacksize_s
629
630         function kmp_get_blocktime() bind(c)
631           import
632           integer (kind=omp_integer_kind) kmp_get_blocktime
633         end function kmp_get_blocktime
634
635         function kmp_get_library() bind(c)
636           import
637           integer (kind=omp_integer_kind) kmp_get_library
638         end function kmp_get_library
639
640         subroutine kmp_set_disp_num_buffers(num) bind(c)
641           import
642           integer (kind=omp_integer_kind), value :: num
643         end subroutine kmp_set_disp_num_buffers
644
645         function kmp_set_affinity(mask) bind(c)
646           import
647           integer (kind=omp_integer_kind) kmp_set_affinity
648           integer (kind=kmp_affinity_mask_kind) mask
649         end function kmp_set_affinity
650
651         function kmp_get_affinity(mask) bind(c)
652           import
653           integer (kind=omp_integer_kind) kmp_get_affinity
654           integer (kind=kmp_affinity_mask_kind) mask
655         end function kmp_get_affinity
656
657         function kmp_get_affinity_max_proc() bind(c)
658           import
659           integer (kind=omp_integer_kind) kmp_get_affinity_max_proc
660         end function kmp_get_affinity_max_proc
661
662         subroutine kmp_create_affinity_mask(mask) bind(c)
663           import
664           integer (kind=kmp_affinity_mask_kind) mask
665         end subroutine kmp_create_affinity_mask
666
667         subroutine kmp_destroy_affinity_mask(mask) bind(c)
668           import
669           integer (kind=kmp_affinity_mask_kind) mask
670         end subroutine kmp_destroy_affinity_mask
671
672         function kmp_set_affinity_mask_proc(proc, mask) bind(c)
673           import
674           integer (kind=omp_integer_kind) kmp_set_affinity_mask_proc
675           integer (kind=omp_integer_kind), value :: proc
676           integer (kind=kmp_affinity_mask_kind) mask
677         end function kmp_set_affinity_mask_proc
678
679         function kmp_unset_affinity_mask_proc(proc, mask) bind(c)
680           import
681           integer (kind=omp_integer_kind) kmp_unset_affinity_mask_proc
682           integer (kind=omp_integer_kind), value :: proc
683           integer (kind=kmp_affinity_mask_kind) mask
684         end function kmp_unset_affinity_mask_proc
685
686         function kmp_get_affinity_mask_proc(proc, mask) bind(c)
687           import
688           integer (kind=omp_integer_kind) kmp_get_affinity_mask_proc
689           integer (kind=omp_integer_kind), value :: proc
690           integer (kind=kmp_affinity_mask_kind) mask
691         end function kmp_get_affinity_mask_proc
692
693         function kmp_malloc(size) bind(c)
694           import
695           integer (kind=kmp_pointer_kind) kmp_malloc
696           integer (kind=kmp_size_t_kind), value :: size
697         end function kmp_malloc
698
699         function kmp_aligned_malloc(size, alignment) bind(c)
700           import
701           integer (kind=kmp_pointer_kind) kmp_aligned_malloc
702           integer (kind=kmp_size_t_kind), value :: size
703           integer (kind=kmp_size_t_kind), value :: alignment
704         end function kmp_aligned_malloc
705
706         function kmp_calloc(nelem, elsize) bind(c)
707           import
708           integer (kind=kmp_pointer_kind) kmp_calloc
709           integer (kind=kmp_size_t_kind), value :: nelem
710           integer (kind=kmp_size_t_kind), value :: elsize
711         end function kmp_calloc
712
713         function kmp_realloc(ptr, size) bind(c)
714           import
715           integer (kind=kmp_pointer_kind) kmp_realloc
716           integer (kind=kmp_pointer_kind), value :: ptr
717           integer (kind=kmp_size_t_kind), value :: size
718         end function kmp_realloc
719
720         subroutine kmp_free(ptr) bind(c)
721           import
722           integer (kind=kmp_pointer_kind), value :: ptr
723         end subroutine kmp_free
724
725         subroutine kmp_set_warnings_on() bind(c)
726         end subroutine kmp_set_warnings_on
727
728         subroutine kmp_set_warnings_off() bind(c)
729         end subroutine kmp_set_warnings_off
730
731         subroutine omp_init_lock_with_hint(svar, hint) bind(c)
732           import
733           integer (kind=omp_lock_kind) svar
734           integer (kind=omp_lock_hint_kind), value :: hint
735         end subroutine omp_init_lock_with_hint
736
737         subroutine omp_init_nest_lock_with_hint(nvar, hint) bind(c)
738           import
739           integer (kind=omp_nest_lock_kind) nvar
740           integer (kind=omp_lock_hint_kind), value :: hint
741         end subroutine omp_init_nest_lock_with_hint
742
743         function omp_control_tool(command, modifier, arg) bind(c)
744           import
745           integer (kind=omp_integer_kind) omp_control_tool
746           integer (kind=omp_control_tool_kind), value :: command
747           integer (kind=omp_control_tool_kind), value :: modifier
748           integer (kind=kmp_pointer_kind), optional :: arg
749         end function omp_control_tool
750
751       end interface
752
753 !DIR$ IF DEFINED (__INTEL_OFFLOAD)
754
755 !DIR$ IF(__INTEL_COMPILER.LT.1900)
756 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_num_threads
757 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_dynamic
758 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nested
759 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_threads
760 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_threads
761 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_num
762 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_procs
763 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_parallel
764 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_in_final
765 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_dynamic
766 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_nested
767 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_thread_limit
768 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_max_active_levels
769 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_active_levels
770 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_level
771 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_active_level
772 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_ancestor_thread_num
773 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_size
774 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_schedule
775 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_schedule
776 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_proc_bind
777 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtime
778 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_wtick
779 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_default_device
780 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_default_device
781 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_is_initial_device
782 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_initial_device
783 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_devices
784 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_device_num
785 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource
786 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_pause_resource_all
787 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_supported_active_levels
788 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_fulfill_event
789 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_num_teams
790 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_team_num
791 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock
792 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_lock
793 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_lock
794 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_lock
795 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_lock
796 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock
797 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_destroy_nest_lock
798 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_nest_lock
799 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_unset_nest_lock
800 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_test_nest_lock
801 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_max_task_priority
802 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_set_affinity_format
803 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_get_affinity_format
804 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_display_affinity
805 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_capture_affinity
806 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize
807 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_stacksize_s
808 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_blocktime
809 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_serial
810 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_turnaround
811 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library_throughput
812 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_library
813 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_defaults
814 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize
815 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_stacksize_s
816 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_blocktime
817 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_library
818 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_disp_num_buffers
819 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity
820 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity
821 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_max_proc
822 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_create_affinity_mask
823 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_destroy_affinity_mask
824 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_affinity_mask_proc
825 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_unset_affinity_mask_proc
826 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_get_affinity_mask_proc
827 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_malloc
828 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_aligned_malloc
829 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_calloc
830 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_realloc
831 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_free
832 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_on
833 !DIR$ ATTRIBUTES OFFLOAD:MIC :: kmp_set_warnings_off
834 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_lock_with_hint
835 !DIR$ ATTRIBUTES OFFLOAD:MIC :: omp_init_nest_lock_with_hint
836 !DIR$ ENDIF
837
838 !DIR$ IF(__INTEL_COMPILER.GE.1400)
839 !$omp declare target(omp_set_num_threads )
840 !$omp declare target(omp_set_dynamic )
841 !$omp declare target(omp_set_nested )
842 !$omp declare target(omp_get_num_threads )
843 !$omp declare target(omp_get_max_threads )
844 !$omp declare target(omp_get_thread_num )
845 !$omp declare target(omp_get_num_procs )
846 !$omp declare target(omp_in_parallel )
847 !$omp declare target(omp_in_final )
848 !$omp declare target(omp_get_dynamic )
849 !$omp declare target(omp_get_nested )
850 !$omp declare target(omp_get_thread_limit )
851 !$omp declare target(omp_set_max_active_levels )
852 !$omp declare target(omp_get_max_active_levels )
853 !$omp declare target(omp_get_level )
854 !$omp declare target(omp_get_active_level )
855 !$omp declare target(omp_get_ancestor_thread_num )
856 !$omp declare target(omp_get_team_size )
857 !$omp declare target(omp_set_schedule )
858 !$omp declare target(omp_get_schedule )
859 !$omp declare target(omp_get_proc_bind )
860 !$omp declare target(omp_get_wtime )
861 !$omp declare target(omp_get_wtick )
862 !$omp declare target(omp_get_default_device )
863 !$omp declare target(omp_set_default_device )
864 !$omp declare target(omp_is_initial_device )
865 !$omp declare target(omp_get_initial_device )
866 !$omp declare target(omp_get_num_devices )
867 !$omp declare target(omp_get_device_num )
868 !$omp declare target(omp_pause_resource )
869 !$omp declare target(omp_pause_resource_all )
870 !$omp declare target(omp_get_supported_active_levels )
871 !$omp declare target(omp_fulfill_event)
872 !$omp declare target(omp_get_num_teams )
873 !$omp declare target(omp_get_team_num )
874 !$omp declare target(omp_init_lock )
875 !$omp declare target(omp_destroy_lock )
876 !$omp declare target(omp_set_lock )
877 !$omp declare target(omp_unset_lock )
878 !$omp declare target(omp_test_lock )
879 !$omp declare target(omp_init_nest_lock )
880 !$omp declare target(omp_destroy_nest_lock )
881 !$omp declare target(omp_set_nest_lock )
882 !$omp declare target(omp_unset_nest_lock )
883 !$omp declare target(omp_test_nest_lock )
884 !$omp declare target(omp_get_max_task_priority )
885 !$omp declare target(omp_set_affinity_format )
886 !$omp declare target(omp_get_affinity_format )
887 !$omp declare target(omp_display_affinity )
888 !$omp declare target(omp_capture_affinity )
889 !$omp declare target(kmp_set_stacksize )
890 !$omp declare target(kmp_set_stacksize_s )
891 !$omp declare target(kmp_set_blocktime )
892 !$omp declare target(kmp_set_library_serial )
893 !$omp declare target(kmp_set_library_turnaround )
894 !$omp declare target(kmp_set_library_throughput )
895 !$omp declare target(kmp_set_library )
896 !$omp declare target(kmp_set_defaults )
897 !$omp declare target(kmp_get_stacksize )
898 !$omp declare target(kmp_get_stacksize_s )
899 !$omp declare target(kmp_get_blocktime )
900 !$omp declare target(kmp_get_library )
901 !$omp declare target(kmp_set_disp_num_buffers )
902 !$omp declare target(kmp_set_affinity )
903 !$omp declare target(kmp_get_affinity )
904 !$omp declare target(kmp_get_affinity_max_proc )
905 !$omp declare target(kmp_create_affinity_mask )
906 !$omp declare target(kmp_destroy_affinity_mask )
907 !$omp declare target(kmp_set_affinity_mask_proc )
908 !$omp declare target(kmp_unset_affinity_mask_proc )
909 !$omp declare target(kmp_get_affinity_mask_proc )
910 !$omp declare target(kmp_malloc )
911 !$omp declare target(kmp_aligned_malloc )
912 !$omp declare target(kmp_calloc )
913 !$omp declare target(kmp_realloc )
914 !$omp declare target(kmp_free )
915 !$omp declare target(kmp_set_warnings_on )
916 !$omp declare target(kmp_set_warnings_off )
917 !$omp declare target(omp_init_lock_with_hint )
918 !$omp declare target(omp_init_nest_lock_with_hint )
919 !DIR$ ENDIF
920 !DIR$ ENDIF