1 ! OpenACC Runtime Library Definitions.
3 ! Copyright (C) 2014-2024 Free Software Foundation, Inc.
5 ! Contributed by Tobias Burnus <burnus@net-b.de>
8 ! This file is part of the GNU Offloading and Multi Processing Library
11 ! Libgomp is free software; you can redistribute it and/or modify it
12 ! under the terms of the GNU General Public License as published by
13 ! the Free Software Foundation; either version 3, or (at your option)
16 ! Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY
17 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18 ! FOR A PARTICULAR PURPOSE. See the GNU General Public License for
21 ! Under Section 7 of GPL version 3, you are granted additional
22 ! permissions described in the GCC Runtime Library Exception, version
23 ! 3.1, as published by the Free Software Foundation.
25 ! You should have received a copy of the GNU General Public License and
26 ! a copy of the GCC Runtime Library Exception along with this program;
27 ! see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
28 ! <http://www.gnu.org/licenses/>.
30 ! Keep in sync with config/accel/openacc.f90 and openacc_lib.h.
33 use iso_fortran_env
, only
: int32
39 ! When adding items, also update 'public' setting in 'module openacc' below.
41 integer, parameter :: acc_device_kind
= int32
43 ! Keep in sync with include/gomp-constants.h.
44 integer (acc_device_kind
), parameter :: acc_device_current
= -1
45 integer (acc_device_kind
), parameter :: acc_device_none
= 0
46 integer (acc_device_kind
), parameter :: acc_device_default
= 1
47 integer (acc_device_kind
), parameter :: acc_device_host
= 2
48 ! integer (acc_device_kind), parameter :: acc_device_host_nonshm = 3 removed.
49 integer (acc_device_kind
), parameter :: acc_device_not_host
= 4
50 integer (acc_device_kind
), parameter :: acc_device_nvidia
= 5
51 integer (acc_device_kind
), parameter :: acc_device_radeon
= 8
53 integer, parameter :: acc_device_property_kind
= int32
54 ! OpenACC 2.6/2.7/3.0 used acc_device_property; in a spec update the
55 ! missing '_kind' was added for consistency. For backward compatibility, keep:
56 integer, parameter :: acc_device_property
= acc_device_property_kind
58 ! Keep in sync with 'libgomp/libgomp-plugin.h:goacc_property'.
59 integer (acc_device_property_kind
), parameter :: acc_property_memory
= 1
60 integer (acc_device_property_kind
), parameter :: acc_property_free_memory
= 2
61 integer (acc_device_property_kind
), parameter :: acc_property_name
= int(Z
'10001')
62 integer (acc_device_property_kind
), parameter :: acc_property_vendor
= int(Z
'10002')
63 integer (acc_device_property_kind
), parameter :: acc_property_driver
= int(Z
'10003')
65 integer, parameter :: acc_handle_kind
= int32
67 ! Keep in sync with include/gomp-constants.h.
68 integer (acc_handle_kind
), parameter :: acc_async_noval
= -1
69 integer (acc_handle_kind
), parameter :: acc_async_sync
= -2
70 end module openacc_kinds
72 module openacc_internal
77 function acc_get_num_devices_h (devicetype
)
79 integer acc_get_num_devices_h
80 integer (acc_device_kind
) devicetype
83 subroutine acc_set_device_type_h (devicetype
)
85 integer (acc_device_kind
) devicetype
88 function acc_get_device_type_h ()
90 integer (acc_device_kind
) acc_get_device_type_h
93 subroutine acc_set_device_num_h (devicenum
, devicetype
)
96 integer (acc_device_kind
) devicetype
99 function acc_get_device_num_h (devicetype
)
101 integer acc_get_device_num_h
102 integer (acc_device_kind
) devicetype
105 function acc_get_property_h (devicenum
, devicetype
, property
)
106 use iso_c_binding
, only
: c_size_t
108 implicit none (type, external)
109 integer (c_size_t
) :: acc_get_property_h
110 integer, value
:: devicenum
111 integer (acc_device_kind
), value
:: devicetype
112 integer (acc_device_property_kind
), value
:: property
115 subroutine acc_get_property_string_h (devicenum
, devicetype
, property
, string
)
117 implicit none (type, external)
118 integer, value
:: devicenum
119 integer (acc_device_kind
), value
:: devicetype
120 integer (acc_device_property_kind
), value
:: property
121 character (*) :: string
124 function acc_async_test_h (arg
)
125 logical acc_async_test_h
129 function acc_async_test_all_h ()
130 logical acc_async_test_all_h
133 subroutine acc_wait_h (arg
)
137 subroutine acc_wait_async_h (arg
, async
)
141 subroutine acc_wait_all_h ()
144 subroutine acc_wait_all_async_h (async
)
148 subroutine acc_init_h (devicetype
)
150 integer (acc_device_kind
) devicetype
153 subroutine acc_shutdown_h (devicetype
)
155 integer (acc_device_kind
) devicetype
158 function acc_on_device_h (devicetype
)
160 integer (acc_device_kind
) devicetype
161 logical acc_on_device_h
164 subroutine acc_copyin_32_h (a
, len
)
165 use iso_c_binding
, only
: c_int32_t
166 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
167 type (*), dimension (*) :: a
168 integer (c_int32_t
) len
171 subroutine acc_copyin_64_h (a
, len
)
172 use iso_c_binding
, only
: c_int64_t
173 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
174 type (*), dimension (*) :: a
175 integer (c_int64_t
) len
178 subroutine acc_copyin_array_h (a
)
179 type (*), dimension (..), contiguous
:: a
182 subroutine acc_present_or_copyin_32_h (a
, len
)
183 use iso_c_binding
, only
: c_int32_t
184 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
185 type (*), dimension (*) :: a
186 integer (c_int32_t
) len
189 subroutine acc_present_or_copyin_64_h (a
, len
)
190 use iso_c_binding
, only
: c_int64_t
191 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
192 type (*), dimension (*) :: a
193 integer (c_int64_t
) len
196 subroutine acc_present_or_copyin_array_h (a
)
197 type (*), dimension (..), contiguous
:: a
200 subroutine acc_create_32_h (a
, len
)
201 use iso_c_binding
, only
: c_int32_t
202 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
203 type (*), dimension (*) :: a
204 integer (c_int32_t
) len
207 subroutine acc_create_64_h (a
, len
)
208 use iso_c_binding
, only
: c_int64_t
209 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
210 type (*), dimension (*) :: a
211 integer (c_int64_t
) len
214 subroutine acc_create_array_h (a
)
215 type (*), dimension (..), contiguous
:: a
218 subroutine acc_present_or_create_32_h (a
, len
)
219 use iso_c_binding
, only
: c_int32_t
220 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
221 type (*), dimension (*) :: a
222 integer (c_int32_t
) len
225 subroutine acc_present_or_create_64_h (a
, len
)
226 use iso_c_binding
, only
: c_int64_t
227 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
228 type (*), dimension (*) :: a
229 integer (c_int64_t
) len
232 subroutine acc_present_or_create_array_h (a
)
233 type (*), dimension (..), contiguous
:: a
236 subroutine acc_copyout_32_h (a
, len
)
237 use iso_c_binding
, only
: c_int32_t
238 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
239 type (*), dimension (*) :: a
240 integer (c_int32_t
) len
243 subroutine acc_copyout_64_h (a
, len
)
244 use iso_c_binding
, only
: c_int64_t
245 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
246 type (*), dimension (*) :: a
247 integer (c_int64_t
) len
250 subroutine acc_copyout_array_h (a
)
251 type (*), dimension (..), contiguous
:: a
254 subroutine acc_copyout_finalize_32_h (a
, len
)
255 use iso_c_binding
, only
: c_int32_t
256 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
257 type (*), dimension (*) :: a
258 integer (c_int32_t
) len
261 subroutine acc_copyout_finalize_64_h (a
, len
)
262 use iso_c_binding
, only
: c_int64_t
263 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
264 type (*), dimension (*) :: a
265 integer (c_int64_t
) len
268 subroutine acc_copyout_finalize_array_h (a
)
269 type (*), dimension (..), contiguous
:: a
272 subroutine acc_delete_32_h (a
, len
)
273 use iso_c_binding
, only
: c_int32_t
274 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
275 type (*), dimension (*) :: a
276 integer (c_int32_t
) len
279 subroutine acc_delete_64_h (a
, len
)
280 use iso_c_binding
, only
: c_int64_t
281 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
282 type (*), dimension (*) :: a
283 integer (c_int64_t
) len
286 subroutine acc_delete_array_h (a
)
287 type (*), dimension (..), contiguous
:: a
290 subroutine acc_delete_finalize_32_h (a
, len
)
291 use iso_c_binding
, only
: c_int32_t
292 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
293 type (*), dimension (*) :: a
294 integer (c_int32_t
) len
297 subroutine acc_delete_finalize_64_h (a
, len
)
298 use iso_c_binding
, only
: c_int64_t
299 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
300 type (*), dimension (*) :: a
301 integer (c_int64_t
) len
304 subroutine acc_delete_finalize_array_h (a
)
305 type (*), dimension (..), contiguous
:: a
308 subroutine acc_update_device_32_h (a
, len
)
309 use iso_c_binding
, only
: c_int32_t
310 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
311 type (*), dimension (*) :: a
312 integer (c_int32_t
) len
315 subroutine acc_update_device_64_h (a
, len
)
316 use iso_c_binding
, only
: c_int64_t
317 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
318 type (*), dimension (*) :: a
319 integer (c_int64_t
) len
322 subroutine acc_update_device_array_h (a
)
323 type (*), dimension (..), contiguous
:: a
326 subroutine acc_update_self_32_h (a
, len
)
327 use iso_c_binding
, only
: c_int32_t
328 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
329 type (*), dimension (*) :: a
330 integer (c_int32_t
) len
333 subroutine acc_update_self_64_h (a
, len
)
334 use iso_c_binding
, only
: c_int64_t
335 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
336 type (*), dimension (*) :: a
337 integer (c_int64_t
) len
340 subroutine acc_update_self_array_h (a
)
341 type (*), dimension (..), contiguous
:: a
344 function acc_is_present_32_h (a
, len
)
345 use iso_c_binding
, only
: c_int32_t
346 logical acc_is_present_32_h
347 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
348 type (*), dimension (*) :: a
349 integer (c_int32_t
) len
352 function acc_is_present_64_h (a
, len
)
353 use iso_c_binding
, only
: c_int64_t
354 logical acc_is_present_64_h
355 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
356 type (*), dimension (*) :: a
357 integer (c_int64_t
) len
360 function acc_is_present_array_h (a
)
361 logical acc_is_present_array_h
362 type (*), dimension (..), contiguous
:: a
365 subroutine acc_copyin_async_32_h (a
, len
, async
)
366 use iso_c_binding
, only
: c_int32_t
367 use openacc_kinds
, only
: acc_handle_kind
368 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
369 type (*), dimension (*) :: a
370 integer (c_int32_t
) len
371 integer (acc_handle_kind
) async
374 subroutine acc_copyin_async_64_h (a
, len
, async
)
375 use iso_c_binding
, only
: c_int64_t
376 use openacc_kinds
, only
: acc_handle_kind
377 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
378 type (*), dimension (*) :: a
379 integer (c_int64_t
) len
380 integer (acc_handle_kind
) async
383 subroutine acc_copyin_async_array_h (a
, async
)
384 use openacc_kinds
, only
: acc_handle_kind
385 type (*), dimension (..), contiguous
:: a
386 integer (acc_handle_kind
) async
389 subroutine acc_create_async_32_h (a
, len
, async
)
390 use iso_c_binding
, only
: c_int32_t
391 use openacc_kinds
, only
: acc_handle_kind
392 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
393 type (*), dimension (*) :: a
394 integer (c_int32_t
) len
395 integer (acc_handle_kind
) async
398 subroutine acc_create_async_64_h (a
, len
, async
)
399 use iso_c_binding
, only
: c_int64_t
400 use openacc_kinds
, only
: acc_handle_kind
401 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
402 type (*), dimension (*) :: a
403 integer (c_int64_t
) len
404 integer (acc_handle_kind
) async
407 subroutine acc_create_async_array_h (a
, async
)
408 use openacc_kinds
, only
: acc_handle_kind
409 type (*), dimension (..), contiguous
:: a
410 integer (acc_handle_kind
) async
413 subroutine acc_copyout_async_32_h (a
, len
, async
)
414 use iso_c_binding
, only
: c_int32_t
415 use openacc_kinds
, only
: acc_handle_kind
416 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
417 type (*), dimension (*) :: a
418 integer (c_int32_t
) len
419 integer (acc_handle_kind
) async
422 subroutine acc_copyout_async_64_h (a
, len
, async
)
423 use iso_c_binding
, only
: c_int64_t
424 use openacc_kinds
, only
: acc_handle_kind
425 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
426 type (*), dimension (*) :: a
427 integer (c_int64_t
) len
428 integer (acc_handle_kind
) async
431 subroutine acc_copyout_async_array_h (a
, async
)
432 use openacc_kinds
, only
: acc_handle_kind
433 type (*), dimension (..), contiguous
:: a
434 integer (acc_handle_kind
) async
437 subroutine acc_delete_async_32_h (a
, len
, async
)
438 use iso_c_binding
, only
: c_int32_t
439 use openacc_kinds
, only
: acc_handle_kind
440 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
441 type (*), dimension (*) :: a
442 integer (c_int32_t
) len
443 integer (acc_handle_kind
) async
446 subroutine acc_delete_async_64_h (a
, len
, async
)
447 use iso_c_binding
, only
: c_int64_t
448 use openacc_kinds
, only
: acc_handle_kind
449 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
450 type (*), dimension (*) :: a
451 integer (c_int64_t
) len
452 integer (acc_handle_kind
) async
455 subroutine acc_delete_async_array_h (a
, async
)
456 use openacc_kinds
, only
: acc_handle_kind
457 type (*), dimension (..), contiguous
:: a
458 integer (acc_handle_kind
) async
461 subroutine acc_update_device_async_32_h (a
, len
, async
)
462 use iso_c_binding
, only
: c_int32_t
463 use openacc_kinds
, only
: acc_handle_kind
464 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
465 type (*), dimension (*) :: a
466 integer (c_int32_t
) len
467 integer (acc_handle_kind
) async
470 subroutine acc_update_device_async_64_h (a
, len
, async
)
471 use iso_c_binding
, only
: c_int64_t
472 use openacc_kinds
, only
: acc_handle_kind
473 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
474 type (*), dimension (*) :: a
475 integer (c_int64_t
) len
476 integer (acc_handle_kind
) async
479 subroutine acc_update_device_async_array_h (a
, async
)
480 use openacc_kinds
, only
: acc_handle_kind
481 type (*), dimension (..), contiguous
:: a
482 integer (acc_handle_kind
) async
485 subroutine acc_update_self_async_32_h (a
, len
, async
)
486 use iso_c_binding
, only
: c_int32_t
487 use openacc_kinds
, only
: acc_handle_kind
488 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
489 type (*), dimension (*) :: a
490 integer (c_int32_t
) len
491 integer (acc_handle_kind
) async
494 subroutine acc_update_self_async_64_h (a
, len
, async
)
495 use iso_c_binding
, only
: c_int64_t
496 use openacc_kinds
, only
: acc_handle_kind
497 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
498 type (*), dimension (*) :: a
499 integer (c_int64_t
) len
500 integer (acc_handle_kind
) async
503 subroutine acc_update_self_async_array_h (a
, async
)
504 use openacc_kinds
, only
: acc_handle_kind
505 type (*), dimension (..), contiguous
:: a
506 integer (acc_handle_kind
) async
511 function acc_get_num_devices_l (devicetype
) &
512 bind (C
, name
= "acc_get_num_devices")
513 use iso_c_binding
, only
: c_int
514 integer (c_int
) :: acc_get_num_devices_l
515 integer (c_int
), value
:: devicetype
518 subroutine acc_set_device_type_l (devicetype
) &
519 bind (C
, name
= "acc_set_device_type")
520 use iso_c_binding
, only
: c_int
521 integer (c_int
), value
:: devicetype
524 function acc_get_device_type_l () &
525 bind (C
, name
= "acc_get_device_type")
526 use iso_c_binding
, only
: c_int
527 integer (c_int
) :: acc_get_device_type_l
530 subroutine acc_set_device_num_l (devicenum
, devicetype
) &
531 bind (C
, name
= "acc_set_device_num")
532 use iso_c_binding
, only
: c_int
533 integer (c_int
), value
:: devicenum
, devicetype
536 function acc_get_device_num_l (devicetype
) &
537 bind (C
, name
= "acc_get_device_num")
538 use iso_c_binding
, only
: c_int
539 integer (c_int
) :: acc_get_device_num_l
540 integer (c_int
), value
:: devicetype
543 function acc_get_property_l (devicenum
, devicetype
, property
) &
544 bind (C
, name
= "acc_get_property")
545 use iso_c_binding
, only
: c_int
, c_size_t
546 implicit none (type, external)
547 integer (c_size_t
) :: acc_get_property_l
548 integer (c_int
), value
:: devicenum
549 integer (c_int
), value
:: devicetype
550 integer (c_int
), value
:: property
553 function acc_get_property_string_l (devicenum
, devicetype
, property
) &
554 bind (C
, name
= "acc_get_property_string")
555 use iso_c_binding
, only
: c_int
, c_ptr
556 implicit none (type, external)
557 type (c_ptr
) :: acc_get_property_string_l
558 integer (c_int
), value
:: devicenum
559 integer (c_int
), value
:: devicetype
560 integer (c_int
), value
:: property
563 function acc_async_test_l (a
) &
564 bind (C
, name
= "acc_async_test")
565 use iso_c_binding
, only
: c_int
566 integer (c_int
) :: acc_async_test_l
567 integer (c_int
), value
:: a
570 function acc_async_test_all_l () &
571 bind (C
, name
= "acc_async_test_all")
572 use iso_c_binding
, only
: c_int
573 integer (c_int
) :: acc_async_test_all_l
576 subroutine acc_wait_l (a
) &
577 bind (C
, name
= "acc_wait")
578 use iso_c_binding
, only
: c_int
579 integer (c_int
), value
:: a
582 subroutine acc_wait_async_l (arg
, async
) &
583 bind (C
, name
= "acc_wait_async")
584 use iso_c_binding
, only
: c_int
585 integer (c_int
), value
:: arg
, async
588 subroutine acc_wait_all_l () &
589 bind (C
, name
= "acc_wait_all")
590 use iso_c_binding
, only
: c_int
593 subroutine acc_wait_all_async_l (async
) &
594 bind (C
, name
= "acc_wait_all_async")
595 use iso_c_binding
, only
: c_int
596 integer (c_int
), value
:: async
599 subroutine acc_init_l (devicetype
) &
600 bind (C
, name
= "acc_init")
601 use iso_c_binding
, only
: c_int
602 integer (c_int
), value
:: devicetype
605 subroutine acc_shutdown_l (devicetype
) &
606 bind (C
, name
= "acc_shutdown")
607 use iso_c_binding
, only
: c_int
608 integer (c_int
), value
:: devicetype
611 function acc_on_device_l (devicetype
) &
612 bind (C
, name
= "acc_on_device")
613 use iso_c_binding
, only
: c_int
614 integer (c_int
) :: acc_on_device_l
615 integer (c_int
), value
:: devicetype
618 subroutine acc_copyin_l (a
, len
) &
619 bind (C
, name
= "acc_copyin")
620 use iso_c_binding
, only
: c_size_t
621 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
622 type (*), dimension (*) :: a
623 integer (c_size_t
), value
:: len
626 subroutine acc_present_or_copyin_l (a
, len
) &
627 bind (C
, name
= "acc_present_or_copyin")
628 use iso_c_binding
, only
: c_size_t
629 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
630 type (*), dimension (*) :: a
631 integer (c_size_t
), value
:: len
634 subroutine acc_create_l (a
, len
) &
635 bind (C
, name
= "acc_create")
636 use iso_c_binding
, only
: c_size_t
637 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
638 type (*), dimension (*) :: a
639 integer (c_size_t
), value
:: len
642 subroutine acc_present_or_create_l (a
, len
) &
643 bind (C
, name
= "acc_present_or_create")
644 use iso_c_binding
, only
: c_size_t
645 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
646 type (*), dimension (*) :: a
647 integer (c_size_t
), value
:: len
650 subroutine acc_copyout_l (a
, len
) &
651 bind (C
, name
= "acc_copyout")
652 use iso_c_binding
, only
: c_size_t
653 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
654 type (*), dimension (*) :: a
655 integer (c_size_t
), value
:: len
658 subroutine acc_copyout_finalize_l (a
, len
) &
659 bind (C
, name
= "acc_copyout_finalize")
660 use iso_c_binding
, only
: c_size_t
661 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
662 type (*), dimension (*) :: a
663 integer (c_size_t
), value
:: len
666 subroutine acc_delete_l (a
, len
) &
667 bind (C
, name
= "acc_delete")
668 use iso_c_binding
, only
: c_size_t
669 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
670 type (*), dimension (*) :: a
671 integer (c_size_t
), value
:: len
674 subroutine acc_delete_finalize_l (a
, len
) &
675 bind (C
, name
= "acc_delete_finalize")
676 use iso_c_binding
, only
: c_size_t
677 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
678 type (*), dimension (*) :: a
679 integer (c_size_t
), value
:: len
682 subroutine acc_update_device_l (a
, len
) &
683 bind (C
, name
= "acc_update_device")
684 use iso_c_binding
, only
: c_size_t
685 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
686 type (*), dimension (*) :: a
687 integer (c_size_t
), value
:: len
690 subroutine acc_update_self_l (a
, len
) &
691 bind (C
, name
= "acc_update_self")
692 use iso_c_binding
, only
: c_size_t
693 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
694 type (*), dimension (*) :: a
695 integer (c_size_t
), value
:: len
698 function acc_is_present_l (a
, len
) &
699 bind (C
, name
= "acc_is_present")
700 use iso_c_binding
, only
: c_int32_t
, c_size_t
701 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
702 integer (c_int32_t
) :: acc_is_present_l
703 type (*), dimension (*) :: a
704 integer (c_size_t
), value
:: len
707 subroutine acc_copyin_async_l (a
, len
, async
) &
708 bind (C
, name
= "acc_copyin_async")
709 use iso_c_binding
, only
: c_size_t
, c_int
710 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
711 type (*), dimension (*) :: a
712 integer (c_size_t
), value
:: len
713 integer (c_int
), value
:: async
716 subroutine acc_create_async_l (a
, len
, async
) &
717 bind (C
, name
= "acc_create_async")
718 use iso_c_binding
, only
: c_size_t
, c_int
719 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
720 type (*), dimension (*) :: a
721 integer (c_size_t
), value
:: len
722 integer (c_int
), value
:: async
725 subroutine acc_copyout_async_l (a
, len
, async
) &
726 bind (C
, name
= "acc_copyout_async")
727 use iso_c_binding
, only
: c_size_t
, c_int
728 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
729 type (*), dimension (*) :: a
730 integer (c_size_t
), value
:: len
731 integer (c_int
), value
:: async
734 subroutine acc_delete_async_l (a
, len
, async
) &
735 bind (C
, name
= "acc_delete_async")
736 use iso_c_binding
, only
: c_size_t
, c_int
737 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
738 type (*), dimension (*) :: a
739 integer (c_size_t
), value
:: len
740 integer (c_int
), value
:: async
743 subroutine acc_update_device_async_l (a
, len
, async
) &
744 bind (C
, name
= "acc_update_device_async")
745 use iso_c_binding
, only
: c_size_t
, c_int
746 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
747 type (*), dimension (*) :: a
748 integer (c_size_t
), value
:: len
749 integer (c_int
), value
:: async
752 subroutine acc_update_self_async_l (a
, len
, async
) &
753 bind (C
, name
= "acc_update_self_async")
754 use iso_c_binding
, only
: c_size_t
, c_int
755 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
756 type (*), dimension (*) :: a
757 integer (c_size_t
), value
:: len
758 integer (c_int
), value
:: async
761 end module openacc_internal
771 public
:: acc_device_kind
772 public
:: acc_device_none
, acc_device_default
, acc_device_host
773 public
:: acc_device_not_host
, acc_device_nvidia
, acc_device_radeon
775 public
:: acc_device_property_kind
, acc_device_property
776 public
:: acc_property_memory
, acc_property_free_memory
777 public
:: acc_property_name
, acc_property_vendor
, acc_property_driver
779 public
:: acc_handle_kind
780 public
:: acc_async_noval
, acc_async_sync
782 public
:: openacc_version
784 public
:: acc_get_num_devices
, acc_set_device_type
, acc_get_device_type
785 public
:: acc_set_device_num
, acc_get_device_num
786 public
:: acc_get_property
, acc_get_property_string
787 public
:: acc_async_test
, acc_async_test_all
788 public
:: acc_wait
, acc_async_wait
, acc_wait_async
789 public
:: acc_wait_all
, acc_async_wait_all
, acc_wait_all_async
790 public
:: acc_init
, acc_shutdown
, acc_on_device
, acc_malloc
, acc_free
791 public
:: acc_copyin
, acc_present_or_copyin
, acc_pcopyin
, acc_create
792 public
:: acc_present_or_create
, acc_pcreate
, acc_copyout
, acc_delete
793 public
:: acc_update_device
, acc_update_self
, acc_map_data
, acc_unmap_data
794 public
:: acc_deviceptr
, acc_hostptr
, acc_is_present
795 public
:: acc_copyin_async
, acc_create_async
, acc_copyout_async
796 public
:: acc_delete_async
, acc_update_device_async
, acc_update_self_async
797 public
:: acc_copyout_finalize
, acc_delete_finalize
798 public
:: acc_memcpy_to_device
, acc_memcpy_to_device_async
799 public
:: acc_memcpy_from_device
, acc_memcpy_from_device_async
801 integer, parameter :: openacc_version
= 201711
803 interface acc_get_num_devices
804 procedure
:: acc_get_num_devices_h
807 interface acc_set_device_type
808 procedure
:: acc_set_device_type_h
811 interface acc_get_device_type
812 procedure
:: acc_get_device_type_h
815 interface acc_set_device_num
816 procedure
:: acc_set_device_num_h
819 interface acc_get_device_num
820 procedure
:: acc_get_device_num_h
823 interface acc_get_property
824 procedure
:: acc_get_property_h
827 interface acc_get_property_string
828 procedure
:: acc_get_property_string_h
831 interface acc_async_test
832 procedure
:: acc_async_test_h
835 interface acc_async_test_all
836 procedure
:: acc_async_test_all_h
840 procedure
:: acc_wait_h
843 ! acc_async_wait is an OpenACC 1.0 compatibility name for acc_wait.
844 interface acc_async_wait
845 procedure
:: acc_wait_h
848 interface acc_wait_async
849 procedure
:: acc_wait_async_h
852 interface acc_wait_all
853 procedure
:: acc_wait_all_h
856 ! acc_async_wait_all is an OpenACC 1.0 compatibility name for acc_wait_all.
857 interface acc_async_wait_all
858 procedure
:: acc_wait_all_h
861 interface acc_wait_all_async
862 procedure
:: acc_wait_all_async_h
866 procedure
:: acc_init_h
869 interface acc_shutdown
870 procedure
:: acc_shutdown_h
873 interface acc_on_device
874 procedure
:: acc_on_device_h
878 type(c_ptr
) function acc_malloc (bytes
) bind(C
)
879 use iso_c_binding
, only
: c_ptr
, c_size_t
880 integer(c_size_t
), value
:: bytes
885 subroutine acc_free (data_dev
) bind(C
)
886 use iso_c_binding
, only
: c_ptr
887 type(c_ptr
), value
:: data_dev
891 ! As vendor extension, the following code supports both 32bit and 64bit
892 ! arguments for "size"; the OpenACC standard only permits default-kind
893 ! integers, which are of kind 4 (i.e. 32 bits).
894 ! Additionally, the two-argument version also takes arrays as argument.
895 ! and the one argument version also scalars. Note that the code assumes
896 ! that the arrays are contiguous.
899 procedure
:: acc_copyin_32_h
900 procedure
:: acc_copyin_64_h
901 procedure
:: acc_copyin_array_h
904 interface acc_present_or_copyin
905 procedure
:: acc_present_or_copyin_32_h
906 procedure
:: acc_present_or_copyin_64_h
907 procedure
:: acc_present_or_copyin_array_h
910 interface acc_pcopyin
911 procedure
:: acc_present_or_copyin_32_h
912 procedure
:: acc_present_or_copyin_64_h
913 procedure
:: acc_present_or_copyin_array_h
917 procedure
:: acc_create_32_h
918 procedure
:: acc_create_64_h
919 procedure
:: acc_create_array_h
922 interface acc_present_or_create
923 procedure
:: acc_present_or_create_32_h
924 procedure
:: acc_present_or_create_64_h
925 procedure
:: acc_present_or_create_array_h
928 interface acc_pcreate
929 procedure
:: acc_present_or_create_32_h
930 procedure
:: acc_present_or_create_64_h
931 procedure
:: acc_present_or_create_array_h
934 interface acc_copyout
935 procedure
:: acc_copyout_32_h
936 procedure
:: acc_copyout_64_h
937 procedure
:: acc_copyout_array_h
940 interface acc_copyout_finalize
941 procedure
:: acc_copyout_finalize_32_h
942 procedure
:: acc_copyout_finalize_64_h
943 procedure
:: acc_copyout_finalize_array_h
947 procedure
:: acc_delete_32_h
948 procedure
:: acc_delete_64_h
949 procedure
:: acc_delete_array_h
952 interface acc_delete_finalize
953 procedure
:: acc_delete_finalize_32_h
954 procedure
:: acc_delete_finalize_64_h
955 procedure
:: acc_delete_finalize_array_h
958 interface acc_update_device
959 procedure
:: acc_update_device_32_h
960 procedure
:: acc_update_device_64_h
961 procedure
:: acc_update_device_array_h
964 interface acc_update_self
965 procedure
:: acc_update_self_32_h
966 procedure
:: acc_update_self_64_h
967 procedure
:: acc_update_self_array_h
971 subroutine acc_map_data (data_arg
, data_dev
, bytes
) bind(C
)
972 use iso_c_binding
, only
: c_ptr
, c_size_t
973 type(*), dimension(*) :: data_arg
974 type(c_ptr
), value
:: data_dev
975 integer(c_size_t
), value
:: bytes
980 subroutine acc_unmap_data (data_arg
) bind(C
)
981 type(*), dimension(*) :: data_arg
986 type(c_ptr
) function acc_deviceptr (data_arg
) bind(C
)
987 use iso_c_binding
, only
: c_ptr
988 type(*), dimension(*) :: data_arg
993 type(c_ptr
) function acc_hostptr (data_dev
) bind(C
)
994 use iso_c_binding
, only
: c_ptr
995 type(c_ptr
), value
:: data_dev
999 interface acc_is_present
1000 procedure
:: acc_is_present_32_h
1001 procedure
:: acc_is_present_64_h
1002 procedure
:: acc_is_present_array_h
1006 subroutine acc_memcpy_to_device (data_dev_dest
, data_host_src
, &
1008 use iso_c_binding
, only
: c_ptr
, c_size_t
1009 type(c_ptr
), value
:: data_dev_dest
1010 type(*),dimension(*) :: data_host_src
1011 integer(c_size_t
), value
:: bytes
1016 subroutine acc_memcpy_to_device_async (data_dev_dest
, data_host_src
, &
1017 bytes
, async_arg
) bind(C
)
1018 use iso_c_binding
, only
: c_ptr
, c_size_t
1019 import
:: acc_handle_kind
1020 type(c_ptr
), value
:: data_dev_dest
1021 type(*),dimension(*) :: data_host_src
1022 integer(c_size_t
), value
:: bytes
1023 integer(acc_handle_kind
), value
:: async_arg
1028 subroutine acc_memcpy_from_device (data_host_dest
, data_dev_src
, &
1030 use iso_c_binding
, only
: c_ptr
, c_size_t
1031 type(*),dimension(*) :: data_host_dest
1032 type(c_ptr
), value
:: data_dev_src
1033 integer(c_size_t
), value
:: bytes
1038 subroutine acc_memcpy_from_device_async (data_host_dest
, data_dev_src
, &
1039 bytes
, async_arg
) bind(C
)
1040 use iso_c_binding
, only
: c_ptr
, c_size_t
1041 import
:: acc_handle_kind
1042 type(*),dimension(*) :: data_host_dest
1043 type(c_ptr
), value
:: data_dev_src
1044 integer(c_size_t
), value
:: bytes
1045 integer(acc_handle_kind
), value
:: async_arg
1049 interface acc_copyin_async
1050 procedure
:: acc_copyin_async_32_h
1051 procedure
:: acc_copyin_async_64_h
1052 procedure
:: acc_copyin_async_array_h
1055 interface acc_create_async
1056 procedure
:: acc_create_async_32_h
1057 procedure
:: acc_create_async_64_h
1058 procedure
:: acc_create_async_array_h
1061 interface acc_copyout_async
1062 procedure
:: acc_copyout_async_32_h
1063 procedure
:: acc_copyout_async_64_h
1064 procedure
:: acc_copyout_async_array_h
1067 interface acc_delete_async
1068 procedure
:: acc_delete_async_32_h
1069 procedure
:: acc_delete_async_64_h
1070 procedure
:: acc_delete_async_array_h
1073 interface acc_update_device_async
1074 procedure
:: acc_update_device_async_32_h
1075 procedure
:: acc_update_device_async_64_h
1076 procedure
:: acc_update_device_async_array_h
1079 interface acc_update_self_async
1080 procedure
:: acc_update_self_async_32_h
1081 procedure
:: acc_update_self_async_64_h
1082 procedure
:: acc_update_self_async_array_h
1087 function acc_get_num_devices_h (devicetype
)
1088 use openacc_internal
, only
: acc_get_num_devices_l
1090 integer acc_get_num_devices_h
1091 integer (acc_device_kind
) devicetype
1092 acc_get_num_devices_h
= acc_get_num_devices_l (devicetype
)
1095 subroutine acc_set_device_type_h (devicetype
)
1096 use openacc_internal
, only
: acc_set_device_type_l
1098 integer (acc_device_kind
) devicetype
1099 call acc_set_device_type_l (devicetype
)
1102 function acc_get_device_type_h ()
1103 use openacc_internal
, only
: acc_get_device_type_l
1105 integer (acc_device_kind
) acc_get_device_type_h
1106 acc_get_device_type_h
= acc_get_device_type_l ()
1109 subroutine acc_set_device_num_h (devicenum
, devicetype
)
1110 use openacc_internal
, only
: acc_set_device_num_l
1113 integer (acc_device_kind
) devicetype
1114 call acc_set_device_num_l (devicenum
, devicetype
)
1117 function acc_get_device_num_h (devicetype
)
1118 use openacc_internal
, only
: acc_get_device_num_l
1120 integer acc_get_device_num_h
1121 integer (acc_device_kind
) devicetype
1122 acc_get_device_num_h
= acc_get_device_num_l (devicetype
)
1125 function acc_get_property_h (devicenum
, devicetype
, property
)
1126 use iso_c_binding
, only
: c_size_t
1127 use openacc_internal
, only
: acc_get_property_l
1129 implicit none (type, external)
1130 integer (c_size_t
) :: acc_get_property_h
1131 integer, value
:: devicenum
1132 integer (acc_device_kind
), value
:: devicetype
1133 integer (acc_device_property_kind
), value
:: property
1134 acc_get_property_h
= acc_get_property_l (devicenum
, devicetype
, property
)
1137 subroutine acc_get_property_string_h (devicenum
, devicetype
, property
, string
)
1138 use iso_c_binding
, only
: c_char
, c_size_t
, c_ptr
, c_f_pointer
, c_associated
1139 use openacc_internal
, only
: acc_get_property_string_l
1141 implicit none (type, external)
1142 integer, value
:: devicenum
1143 integer (acc_device_kind
), value
:: devicetype
1144 integer (acc_device_property_kind
), value
:: property
1145 character (*) :: string
1147 type (c_ptr
) :: cptr
1148 integer(c_size_t
) :: clen
, slen
, i
1149 character (kind
=c_char
, len
=1), pointer, contiguous
:: sptr (:)
1152 function strlen (s
) bind (C
, name
= "strlen")
1153 use iso_c_binding
, only
: c_ptr
, c_size_t
1154 type (c_ptr
), intent(in
), value
:: s
1155 integer (c_size_t
) :: strlen
1159 cptr
= acc_get_property_string_l (devicenum
, devicetype
, property
)
1161 if (.not
. c_associated (cptr
)) then
1165 clen
= strlen (cptr
)
1166 call c_f_pointer (cptr
, sptr
, [clen
])
1168 slen
= min (clen
, len (string
, kind
=c_size_t
))
1170 string (i
:i
) = sptr (i
)
1174 function acc_async_test_h (arg
)
1175 use openacc_internal
, only
: acc_async_test_l
1176 logical acc_async_test_h
1178 acc_async_test_h
= acc_async_test_l (arg
) /= 0
1181 function acc_async_test_all_h ()
1182 use openacc_internal
, only
: acc_async_test_all_l
1183 logical acc_async_test_all_h
1184 acc_async_test_all_h
= acc_async_test_all_l () /= 0
1187 subroutine acc_wait_h (arg
)
1188 use openacc_internal
, only
: acc_wait_l
1190 call acc_wait_l (arg
)
1193 subroutine acc_wait_async_h (arg
, async
)
1194 use openacc_internal
, only
: acc_wait_async_l
1196 call acc_wait_async_l (arg
, async
)
1199 subroutine acc_wait_all_h ()
1200 use openacc_internal
, only
: acc_wait_all_l
1201 call acc_wait_all_l ()
1204 subroutine acc_wait_all_async_h (async
)
1205 use openacc_internal
, only
: acc_wait_all_async_l
1207 call acc_wait_all_async_l (async
)
1210 subroutine acc_init_h (devicetype
)
1211 use openacc_internal
, only
: acc_init_l
1213 integer (acc_device_kind
) devicetype
1214 call acc_init_l (devicetype
)
1217 subroutine acc_shutdown_h (devicetype
)
1218 use openacc_internal
, only
: acc_shutdown_l
1220 integer (acc_device_kind
) devicetype
1221 call acc_shutdown_l (devicetype
)
1224 function acc_on_device_h (devicetype
)
1225 use openacc_internal
, only
: acc_on_device_l
1227 integer (acc_device_kind
) devicetype
1228 logical acc_on_device_h
1229 acc_on_device_h
= acc_on_device_l (devicetype
) /= 0
1232 subroutine acc_copyin_32_h (a
, len
)
1233 use iso_c_binding
, only
: c_int32_t
, c_size_t
1234 use openacc_internal
, only
: acc_copyin_l
1235 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1236 type (*), dimension (*) :: a
1237 integer (c_int32_t
) len
1238 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
1241 subroutine acc_copyin_64_h (a
, len
)
1242 use iso_c_binding
, only
: c_int64_t
, c_size_t
1243 use openacc_internal
, only
: acc_copyin_l
1244 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1245 type (*), dimension (*) :: a
1246 integer (c_int64_t
) len
1247 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
1250 subroutine acc_copyin_array_h (a
)
1251 use openacc_internal
, only
: acc_copyin_l
1252 type (*), dimension (..), contiguous
:: a
1253 call acc_copyin_l (a
, sizeof (a
))
1256 subroutine acc_present_or_copyin_32_h (a
, len
)
1257 use iso_c_binding
, only
: c_int32_t
, c_size_t
1258 use openacc_internal
, only
: acc_present_or_copyin_l
1259 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1260 type (*), dimension (*) :: a
1261 integer (c_int32_t
) len
1262 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
1265 subroutine acc_present_or_copyin_64_h (a
, len
)
1266 use iso_c_binding
, only
: c_int64_t
, c_size_t
1267 use openacc_internal
, only
: acc_present_or_copyin_l
1268 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1269 type (*), dimension (*) :: a
1270 integer (c_int64_t
) len
1271 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
1274 subroutine acc_present_or_copyin_array_h (a
)
1275 use openacc_internal
, only
: acc_present_or_copyin_l
1276 type (*), dimension (..), contiguous
:: a
1277 call acc_present_or_copyin_l (a
, sizeof (a
))
1280 subroutine acc_create_32_h (a
, len
)
1281 use iso_c_binding
, only
: c_int32_t
, c_size_t
1282 use openacc_internal
, only
: acc_create_l
1283 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1284 type (*), dimension (*) :: a
1285 integer (c_int32_t
) len
1286 call acc_create_l (a
, int (len
, kind
= c_size_t
))
1289 subroutine acc_create_64_h (a
, len
)
1290 use iso_c_binding
, only
: c_int64_t
, c_size_t
1291 use openacc_internal
, only
: acc_create_l
1292 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1293 type (*), dimension (*) :: a
1294 integer (c_int64_t
) len
1295 call acc_create_l (a
, int (len
, kind
= c_size_t
))
1298 subroutine acc_create_array_h (a
)
1299 use openacc_internal
, only
: acc_create_l
1300 type (*), dimension (..), contiguous
:: a
1301 call acc_create_l (a
, sizeof (a
))
1304 subroutine acc_present_or_create_32_h (a
, len
)
1305 use iso_c_binding
, only
: c_int32_t
, c_size_t
1306 use openacc_internal
, only
: acc_present_or_create_l
1307 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1308 type (*), dimension (*) :: a
1309 integer (c_int32_t
) len
1310 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
1313 subroutine acc_present_or_create_64_h (a
, len
)
1314 use iso_c_binding
, only
: c_int64_t
, c_size_t
1315 use openacc_internal
, only
: acc_present_or_create_l
1316 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1317 type (*), dimension (*) :: a
1318 integer (c_int64_t
) len
1319 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
1322 subroutine acc_present_or_create_array_h (a
)
1323 use openacc_internal
, only
: acc_present_or_create_l
1324 type (*), dimension (..), contiguous
:: a
1325 call acc_present_or_create_l (a
, sizeof (a
))
1328 subroutine acc_copyout_32_h (a
, len
)
1329 use iso_c_binding
, only
: c_int32_t
, c_size_t
1330 use openacc_internal
, only
: acc_copyout_l
1331 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1332 type (*), dimension (*) :: a
1333 integer (c_int32_t
) len
1334 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
1337 subroutine acc_copyout_64_h (a
, len
)
1338 use iso_c_binding
, only
: c_int64_t
, c_size_t
1339 use openacc_internal
, only
: acc_copyout_l
1340 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1341 type (*), dimension (*) :: a
1342 integer (c_int64_t
) len
1343 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
1346 subroutine acc_copyout_array_h (a
)
1347 use openacc_internal
, only
: acc_copyout_l
1348 type (*), dimension (..), contiguous
:: a
1349 call acc_copyout_l (a
, sizeof (a
))
1352 subroutine acc_copyout_finalize_32_h (a
, len
)
1353 use iso_c_binding
, only
: c_int32_t
, c_size_t
1354 use openacc_internal
, only
: acc_copyout_finalize_l
1355 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1356 type (*), dimension (*) :: a
1357 integer (c_int32_t
) len
1358 call acc_copyout_finalize_l (a
, int (len
, kind
= c_size_t
))
1361 subroutine acc_copyout_finalize_64_h (a
, len
)
1362 use iso_c_binding
, only
: c_int64_t
, c_size_t
1363 use openacc_internal
, only
: acc_copyout_finalize_l
1364 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1365 type (*), dimension (*) :: a
1366 integer (c_int64_t
) len
1367 call acc_copyout_finalize_l (a
, int (len
, kind
= c_size_t
))
1370 subroutine acc_copyout_finalize_array_h (a
)
1371 use openacc_internal
, only
: acc_copyout_finalize_l
1372 type (*), dimension (..), contiguous
:: a
1373 call acc_copyout_finalize_l (a
, sizeof (a
))
1376 subroutine acc_delete_32_h (a
, len
)
1377 use iso_c_binding
, only
: c_int32_t
, c_size_t
1378 use openacc_internal
, only
: acc_delete_l
1379 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1380 type (*), dimension (*) :: a
1381 integer (c_int32_t
) len
1382 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
1385 subroutine acc_delete_64_h (a
, len
)
1386 use iso_c_binding
, only
: c_int64_t
, c_size_t
1387 use openacc_internal
, only
: acc_delete_l
1388 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1389 type (*), dimension (*) :: a
1390 integer (c_int64_t
) len
1391 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
1394 subroutine acc_delete_array_h (a
)
1395 use openacc_internal
, only
: acc_delete_l
1396 type (*), dimension (..), contiguous
:: a
1397 call acc_delete_l (a
, sizeof (a
))
1400 subroutine acc_delete_finalize_32_h (a
, len
)
1401 use iso_c_binding
, only
: c_int32_t
, c_size_t
1402 use openacc_internal
, only
: acc_delete_finalize_l
1403 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1404 type (*), dimension (*) :: a
1405 integer (c_int32_t
) len
1406 call acc_delete_finalize_l (a
, int (len
, kind
= c_size_t
))
1409 subroutine acc_delete_finalize_64_h (a
, len
)
1410 use iso_c_binding
, only
: c_int64_t
, c_size_t
1411 use openacc_internal
, only
: acc_delete_finalize_l
1412 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1413 type (*), dimension (*) :: a
1414 integer (c_int64_t
) len
1415 call acc_delete_finalize_l (a
, int (len
, kind
= c_size_t
))
1418 subroutine acc_delete_finalize_array_h (a
)
1419 use openacc_internal
, only
: acc_delete_finalize_l
1420 type (*), dimension (..), contiguous
:: a
1421 call acc_delete_finalize_l (a
, sizeof (a
))
1424 subroutine acc_update_device_32_h (a
, len
)
1425 use iso_c_binding
, only
: c_int32_t
, c_size_t
1426 use openacc_internal
, only
: acc_update_device_l
1427 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1428 type (*), dimension (*) :: a
1429 integer (c_int32_t
) len
1430 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
1433 subroutine acc_update_device_64_h (a
, len
)
1434 use iso_c_binding
, only
: c_int64_t
, c_size_t
1435 use openacc_internal
, only
: acc_update_device_l
1436 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1437 type (*), dimension (*) :: a
1438 integer (c_int64_t
) len
1439 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
1442 subroutine acc_update_device_array_h (a
)
1443 use openacc_internal
, only
: acc_update_device_l
1444 type (*), dimension (..), contiguous
:: a
1445 call acc_update_device_l (a
, sizeof (a
))
1448 subroutine acc_update_self_32_h (a
, len
)
1449 use iso_c_binding
, only
: c_int32_t
, c_size_t
1450 use openacc_internal
, only
: acc_update_self_l
1451 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1452 type (*), dimension (*) :: a
1453 integer (c_int32_t
) len
1454 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
1457 subroutine acc_update_self_64_h (a
, len
)
1458 use iso_c_binding
, only
: c_int64_t
, c_size_t
1459 use openacc_internal
, only
: acc_update_self_l
1460 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1461 type (*), dimension (*) :: a
1462 integer (c_int64_t
) len
1463 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
1466 subroutine acc_update_self_array_h (a
)
1467 use openacc_internal
, only
: acc_update_self_l
1468 type (*), dimension (..), contiguous
:: a
1469 call acc_update_self_l (a
, sizeof (a
))
1472 function acc_is_present_32_h (a
, len
)
1473 use iso_c_binding
, only
: c_int32_t
, c_size_t
1474 use openacc_internal
, only
: acc_is_present_l
1475 logical acc_is_present_32_h
1476 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1477 type (*), dimension (*) :: a
1478 integer (c_int32_t
) len
1479 acc_is_present_32_h
= acc_is_present_l (a
, int (len
, kind
= c_size_t
)) /= 0
1482 function acc_is_present_64_h (a
, len
)
1483 use iso_c_binding
, only
: c_int64_t
, c_size_t
1484 use openacc_internal
, only
: acc_is_present_l
1485 logical acc_is_present_64_h
1486 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1487 type (*), dimension (*) :: a
1488 integer (c_int64_t
) len
1489 acc_is_present_64_h
= acc_is_present_l (a
, int (len
, kind
= c_size_t
)) /= 0
1492 function acc_is_present_array_h (a
)
1493 use openacc_internal
, only
: acc_is_present_l
1494 logical acc_is_present_array_h
1495 type (*), dimension (..), contiguous
:: a
1496 acc_is_present_array_h
= acc_is_present_l (a
, sizeof (a
)) /= 0
1499 subroutine acc_copyin_async_32_h (a
, len
, async
)
1500 use iso_c_binding
, only
: c_int32_t
, c_size_t
, c_int
1501 use openacc_internal
, only
: acc_copyin_async_l
1502 use openacc_kinds
, only
: acc_handle_kind
1503 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1504 type (*), dimension (*) :: a
1505 integer (c_int32_t
) len
1506 integer (acc_handle_kind
) async
1507 call acc_copyin_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1510 subroutine acc_copyin_async_64_h (a
, len
, async
)
1511 use iso_c_binding
, only
: c_int64_t
, c_size_t
, c_int
1512 use openacc_internal
, only
: acc_copyin_async_l
1513 use openacc_kinds
, only
: acc_handle_kind
1514 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1515 type (*), dimension (*) :: a
1516 integer (c_int64_t
) len
1517 integer (acc_handle_kind
) async
1518 call acc_copyin_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1521 subroutine acc_copyin_async_array_h (a
, async
)
1522 use iso_c_binding
, only
: c_int
1523 use openacc_internal
, only
: acc_copyin_async_l
1524 use openacc_kinds
, only
: acc_handle_kind
1525 type (*), dimension (..), contiguous
:: a
1526 integer (acc_handle_kind
) async
1527 call acc_copyin_async_l (a
, sizeof (a
), int (async
, kind
= c_int
))
1530 subroutine acc_create_async_32_h (a
, len
, async
)
1531 use iso_c_binding
, only
: c_int32_t
, c_size_t
, c_int
1532 use openacc_internal
, only
: acc_create_async_l
1533 use openacc_kinds
, only
: acc_handle_kind
1534 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1535 type (*), dimension (*) :: a
1536 integer (c_int32_t
) len
1537 integer (acc_handle_kind
) async
1538 call acc_create_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1541 subroutine acc_create_async_64_h (a
, len
, async
)
1542 use iso_c_binding
, only
: c_int64_t
, c_size_t
, c_int
1543 use openacc_internal
, only
: acc_create_async_l
1544 use openacc_kinds
, only
: acc_handle_kind
1545 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1546 type (*), dimension (*) :: a
1547 integer (c_int64_t
) len
1548 integer (acc_handle_kind
) async
1549 call acc_create_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1552 subroutine acc_create_async_array_h (a
, async
)
1553 use iso_c_binding
, only
: c_int
1554 use openacc_internal
, only
: acc_create_async_l
1555 use openacc_kinds
, only
: acc_handle_kind
1556 type (*), dimension (..), contiguous
:: a
1557 integer (acc_handle_kind
) async
1558 call acc_create_async_l (a
, sizeof (a
), int (async
, kind
= c_int
))
1561 subroutine acc_copyout_async_32_h (a
, len
, async
)
1562 use iso_c_binding
, only
: c_int32_t
, c_size_t
, c_int
1563 use openacc_internal
, only
: acc_copyout_async_l
1564 use openacc_kinds
, only
: acc_handle_kind
1565 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1566 type (*), dimension (*) :: a
1567 integer (c_int32_t
) len
1568 integer (acc_handle_kind
) async
1569 call acc_copyout_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1572 subroutine acc_copyout_async_64_h (a
, len
, async
)
1573 use iso_c_binding
, only
: c_int64_t
, c_size_t
, c_int
1574 use openacc_internal
, only
: acc_copyout_async_l
1575 use openacc_kinds
, only
: acc_handle_kind
1576 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1577 type (*), dimension (*) :: a
1578 integer (c_int64_t
) len
1579 integer (acc_handle_kind
) async
1580 call acc_copyout_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1583 subroutine acc_copyout_async_array_h (a
, async
)
1584 use iso_c_binding
, only
: c_int
1585 use openacc_internal
, only
: acc_copyout_async_l
1586 use openacc_kinds
, only
: acc_handle_kind
1587 type (*), dimension (..), contiguous
:: a
1588 integer (acc_handle_kind
) async
1589 call acc_copyout_async_l (a
, sizeof (a
), int (async
, kind
= c_int
))
1592 subroutine acc_delete_async_32_h (a
, len
, async
)
1593 use iso_c_binding
, only
: c_int32_t
, c_size_t
, c_int
1594 use openacc_internal
, only
: acc_delete_async_l
1595 use openacc_kinds
, only
: acc_handle_kind
1596 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1597 type (*), dimension (*) :: a
1598 integer (c_int32_t
) len
1599 integer (acc_handle_kind
) async
1600 call acc_delete_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1603 subroutine acc_delete_async_64_h (a
, len
, async
)
1604 use iso_c_binding
, only
: c_int64_t
, c_size_t
, c_int
1605 use openacc_internal
, only
: acc_delete_async_l
1606 use openacc_kinds
, only
: acc_handle_kind
1607 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1608 type (*), dimension (*) :: a
1609 integer (c_int64_t
) len
1610 integer (acc_handle_kind
) async
1611 call acc_delete_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1614 subroutine acc_delete_async_array_h (a
, async
)
1615 use iso_c_binding
, only
: c_int
1616 use openacc_internal
, only
: acc_delete_async_l
1617 use openacc_kinds
, only
: acc_handle_kind
1618 type (*), dimension (..), contiguous
:: a
1619 integer (acc_handle_kind
) async
1620 call acc_delete_async_l (a
, sizeof (a
), int (async
, kind
= c_int
))
1623 subroutine acc_update_device_async_32_h (a
, len
, async
)
1624 use iso_c_binding
, only
: c_int32_t
, c_size_t
, c_int
1625 use openacc_internal
, only
: acc_update_device_async_l
1626 use openacc_kinds
, only
: acc_handle_kind
1627 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1628 type (*), dimension (*) :: a
1629 integer (c_int32_t
) len
1630 integer (acc_handle_kind
) async
1631 call acc_update_device_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1634 subroutine acc_update_device_async_64_h (a
, len
, async
)
1635 use iso_c_binding
, only
: c_int64_t
, c_size_t
, c_int
1636 use openacc_internal
, only
: acc_update_device_async_l
1637 use openacc_kinds
, only
: acc_handle_kind
1638 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1639 type (*), dimension (*) :: a
1640 integer (c_int64_t
) len
1641 integer (acc_handle_kind
) async
1642 call acc_update_device_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1645 subroutine acc_update_device_async_array_h (a
, async
)
1646 use iso_c_binding
, only
: c_int
1647 use openacc_internal
, only
: acc_update_device_async_l
1648 use openacc_kinds
, only
: acc_handle_kind
1649 type (*), dimension (..), contiguous
:: a
1650 integer (acc_handle_kind
) async
1651 call acc_update_device_async_l (a
, sizeof (a
), int (async
, kind
= c_int
))
1654 subroutine acc_update_self_async_32_h (a
, len
, async
)
1655 use iso_c_binding
, only
: c_int32_t
, c_size_t
, c_int
1656 use openacc_internal
, only
: acc_update_self_async_l
1657 use openacc_kinds
, only
: acc_handle_kind
1658 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1659 type (*), dimension (*) :: a
1660 integer (c_int32_t
) len
1661 integer (acc_handle_kind
) async
1662 call acc_update_self_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1665 subroutine acc_update_self_async_64_h (a
, len
, async
)
1666 use iso_c_binding
, only
: c_int64_t
, c_size_t
, c_int
1667 use openacc_internal
, only
: acc_update_self_async_l
1668 use openacc_kinds
, only
: acc_handle_kind
1669 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
1670 type (*), dimension (*) :: a
1671 integer (c_int64_t
) len
1672 integer (acc_handle_kind
) async
1673 call acc_update_self_async_l (a
, int (len
, kind
= c_size_t
), int (async
, kind
= c_int
))
1676 subroutine acc_update_self_async_array_h (a
, async
)
1677 use iso_c_binding
, only
: c_int
1678 use openacc_internal
, only
: acc_update_self_async_l
1679 use openacc_kinds
, only
: acc_handle_kind
1680 type (*), dimension (..), contiguous
:: a
1681 integer (acc_handle_kind
) async
1682 call acc_update_self_async_l (a
, sizeof (a
), int (async
, kind
= c_int
))