Daily bump.
[official-gcc.git] / libgomp / omp_lib.f90.in
blobe870755891ce8ecbf03263a9606cf95c392c4fe8
1 ! Copyright (C) 2005-2021 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
172 type omp_alloctrait
173 integer (kind=omp_alloctrait_key_kind) key
174 integer (kind=omp_alloctrait_val_kind) value
175 end type omp_alloctrait
176 end module
178 module omp_lib
179 use omp_lib_kinds
180 implicit none
181 integer, parameter :: openmp_version = 201511
183 interface
184 subroutine omp_init_lock (svar)
185 use omp_lib_kinds
186 integer (omp_lock_kind), intent (out) :: svar
187 end subroutine omp_init_lock
188 end interface
190 interface
191 subroutine omp_init_lock_with_hint (svar, hint)
192 use omp_lib_kinds
193 integer (omp_lock_kind), intent (out) :: svar
194 integer (omp_lock_hint_kind), intent (in) :: hint
195 end subroutine omp_init_lock_with_hint
196 end interface
198 interface
199 subroutine omp_init_nest_lock (nvar)
200 use omp_lib_kinds
201 integer (omp_nest_lock_kind), intent (out) :: nvar
202 end subroutine omp_init_nest_lock
203 end interface
205 interface
206 subroutine omp_init_nest_lock_with_hint (nvar, hint)
207 use omp_lib_kinds
208 integer (omp_nest_lock_kind), intent (out) :: nvar
209 integer (omp_lock_hint_kind), intent (in) :: hint
210 end subroutine omp_init_nest_lock_with_hint
211 end interface
213 interface
214 subroutine omp_destroy_lock (svar)
215 use omp_lib_kinds
216 integer (omp_lock_kind), intent (inout) :: svar
217 end subroutine omp_destroy_lock
218 end interface
220 interface
221 subroutine omp_destroy_nest_lock (nvar)
222 use omp_lib_kinds
223 integer (omp_nest_lock_kind), intent (inout) :: nvar
224 end subroutine omp_destroy_nest_lock
225 end interface
227 interface
228 subroutine omp_set_lock (svar)
229 use omp_lib_kinds
230 integer (omp_lock_kind), intent (inout) :: svar
231 end subroutine omp_set_lock
232 end interface
234 interface
235 subroutine omp_set_nest_lock (nvar)
236 use omp_lib_kinds
237 integer (omp_nest_lock_kind), intent (inout) :: nvar
238 end subroutine omp_set_nest_lock
239 end interface
241 interface
242 subroutine omp_unset_lock (svar)
243 use omp_lib_kinds
244 integer (omp_lock_kind), intent (inout) :: svar
245 end subroutine omp_unset_lock
246 end interface
248 interface
249 subroutine omp_unset_nest_lock (nvar)
250 use omp_lib_kinds
251 integer (omp_nest_lock_kind), intent (inout) :: nvar
252 end subroutine omp_unset_nest_lock
253 end interface
255 interface omp_set_dynamic
256 subroutine omp_set_dynamic (dynamic_threads)
257 logical (4), intent (in) :: dynamic_threads
258 end subroutine omp_set_dynamic
259 subroutine omp_set_dynamic_8 (dynamic_threads)
260 logical (8), intent (in) :: dynamic_threads
261 end subroutine omp_set_dynamic_8
262 end interface
264 interface omp_set_nested
265 subroutine omp_set_nested (nested)
266 logical (4), intent (in) :: nested
267 end subroutine omp_set_nested
268 subroutine omp_set_nested_8 (nested)
269 logical (8), intent (in) :: nested
270 end subroutine omp_set_nested_8
271 end interface
273 interface omp_set_num_threads
274 subroutine omp_set_num_threads (num_threads)
275 integer (4), intent (in) :: num_threads
276 end subroutine omp_set_num_threads
277 subroutine omp_set_num_threads_8 (num_threads)
278 integer (8), intent (in) :: num_threads
279 end subroutine omp_set_num_threads_8
280 end interface
282 interface
283 function omp_get_dynamic ()
284 logical (4) :: omp_get_dynamic
285 end function omp_get_dynamic
286 end interface
288 interface
289 function omp_get_nested ()
290 logical (4) :: omp_get_nested
291 end function omp_get_nested
292 end interface
294 interface
295 function omp_in_parallel ()
296 logical (4) :: omp_in_parallel
297 end function omp_in_parallel
298 end interface
300 interface
301 function omp_test_lock (svar)
302 use omp_lib_kinds
303 logical (4) :: omp_test_lock
304 integer (omp_lock_kind), intent (inout) :: svar
305 end function omp_test_lock
306 end interface
308 interface
309 function omp_get_max_threads ()
310 integer (4) :: omp_get_max_threads
311 end function omp_get_max_threads
312 end interface
314 interface
315 function omp_get_num_procs ()
316 integer (4) :: omp_get_num_procs
317 end function omp_get_num_procs
318 end interface
320 interface
321 function omp_get_num_threads ()
322 integer (4) :: omp_get_num_threads
323 end function omp_get_num_threads
324 end interface
326 interface
327 function omp_get_thread_num ()
328 integer (4) :: omp_get_thread_num
329 end function omp_get_thread_num
330 end interface
332 interface
333 function omp_test_nest_lock (nvar)
334 use omp_lib_kinds
335 integer (4) :: omp_test_nest_lock
336 integer (omp_nest_lock_kind), intent (inout) :: nvar
337 end function omp_test_nest_lock
338 end interface
340 interface
341 function omp_get_wtick ()
342 double precision :: omp_get_wtick
343 end function omp_get_wtick
344 end interface
346 interface
347 function omp_get_wtime ()
348 double precision :: omp_get_wtime
349 end function omp_get_wtime
350 end interface
352 interface omp_set_schedule
353 subroutine omp_set_schedule (kind, chunk_size)
354 use omp_lib_kinds
355 integer (omp_sched_kind), intent (in) :: kind
356 integer (4), intent (in) :: chunk_size
357 end subroutine omp_set_schedule
358 subroutine omp_set_schedule_8 (kind, chunk_size)
359 use omp_lib_kinds
360 integer (omp_sched_kind), intent (in) :: kind
361 integer (8), intent (in) :: chunk_size
362 end subroutine omp_set_schedule_8
363 end interface
365 interface omp_get_schedule
366 subroutine omp_get_schedule (kind, chunk_size)
367 use omp_lib_kinds
368 integer (omp_sched_kind), intent (out) :: kind
369 integer (4), intent (out) :: chunk_size
370 end subroutine omp_get_schedule
371 subroutine omp_get_schedule_8 (kind, chunk_size)
372 use omp_lib_kinds
373 integer (omp_sched_kind), intent (out) :: kind
374 integer (8), intent (out) :: chunk_size
375 end subroutine omp_get_schedule_8
376 end interface
378 interface
379 function omp_get_thread_limit ()
380 integer (4) :: omp_get_thread_limit
381 end function omp_get_thread_limit
382 end interface
384 interface omp_set_max_active_levels
385 subroutine omp_set_max_active_levels (max_levels)
386 integer (4), intent (in) :: max_levels
387 end subroutine omp_set_max_active_levels
388 subroutine omp_set_max_active_levels_8 (max_levels)
389 integer (8), intent (in) :: max_levels
390 end subroutine omp_set_max_active_levels_8
391 end interface
393 interface
394 function omp_get_max_active_levels ()
395 integer (4) :: omp_get_max_active_levels
396 end function omp_get_max_active_levels
397 end interface
399 interface
400 function omp_get_supported_active_levels ()
401 integer (4) :: omp_get_supported_active_levels
402 end function omp_get_supported_active_levels
403 end interface
405 interface
406 function omp_get_level ()
407 integer (4) :: omp_get_level
408 end function omp_get_level
409 end interface
411 interface omp_get_ancestor_thread_num
412 function omp_get_ancestor_thread_num (level)
413 integer (4), intent (in) :: level
414 integer (4) :: omp_get_ancestor_thread_num
415 end function omp_get_ancestor_thread_num
416 function omp_get_ancestor_thread_num_8 (level)
417 integer (8), intent (in) :: level
418 integer (4) :: omp_get_ancestor_thread_num_8
419 end function omp_get_ancestor_thread_num_8
420 end interface
422 interface omp_get_team_size
423 function omp_get_team_size (level)
424 integer (4), intent (in) :: level
425 integer (4) :: omp_get_team_size
426 end function omp_get_team_size
427 function omp_get_team_size_8 (level)
428 integer (8), intent (in) :: level
429 integer (4) :: omp_get_team_size_8
430 end function omp_get_team_size_8
431 end interface
433 interface
434 function omp_get_active_level ()
435 integer (4) :: omp_get_active_level
436 end function omp_get_active_level
437 end interface
439 interface
440 function omp_in_final ()
441 logical (4) :: omp_in_final
442 end function omp_in_final
443 end interface
445 interface
446 function omp_get_cancellation ()
447 logical (4) :: omp_get_cancellation
448 end function omp_get_cancellation
449 end interface
451 interface
452 function omp_get_proc_bind ()
453 use omp_lib_kinds
454 integer (omp_proc_bind_kind) :: omp_get_proc_bind
455 end function omp_get_proc_bind
456 end interface
458 interface
459 function omp_get_num_places ()
460 integer (4) :: omp_get_num_places
461 end function omp_get_num_places
462 end interface
464 interface omp_get_place_num_procs
465 function omp_get_place_num_procs (place_num)
466 integer (4), intent(in) :: place_num
467 integer (4) :: omp_get_place_num_procs
468 end function omp_get_place_num_procs
470 function omp_get_place_num_procs_8 (place_num)
471 integer (8), intent(in) :: place_num
472 integer (4) :: omp_get_place_num_procs_8
473 end function omp_get_place_num_procs_8
474 end interface
476 interface omp_get_place_proc_ids
477 subroutine omp_get_place_proc_ids (place_num, ids)
478 integer (4), intent(in) :: place_num
479 integer (4), intent(out) :: ids(*)
480 end subroutine omp_get_place_proc_ids
482 subroutine omp_get_place_proc_ids_8 (place_num, ids)
483 integer (8), intent(in) :: place_num
484 integer (8), intent(out) :: ids(*)
485 end subroutine omp_get_place_proc_ids_8
486 end interface
488 interface
489 function omp_get_place_num ()
490 integer (4) :: omp_get_place_num
491 end function omp_get_place_num
492 end interface
494 interface
495 function omp_get_partition_num_places ()
496 integer (4) :: omp_get_partition_num_places
497 end function omp_get_partition_num_places
498 end interface
500 interface omp_get_partition_place_nums
501 subroutine omp_get_partition_place_nums (place_nums)
502 integer (4), intent(out) :: place_nums(*)
503 end subroutine omp_get_partition_place_nums
505 subroutine omp_get_partition_place_nums_8 (place_nums)
506 integer (8), intent(out) :: place_nums(*)
507 end subroutine omp_get_partition_place_nums_8
508 end interface
510 interface omp_set_default_device
511 subroutine omp_set_default_device (device_num)
512 integer (4), intent (in) :: device_num
513 end subroutine omp_set_default_device
514 subroutine omp_set_default_device_8 (device_num)
515 integer (8), intent (in) :: device_num
516 end subroutine omp_set_default_device_8
517 end interface
519 interface
520 function omp_get_default_device ()
521 integer (4) :: omp_get_default_device
522 end function omp_get_default_device
523 end interface
525 interface
526 function omp_get_num_devices ()
527 integer (4) :: omp_get_num_devices
528 end function omp_get_num_devices
529 end interface
531 interface
532 function omp_get_num_teams ()
533 integer (4) :: omp_get_num_teams
534 end function omp_get_num_teams
535 end interface
537 interface
538 function omp_get_team_num ()
539 integer (4) :: omp_get_team_num
540 end function omp_get_team_num
541 end interface
543 interface
544 function omp_is_initial_device ()
545 logical (4) :: omp_is_initial_device
546 end function omp_is_initial_device
547 end interface
549 interface
550 function omp_get_initial_device ()
551 integer (4) :: omp_get_initial_device
552 end function omp_get_initial_device
553 end interface
555 interface
556 function omp_get_device_num ()
557 integer (4) :: omp_get_device_num
558 end function omp_get_device_num
559 end interface
561 interface
562 function omp_get_max_task_priority ()
563 integer (4) :: omp_get_max_task_priority
564 end function omp_get_max_task_priority
565 end interface
567 interface omp_set_num_teams
568 subroutine omp_set_num_teams (num_teams)
569 integer (4), intent (in) :: num_teams
570 end subroutine omp_set_num_teams
571 subroutine omp_set_num_teams_8 (num_teams)
572 integer (8), intent (in) :: num_teams
573 end subroutine omp_set_num_teams_8
574 end interface
576 interface
577 function omp_get_max_teams ()
578 integer (4) :: omp_get_max_teams
579 end function omp_get_max_teams
580 end interface
582 interface omp_set_teams_thread_limit
583 subroutine omp_set_teams_thread_limit (thread_limit)
584 integer (4), intent (in) :: thread_limit
585 end subroutine omp_set_teams_thread_limit
586 subroutine omp_set_teams_thread_limit_8 (thread_limit)
587 integer (8), intent (in) :: thread_limit
588 end subroutine omp_set_teams_thread_limit_8
589 end interface
591 interface
592 function omp_get_teams_thread_limit ()
593 integer (4) :: omp_get_teams_thread_limit
594 end function omp_get_teams_thread_limit
595 end interface
597 interface
598 subroutine omp_fulfill_event (event)
599 use omp_lib_kinds
600 integer (kind=omp_event_handle_kind), &
601 value, intent(in) :: event
602 end subroutine omp_fulfill_event
603 end interface
605 interface
606 subroutine omp_set_affinity_format (format)
607 character(len=*), intent(in) :: format
608 end subroutine omp_set_affinity_format
609 end interface
611 interface
612 function omp_get_affinity_format (buffer)
613 integer (4) :: omp_get_affinity_format
614 character(len=*), intent(out) :: buffer
615 end function omp_get_affinity_format
616 end interface
618 interface
619 subroutine omp_display_affinity (format)
620 character(len=*), intent(in) :: format
621 end subroutine omp_display_affinity
622 end interface
624 interface
625 function omp_capture_affinity (buffer, format)
626 integer (4) :: omp_capture_affinity
627 character(len=*), intent(out) :: buffer
628 character(len=*), intent(in) :: format
629 end function omp_capture_affinity
630 end interface
632 interface
633 function omp_pause_resource (kind, device_num)
634 use omp_lib_kinds
635 integer (4) :: omp_pause_resource
636 integer (kind=omp_pause_resource_kind), &
637 intent(in) :: kind
638 integer (4) :: device_num
639 end function
640 end interface
642 interface
643 function omp_pause_resource_all (kind)
644 use omp_lib_kinds
645 integer (4) :: omp_pause_resource_all
646 integer (kind=omp_pause_resource_kind), &
647 intent(in) :: kind
648 end function
649 end interface
651 interface omp_init_allocator
652 function omp_init_allocator (memspace, ntraits, traits)
653 use omp_lib_kinds
654 integer (kind=omp_allocator_handle_kind) omp_init_allocator
655 integer (kind=omp_memspace_handle_kind), &
656 intent(in) :: memspace
657 integer (4), intent(in) :: ntraits
658 type (omp_alloctrait), intent(in) :: traits(*)
659 end function
660 function omp_init_allocator_8 (memspace, ntraits, traits)
661 use omp_lib_kinds
662 integer (kind=omp_allocator_handle_kind) omp_init_allocator_8
663 integer (kind=omp_memspace_handle_kind), &
664 intent(in) :: memspace
665 integer (8), intent(in) :: ntraits
666 type (omp_alloctrait), intent(in) :: traits(*)
667 end function
668 end interface
670 interface
671 subroutine omp_destroy_allocator (allocator)
672 use omp_lib_kinds
673 integer (kind=omp_allocator_handle_kind), &
674 intent(in) :: allocator
675 end subroutine
676 end interface
678 interface
679 subroutine omp_set_default_allocator (allocator)
680 use omp_lib_kinds
681 integer (kind=omp_allocator_handle_kind), &
682 intent(in) :: allocator
683 end subroutine
684 end interface
686 interface
687 function omp_get_default_allocator ()
688 use omp_lib_kinds
689 integer (kind=omp_allocator_handle_kind) &
690 omp_get_default_allocator
691 end function
692 end interface
694 interface omp_display_env
695 subroutine omp_display_env (verbose)
696 logical (4),intent (in) :: verbose
697 end subroutine omp_display_env
698 subroutine omp_display_env_8 (verbose)
699 logical (8),intent (in) :: verbose
700 end subroutine omp_display_env_8
701 end interface
703 interface
704 function omp_alloc (size, allocator) bind(c)
705 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
706 import :: omp_allocator_handle_kind
707 type(c_ptr) :: omp_alloc
708 integer(c_size_t), value :: size
709 integer(omp_allocator_handle_kind), value :: allocator
710 end function omp_alloc
711 end interface
713 interface
714 function omp_aligned_alloc (alignment, size, allocator) bind(c)
715 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
716 import :: omp_allocator_handle_kind
717 type(c_ptr) :: omp_aligned_alloc
718 integer(c_size_t), value :: alignment, size
719 integer(omp_allocator_handle_kind), value :: allocator
720 end function omp_aligned_alloc
721 end interface
723 interface
724 subroutine omp_free(ptr, allocator) bind(c)
725 use, intrinsic :: iso_c_binding, only : c_ptr
726 import :: omp_allocator_handle_kind
727 type(c_ptr), value :: ptr
728 integer(omp_allocator_handle_kind), value :: allocator
729 end subroutine omp_free
730 end interface
732 interface
733 function omp_calloc (nmemb, size, allocator) bind(c)
734 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
735 import :: omp_allocator_handle_kind
736 type(c_ptr) :: omp_calloc
737 integer(c_size_t), value :: nmemb, size
738 integer(omp_allocator_handle_kind), value :: allocator
739 end function omp_calloc
740 end interface
742 interface
743 function omp_aligned_calloc (alignment, nmemb, size, allocator) bind(c)
744 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
745 import :: omp_allocator_handle_kind
746 type(c_ptr) :: omp_aligned_calloc
747 integer(c_size_t), value :: alignment, nmemb, size
748 integer(omp_allocator_handle_kind), value :: allocator
749 end function omp_aligned_calloc
750 end interface
752 interface
753 function omp_realloc (ptr, size, allocator, free_allocator) bind(c)
754 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
755 import :: omp_allocator_handle_kind
756 type(c_ptr) :: omp_realloc
757 type(c_ptr), value :: ptr
758 integer(c_size_t), value :: size
759 integer(omp_allocator_handle_kind), value :: allocator, free_allocator
760 end function omp_realloc
761 end interface
763 interface
764 function omp_target_alloc (size, device_num) bind(c)
765 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
766 type(c_ptr) :: omp_target_alloc
767 integer(c_size_t), value :: size
768 integer(c_int), value :: device_num
769 end function omp_target_alloc
770 end interface
772 interface
773 subroutine omp_target_free (device_ptr, device_num) bind(c)
774 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
775 type(c_ptr), value :: device_ptr
776 integer(c_int), value :: device_num
777 end subroutine omp_target_free
778 end interface
780 interface
781 function omp_target_is_present (ptr, device_num) bind(c)
782 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
783 integer(c_int) :: omp_target_is_present
784 type(c_ptr), value :: ptr
785 integer(c_int), value :: device_num
786 end function omp_target_is_present
787 end interface
789 interface
790 function omp_target_memcpy (dst, src, length, dst_offset, &
791 src_offset, dst_device_num, &
792 src_device_num) bind(c)
793 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
794 integer(c_int) :: omp_target_memcpy
795 type(c_ptr), value :: dst, src
796 integer(c_size_t), value :: length, dst_offset, src_offset
797 integer(c_int), value :: dst_device_num, src_device_num
798 end function omp_target_memcpy
799 end interface
801 interface
802 function omp_target_memcpy_rect (dst,src,element_size, num_dims, &
803 volume, dst_offsets, src_offsets, &
804 dst_dimensions, src_dimensions, &
805 dst_device_num, src_device_num) &
806 bind(c)
807 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
808 integer(c_int) :: omp_target_memcpy_rect
809 type(c_ptr), value :: dst, src
810 integer(c_size_t), value :: element_size
811 integer(c_int), value :: num_dims, dst_device_num, src_device_num
812 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
813 src_offsets(*), dst_dimensions(*), &
814 src_dimensions(*)
815 end function omp_target_memcpy_rect
816 end interface
818 interface
819 function omp_target_associate_ptr (host_ptr, device_ptr, size, &
820 device_offset, device_num) bind(c)
821 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
822 integer(c_int) :: omp_target_associate_ptr
823 type(c_ptr), value :: host_ptr, device_ptr
824 integer(c_size_t), value :: size, device_offset
825 integer(c_int), value :: device_num
826 end function omp_target_associate_ptr
827 end interface
829 interface
830 function omp_target_disassociate_ptr (ptr, device_num) bind(c)
831 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
832 integer(c_int) :: omp_target_disassociate_ptr
833 type(c_ptr), value :: ptr
834 integer(c_int), value :: device_num
835 end function omp_target_disassociate_ptr
836 end interface
838 #if _OPENMP >= 201811
839 !GCC$ ATTRIBUTES DEPRECATED :: omp_get_nested, omp_set_nested
840 #endif
842 #if _OPENMP >= 202011
843 !GCC$ ATTRIBUTES DEPRECATED :: omp_proc_bind_master, omp_atv_sequential
844 #endif
846 end module omp_lib