d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported
[official-gcc.git] / libgomp / omp_lib.f90.in
blob7ba115f3a1aba034b8593f95c1d9684b99f05c93
1 ! Copyright (C) 2005-2022 Free Software Foundation, Inc.
2 ! Contributed by Jakub Jelinek <jakub@redhat.com>.
4 ! This file is part of the GNU Offloading and Multi Processing Library
5 ! (libgomp).
7 ! Libgomp is free software; you can redistribute it and/or modify it
8 ! under the terms of the GNU General Public License as published by
9 ! the Free Software Foundation; either version 3, or (at your option)
10 ! any later version.
12 ! Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
13 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 ! more details.
17 ! Under Section 7 of GPL version 3, you are granted additional
18 ! permissions described in the GCC Runtime Library Exception, version
19 ! 3.1, as published by the Free Software Foundation.
21 ! You should have received a copy of the GNU General Public License and
22 ! a copy of the GCC Runtime Library Exception along with this program;
23 ! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 ! <http://www.gnu.org/licenses/>.
26 module omp_lib_kinds
27 use iso_c_binding, only: c_int, c_intptr_t
28 implicit none
29 private :: c_int, c_intptr_t
30 integer, parameter :: omp_lock_kind = @OMP_LOCK_KIND@
31 integer, parameter :: omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@
32 integer, parameter :: omp_sched_kind = 4
33 integer, parameter :: omp_proc_bind_kind = 4
34 integer, parameter :: omp_sync_hint_kind = 4
35 integer, parameter :: omp_lock_hint_kind = omp_sync_hint_kind
36 integer, parameter :: omp_pause_resource_kind = 4
37 integer, parameter :: omp_allocator_handle_kind = c_intptr_t
38 integer, parameter :: omp_alloctrait_key_kind = c_int
39 integer, parameter :: omp_alloctrait_val_kind = c_intptr_t
40 integer, parameter :: omp_memspace_handle_kind = c_intptr_t
41 integer, parameter :: omp_depend_kind = @OMP_DEPEND_KIND@
42 integer, parameter :: omp_event_handle_kind = c_intptr_t
43 integer (omp_sched_kind), parameter :: omp_sched_static = 1
44 integer (omp_sched_kind), parameter :: omp_sched_dynamic = 2
45 integer (omp_sched_kind), parameter :: omp_sched_guided = 3
46 integer (omp_sched_kind), parameter :: omp_sched_auto = 4
47 integer (omp_proc_bind_kind), &
48 parameter :: omp_proc_bind_false = 0
49 integer (omp_proc_bind_kind), &
50 parameter :: omp_proc_bind_true = 1
51 integer (omp_proc_bind_kind), &
52 parameter :: omp_proc_bind_primary = 2
53 integer (omp_proc_bind_kind), &
54 parameter :: omp_proc_bind_master = 2
55 integer (omp_proc_bind_kind), &
56 parameter :: omp_proc_bind_close = 3
57 integer (omp_proc_bind_kind), &
58 parameter :: omp_proc_bind_spread = 4
59 integer (omp_lock_hint_kind), &
60 parameter :: omp_sync_hint_none = 0
61 integer (omp_lock_hint_kind), &
62 parameter :: omp_lock_hint_none = omp_sync_hint_none
63 integer (omp_lock_hint_kind), &
64 parameter :: omp_sync_hint_uncontended = 1
65 integer (omp_lock_hint_kind), &
66 parameter :: omp_lock_hint_uncontended &
67 = omp_sync_hint_uncontended
68 integer (omp_lock_hint_kind), &
69 parameter :: omp_sync_hint_contended = 2
70 integer (omp_lock_hint_kind), &
71 parameter :: omp_lock_hint_contended &
72 = omp_sync_hint_contended
73 integer (omp_lock_hint_kind), &
74 parameter :: omp_sync_hint_nonspeculative = 4
75 integer (omp_lock_hint_kind), &
76 parameter :: omp_lock_hint_nonspeculative &
77 = omp_sync_hint_nonspeculative
78 integer (omp_lock_hint_kind), &
79 parameter :: omp_sync_hint_speculative = 8
80 integer (omp_lock_hint_kind), &
81 parameter :: omp_lock_hint_speculative &
82 = omp_sync_hint_speculative
83 integer (kind=omp_pause_resource_kind), &
84 parameter :: omp_pause_soft = 1
85 integer (kind=omp_pause_resource_kind), &
86 parameter :: omp_pause_hard = 2
87 integer (kind=omp_alloctrait_key_kind), &
88 parameter :: omp_atk_sync_hint = 1
89 integer (kind=omp_alloctrait_key_kind), &
90 parameter :: omp_atk_alignment = 2
91 integer (kind=omp_alloctrait_key_kind), &
92 parameter :: omp_atk_access = 3
93 integer (kind=omp_alloctrait_key_kind), &
94 parameter :: omp_atk_pool_size = 4
95 integer (kind=omp_alloctrait_key_kind), &
96 parameter :: omp_atk_fallback = 5
97 integer (kind=omp_alloctrait_key_kind), &
98 parameter :: omp_atk_fb_data = 6
99 integer (kind=omp_alloctrait_key_kind), &
100 parameter :: omp_atk_pinned = 7
101 integer (kind=omp_alloctrait_key_kind), &
102 parameter :: omp_atk_partition = 8
103 integer (kind=omp_alloctrait_val_kind), &
104 parameter :: omp_atv_default = -1
105 integer (kind=omp_alloctrait_val_kind), &
106 parameter :: omp_atv_false = 0
107 integer (kind=omp_alloctrait_val_kind), &
108 parameter :: omp_atv_true = 1
109 integer (kind=omp_alloctrait_val_kind), &
110 parameter :: omp_atv_contended = 3
111 integer (kind=omp_alloctrait_val_kind), &
112 parameter :: omp_atv_uncontended = 4
113 integer (kind=omp_alloctrait_val_kind), &
114 parameter :: omp_atv_serialized = 5
115 integer (kind=omp_alloctrait_val_kind), &
116 parameter :: omp_atv_sequential = omp_atv_serialized
117 integer (kind=omp_alloctrait_val_kind), &
118 parameter :: omp_atv_private = 6
119 integer (kind=omp_alloctrait_val_kind), &
120 parameter :: omp_atv_all = 7
121 integer (kind=omp_alloctrait_val_kind), &
122 parameter :: omp_atv_thread = 8
123 integer (kind=omp_alloctrait_val_kind), &
124 parameter :: omp_atv_pteam = 9
125 integer (kind=omp_alloctrait_val_kind), &
126 parameter :: omp_atv_cgroup = 10
127 integer (kind=omp_alloctrait_val_kind), &
128 parameter :: omp_atv_default_mem_fb = 11
129 integer (kind=omp_alloctrait_val_kind), &
130 parameter :: omp_atv_null_fb = 12
131 integer (kind=omp_alloctrait_val_kind), &
132 parameter :: omp_atv_abort_fb = 13
133 integer (kind=omp_alloctrait_val_kind), &
134 parameter :: omp_atv_allocator_fb = 14
135 integer (kind=omp_alloctrait_val_kind), &
136 parameter :: omp_atv_environment = 15
137 integer (kind=omp_alloctrait_val_kind), &
138 parameter :: omp_atv_nearest = 16
139 integer (kind=omp_alloctrait_val_kind), &
140 parameter :: omp_atv_blocked = 17
141 integer (kind=omp_alloctrait_val_kind), &
142 parameter :: omp_atv_interleaved = 18
143 integer (kind=omp_allocator_handle_kind), &
144 parameter :: omp_null_allocator = 0
145 integer (kind=omp_allocator_handle_kind), &
146 parameter :: omp_default_mem_alloc = 1
147 integer (kind=omp_allocator_handle_kind), &
148 parameter :: omp_large_cap_mem_alloc = 2
149 integer (kind=omp_allocator_handle_kind), &
150 parameter :: omp_const_mem_alloc = 3
151 integer (kind=omp_allocator_handle_kind), &
152 parameter :: omp_high_bw_mem_alloc = 4
153 integer (kind=omp_allocator_handle_kind), &
154 parameter :: omp_low_lat_mem_alloc = 5
155 integer (kind=omp_allocator_handle_kind), &
156 parameter :: omp_cgroup_mem_alloc = 6
157 integer (kind=omp_allocator_handle_kind), &
158 parameter :: omp_pteam_mem_alloc = 7
159 integer (kind=omp_allocator_handle_kind), &
160 parameter :: omp_thread_mem_alloc = 8
161 integer (omp_memspace_handle_kind), &
162 parameter :: omp_default_mem_space = 0
163 integer (omp_memspace_handle_kind), &
164 parameter :: omp_large_cap_mem_space = 1
165 integer (omp_memspace_handle_kind), &
166 parameter :: omp_const_mem_space = 2
167 integer (omp_memspace_handle_kind), &
168 parameter :: omp_high_bw_mem_space = 3
169 integer (omp_memspace_handle_kind), &
170 parameter :: omp_low_lat_mem_space = 4
171 integer, parameter :: omp_initial_device = -1
172 integer, parameter :: omp_invalid_device = -4
174 type omp_alloctrait
175 integer (kind=omp_alloctrait_key_kind) key
176 integer (kind=omp_alloctrait_val_kind) value
177 end type omp_alloctrait
178 end module
180 module omp_lib
181 use omp_lib_kinds
182 implicit none
183 integer, parameter :: openmp_version = 201511
185 interface
186 subroutine omp_init_lock (svar)
187 use omp_lib_kinds
188 integer (omp_lock_kind), intent (out) :: svar
189 end subroutine omp_init_lock
190 end interface
192 interface
193 subroutine omp_init_lock_with_hint (svar, hint)
194 use omp_lib_kinds
195 integer (omp_lock_kind), intent (out) :: svar
196 integer (omp_lock_hint_kind), intent (in) :: hint
197 end subroutine omp_init_lock_with_hint
198 end interface
200 interface
201 subroutine omp_init_nest_lock (nvar)
202 use omp_lib_kinds
203 integer (omp_nest_lock_kind), intent (out) :: nvar
204 end subroutine omp_init_nest_lock
205 end interface
207 interface
208 subroutine omp_init_nest_lock_with_hint (nvar, hint)
209 use omp_lib_kinds
210 integer (omp_nest_lock_kind), intent (out) :: nvar
211 integer (omp_lock_hint_kind), intent (in) :: hint
212 end subroutine omp_init_nest_lock_with_hint
213 end interface
215 interface
216 subroutine omp_destroy_lock (svar)
217 use omp_lib_kinds
218 integer (omp_lock_kind), intent (inout) :: svar
219 end subroutine omp_destroy_lock
220 end interface
222 interface
223 subroutine omp_destroy_nest_lock (nvar)
224 use omp_lib_kinds
225 integer (omp_nest_lock_kind), intent (inout) :: nvar
226 end subroutine omp_destroy_nest_lock
227 end interface
229 interface
230 subroutine omp_set_lock (svar)
231 use omp_lib_kinds
232 integer (omp_lock_kind), intent (inout) :: svar
233 end subroutine omp_set_lock
234 end interface
236 interface
237 subroutine omp_set_nest_lock (nvar)
238 use omp_lib_kinds
239 integer (omp_nest_lock_kind), intent (inout) :: nvar
240 end subroutine omp_set_nest_lock
241 end interface
243 interface
244 subroutine omp_unset_lock (svar)
245 use omp_lib_kinds
246 integer (omp_lock_kind), intent (inout) :: svar
247 end subroutine omp_unset_lock
248 end interface
250 interface
251 subroutine omp_unset_nest_lock (nvar)
252 use omp_lib_kinds
253 integer (omp_nest_lock_kind), intent (inout) :: nvar
254 end subroutine omp_unset_nest_lock
255 end interface
257 interface omp_set_dynamic
258 subroutine omp_set_dynamic (dynamic_threads)
259 logical (4), intent (in) :: dynamic_threads
260 end subroutine omp_set_dynamic
261 subroutine omp_set_dynamic_8 (dynamic_threads)
262 logical (8), intent (in) :: dynamic_threads
263 end subroutine omp_set_dynamic_8
264 end interface
266 interface omp_set_nested
267 subroutine omp_set_nested (nested)
268 logical (4), intent (in) :: nested
269 end subroutine omp_set_nested
270 subroutine omp_set_nested_8 (nested)
271 logical (8), intent (in) :: nested
272 end subroutine omp_set_nested_8
273 end interface
275 interface omp_set_num_threads
276 subroutine omp_set_num_threads (num_threads)
277 integer (4), intent (in) :: num_threads
278 end subroutine omp_set_num_threads
279 subroutine omp_set_num_threads_8 (num_threads)
280 integer (8), intent (in) :: num_threads
281 end subroutine omp_set_num_threads_8
282 end interface
284 interface
285 function omp_get_dynamic ()
286 logical (4) :: omp_get_dynamic
287 end function omp_get_dynamic
288 end interface
290 interface
291 function omp_get_nested ()
292 logical (4) :: omp_get_nested
293 end function omp_get_nested
294 end interface
296 interface
297 function omp_in_parallel ()
298 logical (4) :: omp_in_parallel
299 end function omp_in_parallel
300 end interface
302 interface
303 function omp_test_lock (svar)
304 use omp_lib_kinds
305 logical (4) :: omp_test_lock
306 integer (omp_lock_kind), intent (inout) :: svar
307 end function omp_test_lock
308 end interface
310 interface
311 function omp_get_max_threads ()
312 integer (4) :: omp_get_max_threads
313 end function omp_get_max_threads
314 end interface
316 interface
317 function omp_get_num_procs ()
318 integer (4) :: omp_get_num_procs
319 end function omp_get_num_procs
320 end interface
322 interface
323 function omp_get_num_threads ()
324 integer (4) :: omp_get_num_threads
325 end function omp_get_num_threads
326 end interface
328 interface
329 function omp_get_thread_num ()
330 integer (4) :: omp_get_thread_num
331 end function omp_get_thread_num
332 end interface
334 interface
335 function omp_test_nest_lock (nvar)
336 use omp_lib_kinds
337 integer (4) :: omp_test_nest_lock
338 integer (omp_nest_lock_kind), intent (inout) :: nvar
339 end function omp_test_nest_lock
340 end interface
342 interface
343 function omp_get_wtick ()
344 double precision :: omp_get_wtick
345 end function omp_get_wtick
346 end interface
348 interface
349 function omp_get_wtime ()
350 double precision :: omp_get_wtime
351 end function omp_get_wtime
352 end interface
354 interface omp_set_schedule
355 subroutine omp_set_schedule (kind, chunk_size)
356 use omp_lib_kinds
357 integer (omp_sched_kind), intent (in) :: kind
358 integer (4), intent (in) :: chunk_size
359 end subroutine omp_set_schedule
360 subroutine omp_set_schedule_8 (kind, chunk_size)
361 use omp_lib_kinds
362 integer (omp_sched_kind), intent (in) :: kind
363 integer (8), intent (in) :: chunk_size
364 end subroutine omp_set_schedule_8
365 end interface
367 interface omp_get_schedule
368 subroutine omp_get_schedule (kind, chunk_size)
369 use omp_lib_kinds
370 integer (omp_sched_kind), intent (out) :: kind
371 integer (4), intent (out) :: chunk_size
372 end subroutine omp_get_schedule
373 subroutine omp_get_schedule_8 (kind, chunk_size)
374 use omp_lib_kinds
375 integer (omp_sched_kind), intent (out) :: kind
376 integer (8), intent (out) :: chunk_size
377 end subroutine omp_get_schedule_8
378 end interface
380 interface
381 function omp_get_thread_limit ()
382 integer (4) :: omp_get_thread_limit
383 end function omp_get_thread_limit
384 end interface
386 interface omp_set_max_active_levels
387 subroutine omp_set_max_active_levels (max_levels)
388 integer (4), intent (in) :: max_levels
389 end subroutine omp_set_max_active_levels
390 subroutine omp_set_max_active_levels_8 (max_levels)
391 integer (8), intent (in) :: max_levels
392 end subroutine omp_set_max_active_levels_8
393 end interface
395 interface
396 function omp_get_max_active_levels ()
397 integer (4) :: omp_get_max_active_levels
398 end function omp_get_max_active_levels
399 end interface
401 interface
402 function omp_get_supported_active_levels ()
403 integer (4) :: omp_get_supported_active_levels
404 end function omp_get_supported_active_levels
405 end interface
407 interface
408 function omp_get_level ()
409 integer (4) :: omp_get_level
410 end function omp_get_level
411 end interface
413 interface omp_get_ancestor_thread_num
414 function omp_get_ancestor_thread_num (level)
415 integer (4), intent (in) :: level
416 integer (4) :: omp_get_ancestor_thread_num
417 end function omp_get_ancestor_thread_num
418 function omp_get_ancestor_thread_num_8 (level)
419 integer (8), intent (in) :: level
420 integer (4) :: omp_get_ancestor_thread_num_8
421 end function omp_get_ancestor_thread_num_8
422 end interface
424 interface omp_get_team_size
425 function omp_get_team_size (level)
426 integer (4), intent (in) :: level
427 integer (4) :: omp_get_team_size
428 end function omp_get_team_size
429 function omp_get_team_size_8 (level)
430 integer (8), intent (in) :: level
431 integer (4) :: omp_get_team_size_8
432 end function omp_get_team_size_8
433 end interface
435 interface
436 function omp_get_active_level ()
437 integer (4) :: omp_get_active_level
438 end function omp_get_active_level
439 end interface
441 interface
442 function omp_in_final ()
443 logical (4) :: omp_in_final
444 end function omp_in_final
445 end interface
447 interface
448 function omp_get_cancellation ()
449 logical (4) :: omp_get_cancellation
450 end function omp_get_cancellation
451 end interface
453 interface
454 function omp_get_proc_bind ()
455 use omp_lib_kinds
456 integer (omp_proc_bind_kind) :: omp_get_proc_bind
457 end function omp_get_proc_bind
458 end interface
460 interface
461 function omp_get_num_places ()
462 integer (4) :: omp_get_num_places
463 end function omp_get_num_places
464 end interface
466 interface omp_get_place_num_procs
467 function omp_get_place_num_procs (place_num)
468 integer (4), intent(in) :: place_num
469 integer (4) :: omp_get_place_num_procs
470 end function omp_get_place_num_procs
472 function omp_get_place_num_procs_8 (place_num)
473 integer (8), intent(in) :: place_num
474 integer (4) :: omp_get_place_num_procs_8
475 end function omp_get_place_num_procs_8
476 end interface
478 interface omp_get_place_proc_ids
479 subroutine omp_get_place_proc_ids (place_num, ids)
480 integer (4), intent(in) :: place_num
481 integer (4), intent(out) :: ids(*)
482 end subroutine omp_get_place_proc_ids
484 subroutine omp_get_place_proc_ids_8 (place_num, ids)
485 integer (8), intent(in) :: place_num
486 integer (8), intent(out) :: ids(*)
487 end subroutine omp_get_place_proc_ids_8
488 end interface
490 interface
491 function omp_get_place_num ()
492 integer (4) :: omp_get_place_num
493 end function omp_get_place_num
494 end interface
496 interface
497 function omp_get_partition_num_places ()
498 integer (4) :: omp_get_partition_num_places
499 end function omp_get_partition_num_places
500 end interface
502 interface omp_get_partition_place_nums
503 subroutine omp_get_partition_place_nums (place_nums)
504 integer (4), intent(out) :: place_nums(*)
505 end subroutine omp_get_partition_place_nums
507 subroutine omp_get_partition_place_nums_8 (place_nums)
508 integer (8), intent(out) :: place_nums(*)
509 end subroutine omp_get_partition_place_nums_8
510 end interface
512 interface omp_set_default_device
513 subroutine omp_set_default_device (device_num)
514 integer (4), intent (in) :: device_num
515 end subroutine omp_set_default_device
516 subroutine omp_set_default_device_8 (device_num)
517 integer (8), intent (in) :: device_num
518 end subroutine omp_set_default_device_8
519 end interface
521 interface
522 function omp_get_default_device ()
523 integer (4) :: omp_get_default_device
524 end function omp_get_default_device
525 end interface
527 interface
528 function omp_get_num_devices ()
529 integer (4) :: omp_get_num_devices
530 end function omp_get_num_devices
531 end interface
533 interface
534 function omp_get_num_teams ()
535 integer (4) :: omp_get_num_teams
536 end function omp_get_num_teams
537 end interface
539 interface
540 function omp_get_team_num ()
541 integer (4) :: omp_get_team_num
542 end function omp_get_team_num
543 end interface
545 interface
546 function omp_is_initial_device ()
547 logical (4) :: omp_is_initial_device
548 end function omp_is_initial_device
549 end interface
551 interface
552 function omp_get_initial_device ()
553 integer (4) :: omp_get_initial_device
554 end function omp_get_initial_device
555 end interface
557 interface
558 function omp_get_device_num ()
559 integer (4) :: omp_get_device_num
560 end function omp_get_device_num
561 end interface
563 interface
564 function omp_get_max_task_priority ()
565 integer (4) :: omp_get_max_task_priority
566 end function omp_get_max_task_priority
567 end interface
569 interface omp_set_num_teams
570 subroutine omp_set_num_teams (num_teams)
571 integer (4), intent (in) :: num_teams
572 end subroutine omp_set_num_teams
573 subroutine omp_set_num_teams_8 (num_teams)
574 integer (8), intent (in) :: num_teams
575 end subroutine omp_set_num_teams_8
576 end interface
578 interface
579 function omp_get_max_teams ()
580 integer (4) :: omp_get_max_teams
581 end function omp_get_max_teams
582 end interface
584 interface omp_set_teams_thread_limit
585 subroutine omp_set_teams_thread_limit (thread_limit)
586 integer (4), intent (in) :: thread_limit
587 end subroutine omp_set_teams_thread_limit
588 subroutine omp_set_teams_thread_limit_8 (thread_limit)
589 integer (8), intent (in) :: thread_limit
590 end subroutine omp_set_teams_thread_limit_8
591 end interface
593 interface
594 function omp_get_teams_thread_limit ()
595 integer (4) :: omp_get_teams_thread_limit
596 end function omp_get_teams_thread_limit
597 end interface
599 interface
600 subroutine omp_fulfill_event (event)
601 use omp_lib_kinds
602 integer (kind=omp_event_handle_kind), &
603 value, intent(in) :: event
604 end subroutine omp_fulfill_event
605 end interface
607 interface
608 subroutine omp_set_affinity_format (format)
609 character(len=*), intent(in) :: format
610 end subroutine omp_set_affinity_format
611 end interface
613 interface
614 function omp_get_affinity_format (buffer)
615 integer (4) :: omp_get_affinity_format
616 character(len=*), intent(out) :: buffer
617 end function omp_get_affinity_format
618 end interface
620 interface
621 subroutine omp_display_affinity (format)
622 character(len=*), intent(in) :: format
623 end subroutine omp_display_affinity
624 end interface
626 interface
627 function omp_capture_affinity (buffer, format)
628 integer (4) :: omp_capture_affinity
629 character(len=*), intent(out) :: buffer
630 character(len=*), intent(in) :: format
631 end function omp_capture_affinity
632 end interface
634 interface
635 function omp_pause_resource (kind, device_num)
636 use omp_lib_kinds
637 integer (4) :: omp_pause_resource
638 integer (kind=omp_pause_resource_kind), &
639 intent(in) :: kind
640 integer (4) :: device_num
641 end function
642 end interface
644 interface
645 function omp_pause_resource_all (kind)
646 use omp_lib_kinds
647 integer (4) :: omp_pause_resource_all
648 integer (kind=omp_pause_resource_kind), &
649 intent(in) :: kind
650 end function
651 end interface
653 interface omp_init_allocator
654 function omp_init_allocator (memspace, ntraits, traits)
655 use omp_lib_kinds
656 integer (kind=omp_allocator_handle_kind) omp_init_allocator
657 integer (kind=omp_memspace_handle_kind), &
658 intent(in) :: memspace
659 integer (4), intent(in) :: ntraits
660 type (omp_alloctrait), intent(in) :: traits(*)
661 end function
662 function omp_init_allocator_8 (memspace, ntraits, traits)
663 use omp_lib_kinds
664 integer (kind=omp_allocator_handle_kind) omp_init_allocator_8
665 integer (kind=omp_memspace_handle_kind), &
666 intent(in) :: memspace
667 integer (8), intent(in) :: ntraits
668 type (omp_alloctrait), intent(in) :: traits(*)
669 end function
670 end interface
672 interface
673 subroutine omp_destroy_allocator (allocator)
674 use omp_lib_kinds
675 integer (kind=omp_allocator_handle_kind), &
676 intent(in) :: allocator
677 end subroutine
678 end interface
680 interface
681 subroutine omp_set_default_allocator (allocator)
682 use omp_lib_kinds
683 integer (kind=omp_allocator_handle_kind), &
684 intent(in) :: allocator
685 end subroutine
686 end interface
688 interface
689 function omp_get_default_allocator ()
690 use omp_lib_kinds
691 integer (kind=omp_allocator_handle_kind) &
692 omp_get_default_allocator
693 end function
694 end interface
696 interface omp_display_env
697 subroutine omp_display_env (verbose)
698 logical (4),intent (in) :: verbose
699 end subroutine omp_display_env
700 subroutine omp_display_env_8 (verbose)
701 logical (8),intent (in) :: verbose
702 end subroutine omp_display_env_8
703 end interface
705 interface
706 function omp_alloc (size, allocator) bind(c)
707 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
708 import :: omp_allocator_handle_kind
709 type(c_ptr) :: omp_alloc
710 integer(c_size_t), value :: size
711 integer(omp_allocator_handle_kind), value :: allocator
712 end function omp_alloc
713 end interface
715 interface
716 function omp_aligned_alloc (alignment, size, allocator) bind(c)
717 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
718 import :: omp_allocator_handle_kind
719 type(c_ptr) :: omp_aligned_alloc
720 integer(c_size_t), value :: alignment, size
721 integer(omp_allocator_handle_kind), value :: allocator
722 end function omp_aligned_alloc
723 end interface
725 interface
726 subroutine omp_free(ptr, allocator) bind(c)
727 use, intrinsic :: iso_c_binding, only : c_ptr
728 import :: omp_allocator_handle_kind
729 type(c_ptr), value :: ptr
730 integer(omp_allocator_handle_kind), value :: allocator
731 end subroutine omp_free
732 end interface
734 interface
735 function omp_calloc (nmemb, size, allocator) bind(c)
736 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
737 import :: omp_allocator_handle_kind
738 type(c_ptr) :: omp_calloc
739 integer(c_size_t), value :: nmemb, size
740 integer(omp_allocator_handle_kind), value :: allocator
741 end function omp_calloc
742 end interface
744 interface
745 function omp_aligned_calloc (alignment, nmemb, size, allocator) bind(c)
746 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
747 import :: omp_allocator_handle_kind
748 type(c_ptr) :: omp_aligned_calloc
749 integer(c_size_t), value :: alignment, nmemb, size
750 integer(omp_allocator_handle_kind), value :: allocator
751 end function omp_aligned_calloc
752 end interface
754 interface
755 function omp_realloc (ptr, size, allocator, free_allocator) bind(c)
756 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
757 import :: omp_allocator_handle_kind
758 type(c_ptr) :: omp_realloc
759 type(c_ptr), value :: ptr
760 integer(c_size_t), value :: size
761 integer(omp_allocator_handle_kind), value :: allocator, free_allocator
762 end function omp_realloc
763 end interface
765 interface
766 function omp_target_alloc (size, device_num) bind(c)
767 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
768 type(c_ptr) :: omp_target_alloc
769 integer(c_size_t), value :: size
770 integer(c_int), value :: device_num
771 end function omp_target_alloc
772 end interface
774 interface
775 subroutine omp_target_free (device_ptr, device_num) bind(c)
776 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
777 type(c_ptr), value :: device_ptr
778 integer(c_int), value :: device_num
779 end subroutine omp_target_free
780 end interface
782 interface
783 function omp_target_is_present (ptr, device_num) bind(c)
784 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
785 integer(c_int) :: omp_target_is_present
786 type(c_ptr), value :: ptr
787 integer(c_int), value :: device_num
788 end function omp_target_is_present
789 end interface
791 interface
792 function omp_target_memcpy (dst, src, length, dst_offset, &
793 src_offset, dst_device_num, &
794 src_device_num) bind(c)
795 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
796 integer(c_int) :: omp_target_memcpy
797 type(c_ptr), value :: dst, src
798 integer(c_size_t), value :: length, dst_offset, src_offset
799 integer(c_int), value :: dst_device_num, src_device_num
800 end function omp_target_memcpy
801 end interface
803 interface
804 function omp_target_memcpy_async (dst, src, length, dst_offset, &
805 src_offset, dst_device_num, &
806 src_device_num, depobj_count, &
807 depobj_list) bind(c)
808 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
809 import :: omp_depend_kind
810 integer(c_int) :: omp_target_memcpy_async
811 type(c_ptr), value :: dst, src
812 integer(c_size_t), value :: length, dst_offset, src_offset
813 integer(c_int), value :: dst_device_num, src_device_num, &
814 depobj_count
815 integer(omp_depend_kind), optional :: depobj_list(*)
816 end function omp_target_memcpy_async
817 end interface
819 interface
820 function omp_target_memcpy_rect (dst,src,element_size, num_dims, &
821 volume, dst_offsets, src_offsets, &
822 dst_dimensions, src_dimensions, &
823 dst_device_num, src_device_num) &
824 bind(c)
825 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
826 integer(c_int) :: omp_target_memcpy_rect
827 type(c_ptr), value :: dst, src
828 integer(c_size_t), value :: element_size
829 integer(c_int), value :: num_dims, dst_device_num, src_device_num
830 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
831 src_offsets(*), dst_dimensions(*), &
832 src_dimensions(*)
833 end function omp_target_memcpy_rect
834 end interface
836 interface
837 function omp_target_memcpy_rect_async (dst,src,element_size, &
838 num_dims, volume, &
839 dst_offsets, src_offsets, &
840 dst_dimensions, &
841 src_dimensions, &
842 dst_device_num, &
843 src_device_num, &
844 depobj_count, &
845 depobj_list) bind(c)
846 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
847 import :: omp_depend_kind
848 integer(c_int) :: omp_target_memcpy_rect_async
849 type(c_ptr), value :: dst, src
850 integer(c_size_t), value :: element_size
851 integer(c_int), value :: num_dims, dst_device_num, src_device_num, &
852 depobj_count
853 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
854 src_offsets(*), dst_dimensions(*), &
855 src_dimensions(*)
856 integer(omp_depend_kind), optional :: depobj_list(*)
857 end function omp_target_memcpy_rect_async
858 end interface
860 interface
861 function omp_target_associate_ptr (host_ptr, device_ptr, size, &
862 device_offset, device_num) bind(c)
863 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
864 integer(c_int) :: omp_target_associate_ptr
865 type(c_ptr), value :: host_ptr, device_ptr
866 integer(c_size_t), value :: size, device_offset
867 integer(c_int), value :: device_num
868 end function omp_target_associate_ptr
869 end interface
871 interface
872 function omp_target_disassociate_ptr (ptr, device_num) bind(c)
873 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
874 integer(c_int) :: omp_target_disassociate_ptr
875 type(c_ptr), value :: ptr
876 integer(c_int), value :: device_num
877 end function omp_target_disassociate_ptr
878 end interface
880 interface
881 function omp_get_mapped_ptr (ptr, device_num) bind(c)
882 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
883 type(c_ptr) :: omp_get_mapped_ptr
884 type(c_ptr), value :: ptr
885 integer(c_int), value :: device_num
886 end function omp_get_mapped_ptr
887 end interface
889 interface
890 function omp_target_is_accessible (ptr, size, device_num) bind(c)
891 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
892 integer(c_int) :: omp_target_is_accessible
893 type(c_ptr), value :: ptr
894 integer(c_size_t), value :: size
895 integer(c_int), value :: device_num
896 end function omp_target_is_accessible
897 end interface
899 #if _OPENMP >= 201811
900 !GCC$ ATTRIBUTES DEPRECATED :: omp_get_nested, omp_set_nested
901 #endif
903 #if _OPENMP >= 202011
904 !GCC$ ATTRIBUTES DEPRECATED :: omp_proc_bind_master, omp_atv_sequential
905 #endif
907 end module omp_lib