]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/omp_lib.f90.in
Daily bump.
[thirdparty/gcc.git] / libgomp / omp_lib.f90.in
1 ! Copyright (C) 2005-2024 Free Software Foundation, Inc.
2 ! Contributed by Jakub Jelinek <jakub@redhat.com>.
3
4 ! This file is part of the GNU Offloading and Multi Processing Library
5 ! (libgomp).
6
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.
11
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.
16
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.
20
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/>.
25
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
173
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
179
180 module omp_lib
181 use omp_lib_kinds
182 implicit none
183 integer, parameter :: openmp_version = 201511
184
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
191
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
199
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
206
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
214
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
221
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
228
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
235
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
242
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
249
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
256
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
265
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
274
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
283
284 interface
285 function omp_get_dynamic ()
286 logical (4) :: omp_get_dynamic
287 end function omp_get_dynamic
288 end interface
289
290 interface
291 function omp_get_nested ()
292 logical (4) :: omp_get_nested
293 end function omp_get_nested
294 end interface
295
296 interface
297 function omp_in_parallel ()
298 logical (4) :: omp_in_parallel
299 end function omp_in_parallel
300 end interface
301
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
309
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
315
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
321
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
327
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
333
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
341
342 interface
343 function omp_get_wtick ()
344 double precision :: omp_get_wtick
345 end function omp_get_wtick
346 end interface
347
348 interface
349 function omp_get_wtime ()
350 double precision :: omp_get_wtime
351 end function omp_get_wtime
352 end interface
353
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
366
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
379
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
385
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
394
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
400
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
406
407 interface
408 function omp_get_level ()
409 integer (4) :: omp_get_level
410 end function omp_get_level
411 end interface
412
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
423
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
434
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
440
441 interface
442 function omp_in_final ()
443 logical (4) :: omp_in_final
444 end function omp_in_final
445 end interface
446
447 interface
448 function omp_in_explicit_task ()
449 logical (4) :: omp_in_explicit_task
450 end function omp_in_explicit_task
451 end interface
452
453 interface
454 function omp_get_cancellation ()
455 logical (4) :: omp_get_cancellation
456 end function omp_get_cancellation
457 end interface
458
459 interface
460 function omp_get_proc_bind ()
461 use omp_lib_kinds
462 integer (omp_proc_bind_kind) :: omp_get_proc_bind
463 end function omp_get_proc_bind
464 end interface
465
466 interface
467 function omp_get_num_places ()
468 integer (4) :: omp_get_num_places
469 end function omp_get_num_places
470 end interface
471
472 interface omp_get_place_num_procs
473 function omp_get_place_num_procs (place_num)
474 integer (4), intent(in) :: place_num
475 integer (4) :: omp_get_place_num_procs
476 end function omp_get_place_num_procs
477
478 function omp_get_place_num_procs_8 (place_num)
479 integer (8), intent(in) :: place_num
480 integer (4) :: omp_get_place_num_procs_8
481 end function omp_get_place_num_procs_8
482 end interface
483
484 interface omp_get_place_proc_ids
485 subroutine omp_get_place_proc_ids (place_num, ids)
486 integer (4), intent(in) :: place_num
487 integer (4), intent(out) :: ids(*)
488 end subroutine omp_get_place_proc_ids
489
490 subroutine omp_get_place_proc_ids_8 (place_num, ids)
491 integer (8), intent(in) :: place_num
492 integer (8), intent(out) :: ids(*)
493 end subroutine omp_get_place_proc_ids_8
494 end interface
495
496 interface
497 function omp_get_place_num ()
498 integer (4) :: omp_get_place_num
499 end function omp_get_place_num
500 end interface
501
502 interface
503 function omp_get_partition_num_places ()
504 integer (4) :: omp_get_partition_num_places
505 end function omp_get_partition_num_places
506 end interface
507
508 interface omp_get_partition_place_nums
509 subroutine omp_get_partition_place_nums (place_nums)
510 integer (4), intent(out) :: place_nums(*)
511 end subroutine omp_get_partition_place_nums
512
513 subroutine omp_get_partition_place_nums_8 (place_nums)
514 integer (8), intent(out) :: place_nums(*)
515 end subroutine omp_get_partition_place_nums_8
516 end interface
517
518 interface omp_set_default_device
519 subroutine omp_set_default_device (device_num)
520 integer (4), intent (in) :: device_num
521 end subroutine omp_set_default_device
522 subroutine omp_set_default_device_8 (device_num)
523 integer (8), intent (in) :: device_num
524 end subroutine omp_set_default_device_8
525 end interface
526
527 interface
528 function omp_get_default_device ()
529 integer (4) :: omp_get_default_device
530 end function omp_get_default_device
531 end interface
532
533 interface
534 function omp_get_num_devices ()
535 integer (4) :: omp_get_num_devices
536 end function omp_get_num_devices
537 end interface
538
539 interface
540 function omp_get_num_teams ()
541 integer (4) :: omp_get_num_teams
542 end function omp_get_num_teams
543 end interface
544
545 interface
546 function omp_get_team_num ()
547 integer (4) :: omp_get_team_num
548 end function omp_get_team_num
549 end interface
550
551 interface
552 function omp_is_initial_device ()
553 logical (4) :: omp_is_initial_device
554 end function omp_is_initial_device
555 end interface
556
557 interface
558 function omp_get_initial_device ()
559 integer (4) :: omp_get_initial_device
560 end function omp_get_initial_device
561 end interface
562
563 interface
564 function omp_get_device_num ()
565 integer (4) :: omp_get_device_num
566 end function omp_get_device_num
567 end interface
568
569 interface
570 function omp_get_max_task_priority ()
571 integer (4) :: omp_get_max_task_priority
572 end function omp_get_max_task_priority
573 end interface
574
575 interface omp_set_num_teams
576 subroutine omp_set_num_teams (num_teams)
577 integer (4), intent (in) :: num_teams
578 end subroutine omp_set_num_teams
579 subroutine omp_set_num_teams_8 (num_teams)
580 integer (8), intent (in) :: num_teams
581 end subroutine omp_set_num_teams_8
582 end interface
583
584 interface
585 function omp_get_max_teams ()
586 integer (4) :: omp_get_max_teams
587 end function omp_get_max_teams
588 end interface
589
590 interface omp_set_teams_thread_limit
591 subroutine omp_set_teams_thread_limit (thread_limit)
592 integer (4), intent (in) :: thread_limit
593 end subroutine omp_set_teams_thread_limit
594 subroutine omp_set_teams_thread_limit_8 (thread_limit)
595 integer (8), intent (in) :: thread_limit
596 end subroutine omp_set_teams_thread_limit_8
597 end interface
598
599 interface
600 function omp_get_teams_thread_limit ()
601 integer (4) :: omp_get_teams_thread_limit
602 end function omp_get_teams_thread_limit
603 end interface
604
605 interface
606 subroutine omp_fulfill_event (event)
607 use omp_lib_kinds
608 integer (kind=omp_event_handle_kind), &
609 value, intent(in) :: event
610 end subroutine omp_fulfill_event
611 end interface
612
613 interface
614 subroutine omp_set_affinity_format (format)
615 character(len=*), intent(in) :: format
616 end subroutine omp_set_affinity_format
617 end interface
618
619 interface
620 function omp_get_affinity_format (buffer)
621 integer (4) :: omp_get_affinity_format
622 character(len=*), intent(out) :: buffer
623 end function omp_get_affinity_format
624 end interface
625
626 interface
627 subroutine omp_display_affinity (format)
628 character(len=*), intent(in) :: format
629 end subroutine omp_display_affinity
630 end interface
631
632 interface
633 function omp_capture_affinity (buffer, format)
634 integer (4) :: omp_capture_affinity
635 character(len=*), intent(out) :: buffer
636 character(len=*), intent(in) :: format
637 end function omp_capture_affinity
638 end interface
639
640 interface
641 function omp_pause_resource (kind, device_num)
642 use omp_lib_kinds
643 integer (4) :: omp_pause_resource
644 integer (kind=omp_pause_resource_kind), &
645 intent(in) :: kind
646 integer (4) :: device_num
647 end function
648 end interface
649
650 interface
651 function omp_pause_resource_all (kind)
652 use omp_lib_kinds
653 integer (4) :: omp_pause_resource_all
654 integer (kind=omp_pause_resource_kind), &
655 intent(in) :: kind
656 end function
657 end interface
658
659 interface omp_init_allocator
660 function omp_init_allocator (memspace, ntraits, traits)
661 use omp_lib_kinds
662 integer (kind=omp_allocator_handle_kind) omp_init_allocator
663 integer (kind=omp_memspace_handle_kind), &
664 intent(in) :: memspace
665 integer (4), intent(in) :: ntraits
666 type (omp_alloctrait), intent(in) :: traits(*)
667 end function
668 function omp_init_allocator_8 (memspace, ntraits, traits)
669 use omp_lib_kinds
670 integer (kind=omp_allocator_handle_kind) omp_init_allocator_8
671 integer (kind=omp_memspace_handle_kind), &
672 intent(in) :: memspace
673 integer (8), intent(in) :: ntraits
674 type (omp_alloctrait), intent(in) :: traits(*)
675 end function
676 end interface
677
678 interface
679 subroutine omp_destroy_allocator (allocator)
680 use omp_lib_kinds
681 integer (kind=omp_allocator_handle_kind), &
682 intent(in) :: allocator
683 end subroutine
684 end interface
685
686 interface
687 subroutine omp_set_default_allocator (allocator)
688 use omp_lib_kinds
689 integer (kind=omp_allocator_handle_kind), &
690 intent(in) :: allocator
691 end subroutine
692 end interface
693
694 interface
695 function omp_get_default_allocator ()
696 use omp_lib_kinds
697 integer (kind=omp_allocator_handle_kind) &
698 omp_get_default_allocator
699 end function
700 end interface
701
702 interface omp_display_env
703 subroutine omp_display_env (verbose)
704 logical (4),intent (in) :: verbose
705 end subroutine omp_display_env
706 subroutine omp_display_env_8 (verbose)
707 logical (8),intent (in) :: verbose
708 end subroutine omp_display_env_8
709 end interface
710
711 interface
712 function omp_alloc (size, allocator) bind(c)
713 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
714 import :: omp_allocator_handle_kind
715 type(c_ptr) :: omp_alloc
716 integer(c_size_t), value :: size
717 integer(omp_allocator_handle_kind), value :: allocator
718 end function omp_alloc
719 end interface
720
721 interface
722 function omp_aligned_alloc (alignment, size, allocator) bind(c)
723 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
724 import :: omp_allocator_handle_kind
725 type(c_ptr) :: omp_aligned_alloc
726 integer(c_size_t), value :: alignment, size
727 integer(omp_allocator_handle_kind), value :: allocator
728 end function omp_aligned_alloc
729 end interface
730
731 interface
732 subroutine omp_free(ptr, allocator) bind(c)
733 use, intrinsic :: iso_c_binding, only : c_ptr
734 import :: omp_allocator_handle_kind
735 type(c_ptr), value :: ptr
736 integer(omp_allocator_handle_kind), value :: allocator
737 end subroutine omp_free
738 end interface
739
740 interface
741 function omp_calloc (nmemb, size, allocator) bind(c)
742 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
743 import :: omp_allocator_handle_kind
744 type(c_ptr) :: omp_calloc
745 integer(c_size_t), value :: nmemb, size
746 integer(omp_allocator_handle_kind), value :: allocator
747 end function omp_calloc
748 end interface
749
750 interface
751 function omp_aligned_calloc (alignment, nmemb, size, allocator) bind(c)
752 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
753 import :: omp_allocator_handle_kind
754 type(c_ptr) :: omp_aligned_calloc
755 integer(c_size_t), value :: alignment, nmemb, size
756 integer(omp_allocator_handle_kind), value :: allocator
757 end function omp_aligned_calloc
758 end interface
759
760 interface
761 function omp_realloc (ptr, size, allocator, free_allocator) bind(c)
762 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
763 import :: omp_allocator_handle_kind
764 type(c_ptr) :: omp_realloc
765 type(c_ptr), value :: ptr
766 integer(c_size_t), value :: size
767 integer(omp_allocator_handle_kind), value :: allocator, free_allocator
768 end function omp_realloc
769 end interface
770
771 interface
772 function omp_target_alloc (size, device_num) bind(c)
773 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
774 type(c_ptr) :: omp_target_alloc
775 integer(c_size_t), value :: size
776 integer(c_int), value :: device_num
777 end function omp_target_alloc
778 end interface
779
780 interface
781 subroutine omp_target_free (device_ptr, device_num) bind(c)
782 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
783 type(c_ptr), value :: device_ptr
784 integer(c_int), value :: device_num
785 end subroutine omp_target_free
786 end interface
787
788 interface
789 function omp_target_is_present (ptr, device_num) bind(c)
790 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
791 integer(c_int) :: omp_target_is_present
792 type(c_ptr), value :: ptr
793 integer(c_int), value :: device_num
794 end function omp_target_is_present
795 end interface
796
797 interface
798 function omp_target_memcpy (dst, src, length, dst_offset, &
799 src_offset, dst_device_num, &
800 src_device_num) bind(c)
801 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
802 integer(c_int) :: omp_target_memcpy
803 type(c_ptr), value :: dst, src
804 integer(c_size_t), value :: length, dst_offset, src_offset
805 integer(c_int), value :: dst_device_num, src_device_num
806 end function omp_target_memcpy
807 end interface
808
809 interface
810 function omp_target_memcpy_async (dst, src, length, dst_offset, &
811 src_offset, dst_device_num, &
812 src_device_num, depobj_count, &
813 depobj_list) bind(c)
814 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
815 import :: omp_depend_kind
816 integer(c_int) :: omp_target_memcpy_async
817 type(c_ptr), value :: dst, src
818 integer(c_size_t), value :: length, dst_offset, src_offset
819 integer(c_int), value :: dst_device_num, src_device_num, &
820 depobj_count
821 integer(omp_depend_kind), optional :: depobj_list(*)
822 end function omp_target_memcpy_async
823 end interface
824
825 interface
826 function omp_target_memcpy_rect (dst,src,element_size, num_dims, &
827 volume, dst_offsets, src_offsets, &
828 dst_dimensions, src_dimensions, &
829 dst_device_num, src_device_num) &
830 bind(c)
831 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
832 integer(c_int) :: omp_target_memcpy_rect
833 type(c_ptr), value :: dst, src
834 integer(c_size_t), value :: element_size
835 integer(c_int), value :: num_dims, dst_device_num, src_device_num
836 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
837 src_offsets(*), dst_dimensions(*), &
838 src_dimensions(*)
839 end function omp_target_memcpy_rect
840 end interface
841
842 interface
843 function omp_target_memcpy_rect_async (dst,src,element_size, &
844 num_dims, volume, &
845 dst_offsets, src_offsets, &
846 dst_dimensions, &
847 src_dimensions, &
848 dst_device_num, &
849 src_device_num, &
850 depobj_count, &
851 depobj_list) bind(c)
852 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
853 import :: omp_depend_kind
854 integer(c_int) :: omp_target_memcpy_rect_async
855 type(c_ptr), value :: dst, src
856 integer(c_size_t), value :: element_size
857 integer(c_int), value :: num_dims, dst_device_num, src_device_num, &
858 depobj_count
859 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*), &
860 src_offsets(*), dst_dimensions(*), &
861 src_dimensions(*)
862 integer(omp_depend_kind), optional :: depobj_list(*)
863 end function omp_target_memcpy_rect_async
864 end interface
865
866 interface
867 function omp_target_associate_ptr (host_ptr, device_ptr, size, &
868 device_offset, device_num) bind(c)
869 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
870 integer(c_int) :: omp_target_associate_ptr
871 type(c_ptr), value :: host_ptr, device_ptr
872 integer(c_size_t), value :: size, device_offset
873 integer(c_int), value :: device_num
874 end function omp_target_associate_ptr
875 end interface
876
877 interface
878 function omp_target_disassociate_ptr (ptr, device_num) bind(c)
879 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
880 integer(c_int) :: omp_target_disassociate_ptr
881 type(c_ptr), value :: ptr
882 integer(c_int), value :: device_num
883 end function omp_target_disassociate_ptr
884 end interface
885
886 interface
887 function omp_get_mapped_ptr (ptr, device_num) bind(c)
888 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
889 type(c_ptr) :: omp_get_mapped_ptr
890 type(c_ptr), value :: ptr
891 integer(c_int), value :: device_num
892 end function omp_get_mapped_ptr
893 end interface
894
895 interface
896 function omp_target_is_accessible (ptr, size, device_num) bind(c)
897 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
898 integer(c_int) :: omp_target_is_accessible
899 type(c_ptr), value :: ptr
900 integer(c_size_t), value :: size
901 integer(c_int), value :: device_num
902 end function omp_target_is_accessible
903 end interface
904
905 #if _OPENMP >= 201811
906 !GCC$ ATTRIBUTES DEPRECATED :: omp_get_nested, omp_set_nested
907 !GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_kind, omp_lock_hint_none
908 !GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_uncontended, omp_lock_hint_contended
909 !GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_nonspeculative
910 !GCC$ ATTRIBUTES DEPRECATED :: omp_lock_hint_speculative
911 #endif
912
913 #if _OPENMP >= 202011
914 !GCC$ ATTRIBUTES DEPRECATED :: omp_proc_bind_master, omp_atv_sequential
915 #endif
916
917 end module omp_lib