Daily bump.
[gcc.git] / libgomp / omp_lib.h.in
blobfcfc737243c200ae95545084c882d98d456702ad
1 ! Copyright (C) 2005-2024 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 integer omp_lock_kind, omp_nest_lock_kind, openmp_version
27 parameter (omp_lock_kind = @OMP_LOCK_KIND@)
28 parameter (omp_nest_lock_kind = @OMP_NEST_LOCK_KIND@)
29 integer omp_depend_kind
30 parameter (omp_depend_kind = @OMP_DEPEND_KIND@)
31 integer omp_sched_kind
32 parameter (omp_sched_kind = 4)
33 integer (omp_sched_kind) omp_sched_static, omp_sched_dynamic
34 integer (omp_sched_kind) omp_sched_guided, omp_sched_auto
35 parameter (omp_sched_static = 1)
36 parameter (omp_sched_dynamic = 2)
37 parameter (omp_sched_guided = 3)
38 parameter (omp_sched_auto = 4)
39 integer omp_proc_bind_kind
40 parameter (omp_proc_bind_kind = 4)
41 integer (omp_proc_bind_kind) omp_proc_bind_false
42 integer (omp_proc_bind_kind) omp_proc_bind_true
43 integer (omp_proc_bind_kind) omp_proc_bind_primary
44 integer (omp_proc_bind_kind) omp_proc_bind_master
45 integer (omp_proc_bind_kind) omp_proc_bind_close
46 integer (omp_proc_bind_kind) omp_proc_bind_spread
47 parameter (omp_proc_bind_false = 0)
48 parameter (omp_proc_bind_true = 1)
49 parameter (omp_proc_bind_primary = 2)
50 parameter (omp_proc_bind_master = 2)
51 parameter (omp_proc_bind_close = 3)
52 parameter (omp_proc_bind_spread = 4)
53 integer omp_sync_hint_kind
54 integer omp_lock_hint_kind
55 parameter (omp_sync_hint_kind = 4)
56 parameter (omp_lock_hint_kind = omp_sync_hint_kind)
57 integer (omp_sync_hint_kind) omp_sync_hint_none
58 integer (omp_lock_hint_kind) omp_lock_hint_none
59 integer (omp_sync_hint_kind) omp_sync_hint_uncontended
60 integer (omp_lock_hint_kind) omp_lock_hint_uncontended
61 integer (omp_sync_hint_kind) omp_sync_hint_contended
62 integer (omp_sync_hint_kind) omp_lock_hint_contended
63 integer (omp_lock_hint_kind) omp_sync_hint_nonspeculative
64 integer (omp_lock_hint_kind) omp_lock_hint_nonspeculative
65 integer (omp_sync_hint_kind) omp_sync_hint_speculative
66 integer (omp_lock_hint_kind) omp_lock_hint_speculative
67 parameter (omp_sync_hint_none = 0)
68 parameter (omp_lock_hint_none = 0)
69 parameter (omp_sync_hint_uncontended = 1)
70 parameter (omp_lock_hint_uncontended = 1)
71 parameter (omp_sync_hint_contended = 2)
72 parameter (omp_lock_hint_contended = 2)
73 parameter (omp_sync_hint_nonspeculative = 4)
74 parameter (omp_lock_hint_nonspeculative = 4)
75 parameter (omp_sync_hint_speculative = 8)
76 parameter (omp_lock_hint_speculative = 8)
77 parameter (openmp_version = 201511)
78 integer omp_pause_resource_kind
79 parameter (omp_pause_resource_kind = 4)
80 integer (omp_pause_resource_kind) omp_pause_soft
81 integer (omp_pause_resource_kind) omp_pause_hard
82 parameter (omp_pause_soft = 1)
83 parameter (omp_pause_hard = 2)
85 integer omp_allocator_handle_kind, omp_alloctrait_key_kind
86 integer omp_alloctrait_val_kind, omp_memspace_handle_kind
87 integer omp_event_handle_kind
88 integer omp_interop_kind, omp_interop_fr_kind
89 integer omp_interop_property_kind, omp_interop_rc_kind
90 parameter (omp_allocator_handle_kind = @INTPTR_T_KIND@)
91 parameter (omp_alloctrait_key_kind = 4)
92 parameter (omp_alloctrait_val_kind = @INTPTR_T_KIND@)
93 parameter (omp_memspace_handle_kind = @INTPTR_T_KIND@)
94 parameter (omp_event_handle_kind = @INTPTR_T_KIND@)
95 parameter (omp_interop_kind = @INTPTR_T_KIND@)
96 parameter (omp_interop_fr_kind = 4)
97 parameter (omp_interop_property_kind = 4)
98 parameter (omp_interop_rc_kind = 4)
99 integer (omp_alloctrait_key_kind) omp_atk_sync_hint
100 integer (omp_alloctrait_key_kind) omp_atk_alignment
101 integer (omp_alloctrait_key_kind) omp_atk_access
102 integer (omp_alloctrait_key_kind) omp_atk_pool_size
103 integer (omp_alloctrait_key_kind) omp_atk_fallback
104 integer (omp_alloctrait_key_kind) omp_atk_fb_data
105 integer (omp_alloctrait_key_kind) omp_atk_pinned
106 integer (omp_alloctrait_key_kind) omp_atk_partition
107 parameter (omp_atk_sync_hint = 1)
108 parameter (omp_atk_alignment = 2)
109 parameter (omp_atk_access = 3)
110 parameter (omp_atk_pool_size = 4)
111 parameter (omp_atk_fallback = 5)
112 parameter (omp_atk_fb_data = 6)
113 parameter (omp_atk_pinned = 7)
114 parameter (omp_atk_partition = 8)
115 integer (omp_alloctrait_val_kind) omp_atv_false
116 integer (omp_alloctrait_val_kind) omp_atv_true
117 integer (omp_alloctrait_val_kind) omp_atv_default
118 integer (omp_alloctrait_val_kind) omp_atv_contended
119 integer (omp_alloctrait_val_kind) omp_atv_uncontended
120 integer (omp_alloctrait_val_kind) omp_atv_serialized
121 integer (omp_alloctrait_val_kind) omp_atv_sequential
122 integer (omp_alloctrait_val_kind) omp_atv_private
123 integer (omp_alloctrait_val_kind) omp_atv_all
124 integer (omp_alloctrait_val_kind) omp_atv_thread
125 integer (omp_alloctrait_val_kind) omp_atv_pteam
126 integer (omp_alloctrait_val_kind) omp_atv_cgroup
127 integer (omp_alloctrait_val_kind) omp_atv_default_mem_fb
128 integer (omp_alloctrait_val_kind) omp_atv_null_fb
129 integer (omp_alloctrait_val_kind) omp_atv_abort_fb
130 integer (omp_alloctrait_val_kind) omp_atv_allocator_fb
131 integer (omp_alloctrait_val_kind) omp_atv_environment
132 integer (omp_alloctrait_val_kind) omp_atv_nearest
133 integer (omp_alloctrait_val_kind) omp_atv_blocked
134 integer (omp_alloctrait_val_kind) omp_atv_interleaved
135 parameter (omp_atv_default = -1)
136 parameter (omp_atv_false = 0)
137 parameter (omp_atv_true = 1)
138 parameter (omp_atv_contended = 3)
139 parameter (omp_atv_uncontended = 4)
140 parameter (omp_atv_serialized = 5)
141 parameter (omp_atv_sequential = omp_atv_serialized)
142 parameter (omp_atv_private = 6)
143 parameter (omp_atv_all = 7)
144 parameter (omp_atv_thread = 8)
145 parameter (omp_atv_pteam = 9)
146 parameter (omp_atv_cgroup = 10)
147 parameter (omp_atv_default_mem_fb = 11)
148 parameter (omp_atv_null_fb = 12)
149 parameter (omp_atv_abort_fb = 13)
150 parameter (omp_atv_allocator_fb = 14)
151 parameter (omp_atv_environment = 15)
152 parameter (omp_atv_nearest = 16)
153 parameter (omp_atv_blocked = 17)
154 parameter (omp_atv_interleaved = 18)
155 integer (omp_allocator_handle_kind) omp_null_allocator
156 integer (omp_allocator_handle_kind) omp_default_mem_alloc
157 integer (omp_allocator_handle_kind) omp_large_cap_mem_alloc
158 integer (omp_allocator_handle_kind) omp_const_mem_alloc
159 integer (omp_allocator_handle_kind) omp_high_bw_mem_alloc
160 integer (omp_allocator_handle_kind) omp_low_lat_mem_alloc
161 integer (omp_allocator_handle_kind) omp_cgroup_mem_alloc
162 integer (omp_allocator_handle_kind) omp_pteam_mem_alloc
163 integer (omp_allocator_handle_kind) omp_thread_mem_alloc
164 integer (omp_allocator_handle_kind) ompx_gnu_pinned_mem_alloc
165 parameter (omp_null_allocator = 0)
166 parameter (omp_default_mem_alloc = 1)
167 parameter (omp_large_cap_mem_alloc = 2)
168 parameter (omp_const_mem_alloc = 3)
169 parameter (omp_high_bw_mem_alloc = 4)
170 parameter (omp_low_lat_mem_alloc = 5)
171 parameter (omp_cgroup_mem_alloc = 6)
172 parameter (omp_pteam_mem_alloc = 7)
173 parameter (omp_thread_mem_alloc = 8)
174 parameter (ompx_gnu_pinned_mem_alloc = 200)
175 integer (omp_memspace_handle_kind) omp_default_mem_space
176 integer (omp_memspace_handle_kind) omp_large_cap_mem_space
177 integer (omp_memspace_handle_kind) omp_const_mem_space
178 integer (omp_memspace_handle_kind) omp_high_bw_mem_space
179 integer (omp_memspace_handle_kind) omp_low_lat_mem_space
180 parameter (omp_default_mem_space = 0)
181 parameter (omp_large_cap_mem_space = 1)
182 parameter (omp_const_mem_space = 2)
183 parameter (omp_high_bw_mem_space = 3)
184 parameter (omp_low_lat_mem_space = 4)
185 integer omp_initial_device, omp_invalid_device
186 parameter (omp_initial_device = -1)
187 parameter (omp_invalid_device = -4)
188 integer (omp_interop_kind) omp_interop_none
189 parameter (omp_interop_none = 0_omp_interop_kind)
190 integer (omp_interop_fr_kind) omp_ifr_cuda
191 integer (omp_interop_fr_kind) omp_ifr_cuda_driver
192 integer (omp_interop_fr_kind) omp_ifr_opencl
193 integer (omp_interop_fr_kind) omp_ifr_sycl
194 integer (omp_interop_fr_kind) omp_ifr_hip
195 integer (omp_interop_fr_kind) omp_ifr_level_zero
196 integer (omp_interop_fr_kind) omp_ifr_hsa
197 integer (omp_interop_fr_kind) omp_ifr_last
198 parameter (omp_ifr_cuda = 1)
199 parameter (omp_ifr_cuda_driver = 2)
200 parameter (omp_ifr_opencl = 3)
201 parameter (omp_ifr_sycl = 4)
202 parameter (omp_ifr_hip = 5)
203 parameter (omp_ifr_level_zero = 6)
204 parameter (omp_ifr_hsa = 7)
205 parameter (omp_ifr_last = omp_ifr_hsa)
206 integer (omp_interop_property_kind) omp_ipr_fr_id
207 integer (omp_interop_property_kind) omp_ipr_fr_name
208 integer (omp_interop_property_kind) omp_ipr_vendor
209 integer (omp_interop_property_kind) omp_ipr_vendor_name
210 integer (omp_interop_property_kind) omp_ipr_device_num
211 integer (omp_interop_property_kind) omp_ipr_platform
212 integer (omp_interop_property_kind) omp_ipr_device
213 integer (omp_interop_property_kind) omp_ipr_device_context
214 integer (omp_interop_property_kind) omp_ipr_targetsync
215 integer (omp_interop_property_kind) omp_ipr_first
216 parameter (omp_ipr_fr_id = -1)
217 parameter (omp_ipr_fr_name = -2)
218 parameter (omp_ipr_vendor = -3)
219 parameter (omp_ipr_vendor_name = -4)
220 parameter (omp_ipr_device_num = -5)
221 parameter (omp_ipr_platform = -6)
222 parameter (omp_ipr_device = -7)
223 parameter (omp_ipr_device_context = -8)
224 parameter (omp_ipr_targetsync = -9)
225 parameter (omp_ipr_first = omp_ipr_targetsync)
226 integer (omp_interop_rc_kind) omp_irc_no_value
227 integer (omp_interop_rc_kind) omp_irc_success
228 integer (omp_interop_rc_kind) omp_irc_empty
229 integer (omp_interop_rc_kind) omp_irc_out_of_range
230 integer (omp_interop_rc_kind) omp_irc_type_int
231 integer (omp_interop_rc_kind) omp_irc_type_ptr
232 integer (omp_interop_rc_kind) omp_irc_type_str
233 integer (omp_interop_rc_kind) omp_irc_other
234 parameter (omp_irc_no_value = 1)
235 parameter (omp_irc_success = 0)
236 parameter (omp_irc_empty = -1)
237 parameter (omp_irc_out_of_range = -2)
238 parameter (omp_irc_type_int = -3)
239 parameter (omp_irc_type_ptr = -4)
240 parameter (omp_irc_type_str = -5)
241 parameter (omp_irc_other = -6)
243 type omp_alloctrait
244 integer (omp_alloctrait_key_kind) key
245 integer (omp_alloctrait_val_kind) value
246 end type omp_alloctrait
248 external omp_init_lock, omp_init_nest_lock
249 external omp_init_lock_with_hint
250 external omp_init_nest_lock_with_hint
251 external omp_destroy_lock, omp_destroy_nest_lock
252 external omp_set_lock, omp_set_nest_lock
253 external omp_unset_lock, omp_unset_nest_lock
254 external omp_set_dynamic, omp_set_nested
255 external omp_set_num_threads
257 external omp_get_dynamic, omp_get_nested
258 logical(4) omp_get_dynamic, omp_get_nested
259 external omp_test_lock, omp_in_parallel
260 logical(4) omp_test_lock, omp_in_parallel
262 external omp_get_max_threads, omp_get_num_procs
263 integer(4) omp_get_max_threads, omp_get_num_procs
264 external omp_get_num_threads, omp_get_thread_num
265 integer(4) omp_get_num_threads, omp_get_thread_num
266 external omp_test_nest_lock
267 integer(4) omp_test_nest_lock
269 external omp_get_wtick, omp_get_wtime
270 double precision omp_get_wtick, omp_get_wtime
272 external omp_set_schedule, omp_get_schedule
273 external omp_get_thread_limit, omp_set_max_active_levels
274 external omp_get_max_active_levels, omp_get_level
275 external omp_get_ancestor_thread_num, omp_get_team_size
276 external omp_get_active_level
277 external omp_get_supported_active_levels
278 integer(4) omp_get_thread_limit, omp_get_max_active_levels
279 integer(4) omp_get_level, omp_get_ancestor_thread_num
280 integer(4) omp_get_team_size, omp_get_active_level
281 integer(4) omp_get_supported_active_levels
283 external omp_in_final
284 logical(4) omp_in_final
285 external omp_in_explicit_task
286 logical(4) omp_in_explicit_task
288 external omp_get_cancellation
289 logical(4) omp_get_cancellation
291 external omp_get_proc_bind
292 integer(omp_proc_bind_kind) omp_get_proc_bind
294 integer(4) omp_get_num_places
295 external omp_get_num_places
296 integer(4) omp_get_place_num_procs
297 external omp_get_place_num_procs
298 external omp_get_place_proc_ids
299 integer(4) omp_get_place_num
300 external omp_get_place_num
301 integer(4) omp_get_partition_num_places
302 external omp_get_partition_num_places
303 external omp_get_partition_place_nums
305 external omp_set_default_device, omp_get_default_device
306 external omp_get_num_devices, omp_get_num_teams
307 external omp_get_team_num
308 integer(4) omp_get_default_device, omp_get_num_devices
309 integer(4) omp_get_num_teams, omp_get_team_num
311 external omp_is_initial_device
312 logical(4) omp_is_initial_device
313 external omp_get_initial_device
314 integer(4) omp_get_initial_device
316 external omp_get_device_num
317 integer(4) omp_get_device_num
319 external omp_get_max_task_priority
320 integer(4) omp_get_max_task_priority
322 external omp_set_num_teams, omp_set_teams_thread_limit
323 external omp_get_max_teams, omp_get_teams_thread_limit
324 integer(4) omp_get_max_teams, omp_get_teams_thread_limit
326 external omp_fulfill_event
328 external omp_set_affinity_format, omp_get_affinity_format
329 external omp_display_affinity, omp_capture_affinity
330 integer(4) omp_get_affinity_format
331 integer(4) omp_capture_affinity
333 external omp_pause_resource, omp_pause_resource_all
334 integer(4) omp_pause_resource
335 integer(4) omp_pause_resource_all
337 external omp_init_allocator
338 integer (omp_allocator_handle_kind) omp_init_allocator
339 external omp_destroy_allocator
340 external omp_set_default_allocator
341 external omp_get_default_allocator
342 integer (omp_allocator_handle_kind) omp_get_default_allocator
344 external omp_display_env
346 interface
347 function omp_alloc (size, allocator) bind(c)
348 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
349 use, intrinsic :: omp_lib_kinds
350 type(c_ptr) :: omp_alloc
351 integer(c_size_t), value :: size
352 integer(omp_allocator_handle_kind), value :: allocator
353 end function omp_alloc
354 end interface
356 interface
357 function omp_aligned_alloc (alignment, size, allocator) bind(c)
358 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
359 use, intrinsic :: omp_lib_kinds
360 type(c_ptr) :: omp_aligned_alloc
361 integer(c_size_t), value :: alignment, size
362 integer(omp_allocator_handle_kind), value :: allocator
363 end function omp_aligned_alloc
364 end interface
366 interface
367 subroutine omp_free(ptr, allocator) bind(c)
368 use, intrinsic :: iso_c_binding, only : c_ptr
369 use, intrinsic :: omp_lib_kinds
370 type(c_ptr), value :: ptr
371 integer(omp_allocator_handle_kind), value :: allocator
372 end subroutine omp_free
373 end interface
375 interface
376 function omp_calloc (nmemb, size, allocator) bind(c)
377 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
378 use, intrinsic :: omp_lib_kinds
379 type(c_ptr) :: omp_calloc
380 integer(c_size_t), value :: nmemb, size
381 integer(omp_allocator_handle_kind), value :: allocator
382 end function omp_calloc
383 end interface
385 interface
386 function omp_aligned_calloc (alignment, nmemb, size, allocator) &
387 & bind(c)
388 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
389 use, intrinsic :: omp_lib_kinds
390 type(c_ptr) :: omp_aligned_calloc
391 integer(c_size_t), value :: alignment, nmemb, size
392 integer(omp_allocator_handle_kind), value :: allocator
393 end function omp_aligned_calloc
394 end interface
396 interface
397 function omp_realloc (ptr, size, allocator, free_allocator) &
398 & bind(c)
399 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t
400 use, intrinsic :: omp_lib_kinds
401 type(c_ptr) :: omp_realloc
402 type(c_ptr), value :: ptr
403 integer(c_size_t), value :: size
404 integer(omp_allocator_handle_kind), value :: allocator
405 integer(omp_allocator_handle_kind), value :: free_allocator
406 end function omp_realloc
407 end interface
409 interface
410 function omp_target_alloc (size, device_num) bind(c)
411 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
412 type(c_ptr) :: omp_target_alloc
413 integer(c_size_t), value :: size
414 integer(c_int), value :: device_num
415 end function omp_target_alloc
416 end interface
418 interface
419 subroutine omp_target_free (device_ptr, device_num) bind(c)
420 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
421 type(c_ptr), value :: device_ptr
422 integer(c_int), value :: device_num
423 end subroutine omp_target_free
424 end interface
426 interface
427 function omp_target_is_present (ptr, device_num) bind(c)
428 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
429 integer(c_int) :: omp_target_is_present
430 type(c_ptr), value :: ptr
431 integer(c_int), value :: device_num
432 end function omp_target_is_present
433 end interface
435 interface
436 function omp_target_memcpy (dst, src, length, dst_offset, &
437 & src_offset, dst_device_num, &
438 & src_device_num) bind(c)
439 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
440 integer(c_int) :: omp_target_memcpy
441 type(c_ptr), value :: dst, src
442 integer(c_size_t), value :: length, dst_offset, src_offset
443 integer(c_int), value :: dst_device_num, src_device_num
444 end function omp_target_memcpy
445 end interface
447 interface
448 function omp_target_memcpy_async (dst, src, length, dst_offset, &
449 & src_offset, dst_device_num, &
450 & src_device_num, depobj_count, &
451 & depobj_list) bind(c)
452 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
453 import :: omp_depend_kind
454 integer(c_int) :: omp_target_memcpy_async
455 type(c_ptr), value :: dst, src
456 integer(c_size_t), value :: length, dst_offset, src_offset
457 integer(c_int), value :: dst_device_num, src_device_num
458 integer(c_int), value :: depobj_count
459 integer(omp_depend_kind), optional :: depobj_list(*)
460 end function omp_target_memcpy_async
461 end interface
463 interface
464 function omp_target_memcpy_rect (dst,src,element_size, num_dims, &
465 & volume, dst_offsets, &
466 & src_offsets, dst_dimensions, &
467 & src_dimensions, dst_device_num, &
468 & src_device_num) bind(c)
469 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
470 integer(c_int) :: omp_target_memcpy_rect
471 type(c_ptr), value :: dst, src
472 integer(c_size_t), value :: element_size
473 integer(c_int), value :: num_dims
474 integer(c_int), value :: dst_device_num, src_device_num
475 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*)
476 integer(c_size_t), intent(in) :: src_offsets(*)
477 integer(c_size_t), intent(in) :: dst_dimensions(*)
478 integer(c_size_t), intent(in) :: src_dimensions(*)
479 end function omp_target_memcpy_rect
480 end interface
482 interface
483 function omp_target_memcpy_rect_async (dst,src,element_size, &
484 & num_dims, volume, &
485 & dst_offsets, src_offsets, &
486 & dst_dimensions, &
487 & src_dimensions, &
488 & dst_device_num, &
489 & src_device_num, &
490 & depobj_count, &
491 & depobj_list) bind(c)
492 use, intrinsic :: iso_c_binding, only : c_ptr, c_int, c_size_t
493 import :: omp_depend_kind
494 integer(c_int) :: omp_target_memcpy_rect_async
495 type(c_ptr), value :: dst, src
496 integer(c_size_t), value :: element_size
497 integer(c_int), value :: num_dims, depobj_count
498 integer(c_int), value :: dst_device_num, src_device_num
499 integer(c_size_t), intent(in) :: volume(*), dst_offsets(*)
500 integer(c_size_t), intent(in) :: src_offsets(*)
501 integer(c_size_t), intent(in) :: dst_dimensions(*)
502 integer(c_size_t), intent(in) :: src_dimensions(*)
503 integer(omp_depend_kind), optional :: depobj_list(*)
504 end function omp_target_memcpy_rect_async
505 end interface
507 interface
508 function omp_target_associate_ptr (host_ptr, device_ptr, size, &
509 & device_offset, device_num) &
510 & bind(c)
511 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
512 integer(c_int) :: omp_target_associate_ptr
513 type(c_ptr), value :: host_ptr, device_ptr
514 integer(c_size_t), value :: size, device_offset
515 integer(c_int), value :: device_num
516 end function omp_target_associate_ptr
517 end interface
519 interface
520 function omp_target_disassociate_ptr (ptr, device_num) bind(c)
521 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
522 integer(c_int) :: omp_target_disassociate_ptr
523 type(c_ptr), value :: ptr
524 integer(c_int), value :: device_num
525 end function omp_target_disassociate_ptr
526 end interface
528 interface
529 function omp_get_mapped_ptr (ptr, device_num) bind(c)
530 use, intrinsic :: iso_c_binding, only : c_ptr, c_int
531 type(c_ptr) :: omp_get_mapped_ptr
532 type(c_ptr), value :: ptr
533 integer(c_int), value :: device_num
534 end function omp_get_mapped_ptr
535 end interface
537 interface
538 function omp_target_is_accessible (ptr, size, device_num) &
539 & bind(c)
540 use, intrinsic :: iso_c_binding, only : c_ptr, c_size_t, c_int
541 integer(c_int) :: omp_target_is_accessible
542 type(c_ptr), value :: ptr
543 integer(c_size_t), value :: size
544 integer(c_int), value :: device_num
545 end function omp_target_is_accessible
546 end interface
548 ! Interop functions: Note that the interface is not identical to the
549 ! OpenMP specification (c_int + VALUE + BIND(C) added) but usage
550 ! compatible; the following declarations permit to directly call the C
551 ! library function, except for the four string-returning functions.
552 interface
553 integer (c_int) function omp_get_num_interop_properties(interop) &
554 & bind(C)
555 use, intrinsic :: iso_c_binding, only: c_int
556 use, intrinsic :: omp_lib_kinds
557 integer (omp_interop_kind), intent(in), value :: interop
558 end function omp_get_num_interop_properties
560 integer (c_intptr_t) function omp_get_interop_int (interop, &
561 & property_id, ret_code) bind(C)
562 use, intrinsic :: iso_c_binding, only : c_intptr_t
563 use, intrinsic :: omp_lib_kinds
564 integer (omp_interop_kind), intent(in), value :: interop
565 integer (omp_interop_property_kind), value :: property_id
566 integer (omp_interop_rc_kind), optional, &
567 & intent(out) :: ret_code
568 end function omp_get_interop_int
570 type (c_ptr) function omp_get_interop_ptr (interop, property_id, &
571 & ret_code) bind(C)
572 use, intrinsic :: iso_c_binding, only : c_ptr
573 use, intrinsic :: omp_lib_kinds
574 integer (omp_interop_kind), intent(in), value :: interop
575 integer (omp_interop_property_kind), value :: property_id
576 integer (omp_interop_rc_kind), optional, &
577 & intent(out) :: ret_code
578 end function omp_get_interop_ptr
580 character(:) function omp_get_interop_str (interop, property_id, &
581 & ret_code)
582 use, intrinsic :: omp_lib_kinds
583 pointer :: omp_get_interop_str
584 integer (omp_interop_kind), intent(in), value :: interop
585 integer (omp_interop_property_kind), value :: property_id
586 integer (omp_interop_rc_kind), optional, &
587 & intent(out) :: ret_code
588 end function omp_get_interop_str
590 character(:) function omp_get_interop_name(interop, property_id)
591 use, intrinsic :: omp_lib_kinds
592 pointer :: omp_get_interop_name
593 integer (omp_interop_kind), intent(in), value :: interop
594 integer (omp_interop_property_kind), value :: property_id
595 end function omp_get_interop_name
597 character(:) function omp_get_interop_type_desc (interop, &
598 & property_id)
599 use, intrinsic :: omp_lib_kinds
600 pointer :: omp_get_interop_type_desc
601 integer (omp_interop_kind), intent(in), value :: interop
602 integer (omp_interop_property_kind), value :: property_id
603 end function omp_get_interop_type_desc
605 character(:) function omp_get_interop_rc_desc (interop, &
606 & ret_code)
607 use, intrinsic :: omp_lib_kinds
608 pointer :: omp_get_interop_rc_desc
609 integer (omp_interop_kind), intent(in), value :: interop
610 integer (omp_interop_rc_kind), value :: ret_code
611 end function omp_get_interop_rc_desc
612 end interface
614 interface
615 integer(c_int) function omp_get_device_from_uid (uid)
616 use iso_c_binding
617 character, intent(in) :: uid(*)
618 end function omp_get_device_from_uid
619 end interface
621 interface omp_get_uid_from_device
622 ! Deviation from OpenMP 6.0: VALUE added.
623 character(:) function omp_get_uid_from_device (device_num)
624 use iso_c_binding
625 pointer :: omp_get_uid_from_device
626 integer(c_int32_t), intent(in), value :: device_num
627 end function omp_get_uid_from_device
629 character(:) function omp_get_uid_from_device_8 (device_num)
630 use iso_c_binding
631 pointer :: omp_get_uid_from_device_8
632 integer(c_int64_t), intent(in), value :: device_num
633 end function omp_get_uid_from_device_8
634 end interface omp_get_uid_from_device