1 ! OpenACC Runtime Library Definitions.
3 ! Copyright (C) 2014 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/>.
31 use iso_fortran_env
, only
: int32
35 public
:: acc_device_kind
37 integer, parameter :: acc_device_kind
= int32
39 public
:: acc_device_none
, acc_device_default
, acc_device_host
40 public
:: acc_device_not_host
, acc_device_nvidia
42 integer (acc_device_kind
), parameter :: acc_device_none
= 0
43 integer (acc_device_kind
), parameter :: acc_device_default
= 1
44 integer (acc_device_kind
), parameter :: acc_device_host
= 2
45 integer (acc_device_kind
), parameter :: acc_device_host_nonshm
= 3
46 integer (acc_device_kind
), parameter :: acc_device_not_host
= 4
47 integer (acc_device_kind
), parameter :: acc_device_nvidia
= 5
49 public
:: acc_handle_kind
51 integer, parameter :: acc_handle_kind
= int32
53 public
:: acc_async_noval
, acc_async_sync
55 integer (acc_handle_kind
), parameter :: acc_async_noval
= -1
56 integer (acc_handle_kind
), parameter :: acc_async_sync
= -2
60 module openacc_internal
65 function acc_get_num_devices_h (d
)
67 integer acc_get_num_devices_h
68 integer (acc_device_kind
) d
71 subroutine acc_set_device_type_h (d
)
73 integer (acc_device_kind
) d
76 function acc_get_device_type_h ()
78 integer (acc_device_kind
) acc_get_device_type_h
81 subroutine acc_set_device_num_h (n
, d
)
84 integer (acc_device_kind
) d
87 function acc_get_device_num_h (d
)
89 integer acc_get_device_num_h
90 integer (acc_device_kind
) d
93 function acc_async_test_h (a
)
94 logical acc_async_test_h
98 function acc_async_test_all_h ()
99 logical acc_async_test_all_h
102 subroutine acc_wait_h (a
)
106 subroutine acc_wait_async_h (a1
, a2
)
110 subroutine acc_wait_all_h ()
113 subroutine acc_wait_all_async_h (a
)
117 subroutine acc_init_h (d
)
119 integer (acc_device_kind
) d
122 subroutine acc_shutdown_h (d
)
124 integer (acc_device_kind
) d
127 function acc_on_device_h (d
)
129 integer (acc_device_kind
) d
130 logical acc_on_device_h
133 subroutine acc_copyin_32_h (a
, len
)
134 use iso_c_binding
, only
: c_int32_t
135 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
136 type (*), dimension (*) :: a
137 integer (c_int32_t
) len
140 subroutine acc_copyin_64_h (a
, len
)
141 use iso_c_binding
, only
: c_int64_t
142 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
143 type (*), dimension (*) :: a
144 integer (c_int64_t
) len
147 subroutine acc_copyin_array_h (a
)
148 type (*), dimension (..), contiguous
:: a
151 subroutine acc_present_or_copyin_32_h (a
, len
)
152 use iso_c_binding
, only
: c_int32_t
153 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
154 type (*), dimension (*) :: a
155 integer (c_int32_t
) len
158 subroutine acc_present_or_copyin_64_h (a
, len
)
159 use iso_c_binding
, only
: c_int64_t
160 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
161 type (*), dimension (*) :: a
162 integer (c_int64_t
) len
165 subroutine acc_present_or_copyin_array_h (a
)
166 type (*), dimension (..), contiguous
:: a
169 subroutine acc_create_32_h (a
, len
)
170 use iso_c_binding
, only
: c_int32_t
171 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
172 type (*), dimension (*) :: a
173 integer (c_int32_t
) len
176 subroutine acc_create_64_h (a
, len
)
177 use iso_c_binding
, only
: c_int64_t
178 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
179 type (*), dimension (*) :: a
180 integer (c_int64_t
) len
183 subroutine acc_create_array_h (a
)
184 type (*), dimension (..), contiguous
:: a
187 subroutine acc_present_or_create_32_h (a
, len
)
188 use iso_c_binding
, only
: c_int32_t
189 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
190 type (*), dimension (*) :: a
191 integer (c_int32_t
) len
194 subroutine acc_present_or_create_64_h (a
, len
)
195 use iso_c_binding
, only
: c_int64_t
196 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
197 type (*), dimension (*) :: a
198 integer (c_int64_t
) len
201 subroutine acc_present_or_create_array_h (a
)
202 type (*), dimension (..), contiguous
:: a
205 subroutine acc_copyout_32_h (a
, len
)
206 use iso_c_binding
, only
: c_int32_t
207 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
208 type (*), dimension (*) :: a
209 integer (c_int32_t
) len
212 subroutine acc_copyout_64_h (a
, len
)
213 use iso_c_binding
, only
: c_int64_t
214 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
215 type (*), dimension (*) :: a
216 integer (c_int64_t
) len
219 subroutine acc_copyout_array_h (a
)
220 type (*), dimension (..), contiguous
:: a
223 subroutine acc_delete_32_h (a
, len
)
224 use iso_c_binding
, only
: c_int32_t
225 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
226 type (*), dimension (*) :: a
227 integer (c_int32_t
) len
230 subroutine acc_delete_64_h (a
, len
)
231 use iso_c_binding
, only
: c_int64_t
232 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
233 type (*), dimension (*) :: a
234 integer (c_int64_t
) len
237 subroutine acc_delete_array_h (a
)
238 type (*), dimension (..), contiguous
:: a
241 subroutine acc_update_device_32_h (a
, len
)
242 use iso_c_binding
, only
: c_int32_t
243 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
244 type (*), dimension (*) :: a
245 integer (c_int32_t
) len
248 subroutine acc_update_device_64_h (a
, len
)
249 use iso_c_binding
, only
: c_int64_t
250 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
251 type (*), dimension (*) :: a
252 integer (c_int64_t
) len
255 subroutine acc_update_device_array_h (a
)
256 type (*), dimension (..), contiguous
:: a
259 subroutine acc_update_self_32_h (a
, len
)
260 use iso_c_binding
, only
: c_int32_t
261 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
262 type (*), dimension (*) :: a
263 integer (c_int32_t
) len
266 subroutine acc_update_self_64_h (a
, len
)
267 use iso_c_binding
, only
: c_int64_t
268 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
269 type (*), dimension (*) :: a
270 integer (c_int64_t
) len
273 subroutine acc_update_self_array_h (a
)
274 type (*), dimension (..), contiguous
:: a
277 function acc_is_present_32_h (a
, len
)
278 use iso_c_binding
, only
: c_int32_t
279 logical acc_is_present_32_h
280 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
281 type (*), dimension (*) :: a
282 integer (c_int32_t
) len
285 function acc_is_present_64_h (a
, len
)
286 use iso_c_binding
, only
: c_int64_t
287 logical acc_is_present_64_h
288 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
289 type (*), dimension (*) :: a
290 integer (c_int64_t
) len
293 function acc_is_present_array_h (a
)
294 logical acc_is_present_array_h
295 type (*), dimension (..), contiguous
:: a
300 function acc_get_num_devices_l (d
) &
301 bind (C
, name
= "acc_get_num_devices")
302 use iso_c_binding
, only
: c_int
303 integer (c_int
) :: acc_get_num_devices_l
304 integer (c_int
), value
:: d
307 subroutine acc_set_device_type_l (d
) &
308 bind (C
, name
= "acc_set_device_type")
309 use iso_c_binding
, only
: c_int
310 integer (c_int
), value
:: d
313 function acc_get_device_type_l () &
314 bind (C
, name
= "acc_get_device_type")
315 use iso_c_binding
, only
: c_int
316 integer (c_int
) :: acc_get_device_type_l
319 subroutine acc_set_device_num_l (n
, d
) &
320 bind (C
, name
= "acc_set_device_num")
321 use iso_c_binding
, only
: c_int
322 integer (c_int
), value
:: n
, d
325 function acc_get_device_num_l (d
) &
326 bind (C
, name
= "acc_get_device_num")
327 use iso_c_binding
, only
: c_int
328 integer (c_int
) :: acc_get_device_num_l
329 integer (c_int
), value
:: d
332 function acc_async_test_l (a
) &
333 bind (C
, name
= "acc_async_test")
334 use iso_c_binding
, only
: c_int
335 integer (c_int
) :: acc_async_test_l
336 integer (c_int
), value
:: a
339 function acc_async_test_all_l () &
340 bind (C
, name
= "acc_async_test_all")
341 use iso_c_binding
, only
: c_int
342 integer (c_int
) :: acc_async_test_all_l
345 subroutine acc_wait_l (a
) &
346 bind (C
, name
= "acc_wait")
347 use iso_c_binding
, only
: c_int
348 integer (c_int
), value
:: a
351 subroutine acc_wait_async_l (a1
, a2
) &
352 bind (C
, name
= "acc_wait_async")
353 use iso_c_binding
, only
: c_int
354 integer (c_int
), value
:: a1
, a2
357 subroutine acc_wait_all_l () &
358 bind (C
, name
= "acc_wait_all")
359 use iso_c_binding
, only
: c_int
362 subroutine acc_wait_all_async_l (a
) &
363 bind (C
, name
= "acc_wait_all_async")
364 use iso_c_binding
, only
: c_int
365 integer (c_int
), value
:: a
368 subroutine acc_init_l (d
) &
369 bind (C
, name
= "acc_init")
370 use iso_c_binding
, only
: c_int
371 integer (c_int
), value
:: d
374 subroutine acc_shutdown_l (d
) &
375 bind (C
, name
= "acc_shutdown")
376 use iso_c_binding
, only
: c_int
377 integer (c_int
), value
:: d
380 function acc_on_device_l (d
) &
381 bind (C
, name
= "acc_on_device")
382 use iso_c_binding
, only
: c_int
383 integer (c_int
) :: acc_on_device_l
384 integer (c_int
), value
:: d
387 subroutine acc_copyin_l (a
, len
) &
388 bind (C
, name
= "acc_copyin")
389 use iso_c_binding
, only
: c_size_t
390 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
391 type (*), dimension (*) :: a
392 integer (c_size_t
), value
:: len
395 subroutine acc_present_or_copyin_l (a
, len
) &
396 bind (C
, name
= "acc_present_or_copyin")
397 use iso_c_binding
, only
: c_size_t
398 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
399 type (*), dimension (*) :: a
400 integer (c_size_t
), value
:: len
403 subroutine acc_create_l (a
, len
) &
404 bind (C
, name
= "acc_create")
405 use iso_c_binding
, only
: c_size_t
406 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
407 type (*), dimension (*) :: a
408 integer (c_size_t
), value
:: len
411 subroutine acc_present_or_create_l (a
, len
) &
412 bind (C
, name
= "acc_present_or_create")
413 use iso_c_binding
, only
: c_size_t
414 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
415 type (*), dimension (*) :: a
416 integer (c_size_t
), value
:: len
419 subroutine acc_copyout_l (a
, len
) &
420 bind (C
, name
= "acc_copyout")
421 use iso_c_binding
, only
: c_size_t
422 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
423 type (*), dimension (*) :: a
424 integer (c_size_t
), value
:: len
427 subroutine acc_delete_l (a
, len
) &
428 bind (C
, name
= "acc_delete")
429 use iso_c_binding
, only
: c_size_t
430 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
431 type (*), dimension (*) :: a
432 integer (c_size_t
), value
:: len
435 subroutine acc_update_device_l (a
, len
) &
436 bind (C
, name
= "acc_update_device")
437 use iso_c_binding
, only
: c_size_t
438 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
439 type (*), dimension (*) :: a
440 integer (c_size_t
), value
:: len
443 subroutine acc_update_self_l (a
, len
) &
444 bind (C
, name
= "acc_update_self")
445 use iso_c_binding
, only
: c_size_t
446 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
447 type (*), dimension (*) :: a
448 integer (c_size_t
), value
:: len
451 function acc_is_present_l (a
, len
) &
452 bind (C
, name
= "acc_is_present")
453 use iso_c_binding
, only
: c_int32_t
, c_size_t
454 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
455 integer (c_int32_t
) :: acc_is_present_l
456 type (*), dimension (*) :: a
457 integer (c_size_t
), value
:: len
467 public
:: openacc_version
469 public
:: acc_get_num_devices
, acc_set_device_type
, acc_get_device_type
470 public
:: acc_set_device_num
, acc_get_device_num
, acc_async_test
471 public
:: acc_async_test_all
, acc_wait
, acc_wait_async
, acc_wait_all
472 public
:: acc_wait_all_async
, acc_init
, acc_shutdown
, acc_on_device
473 public
:: acc_copyin
, acc_present_or_copyin
, acc_pcopyin
, acc_create
474 public
:: acc_present_or_create
, acc_pcreate
, acc_copyout
, acc_delete
475 public
:: acc_update_device
, acc_update_self
, acc_is_present
477 integer, parameter :: openacc_version
= 201306
479 interface acc_get_num_devices
480 procedure
:: acc_get_num_devices_h
483 interface acc_set_device_type
484 procedure
:: acc_set_device_type_h
487 interface acc_get_device_type
488 procedure
:: acc_get_device_type_h
491 interface acc_set_device_num
492 procedure
:: acc_set_device_num_h
495 interface acc_get_device_num
496 procedure
:: acc_get_device_num_h
499 interface acc_async_test
500 procedure
:: acc_async_test_h
503 interface acc_async_test_all
504 procedure
:: acc_async_test_all_h
508 procedure
:: acc_wait_h
511 interface acc_wait_async
512 procedure
:: acc_wait_async_h
515 interface acc_wait_all
516 procedure
:: acc_wait_all_h
519 interface acc_wait_all_async
520 procedure
:: acc_wait_all_async_h
524 procedure
:: acc_init_h
527 interface acc_shutdown
528 procedure
:: acc_shutdown_h
531 interface acc_on_device
532 procedure
:: acc_on_device_h
535 ! acc_malloc: Only available in C/C++
536 ! acc_free: Only available in C/C++
538 ! As vendor extension, the following code supports both 32bit and 64bit
539 ! arguments for "size"; the OpenACC standard only permits default-kind
540 ! integers, which are of kind 4 (i.e. 32 bits).
541 ! Additionally, the two-argument version also takes arrays as argument.
542 ! and the one argument version also scalars. Note that the code assumes
543 ! that the arrays are contiguous.
546 procedure
:: acc_copyin_32_h
547 procedure
:: acc_copyin_64_h
548 procedure
:: acc_copyin_array_h
551 interface acc_present_or_copyin
552 procedure
:: acc_present_or_copyin_32_h
553 procedure
:: acc_present_or_copyin_64_h
554 procedure
:: acc_present_or_copyin_array_h
557 interface acc_pcopyin
558 procedure
:: acc_present_or_copyin_32_h
559 procedure
:: acc_present_or_copyin_64_h
560 procedure
:: acc_present_or_copyin_array_h
564 procedure
:: acc_create_32_h
565 procedure
:: acc_create_64_h
566 procedure
:: acc_create_array_h
569 interface acc_present_or_create
570 procedure
:: acc_present_or_create_32_h
571 procedure
:: acc_present_or_create_64_h
572 procedure
:: acc_present_or_create_array_h
575 interface acc_pcreate
576 procedure
:: acc_present_or_create_32_h
577 procedure
:: acc_present_or_create_64_h
578 procedure
:: acc_present_or_create_array_h
581 interface acc_copyout
582 procedure
:: acc_copyout_32_h
583 procedure
:: acc_copyout_64_h
584 procedure
:: acc_copyout_array_h
588 procedure
:: acc_delete_32_h
589 procedure
:: acc_delete_64_h
590 procedure
:: acc_delete_array_h
593 interface acc_update_device
594 procedure
:: acc_update_device_32_h
595 procedure
:: acc_update_device_64_h
596 procedure
:: acc_update_device_array_h
599 interface acc_update_self
600 procedure
:: acc_update_self_32_h
601 procedure
:: acc_update_self_64_h
602 procedure
:: acc_update_self_array_h
605 ! acc_map_data: Only available in C/C++
606 ! acc_unmap_data: Only available in C/C++
607 ! acc_deviceptr: Only available in C/C++
608 ! acc_hostptr: Only available in C/C++
610 interface acc_is_present
611 procedure
:: acc_is_present_32_h
612 procedure
:: acc_is_present_64_h
613 procedure
:: acc_is_present_array_h
616 ! acc_memcpy_to_device: Only available in C/C++
617 ! acc_memcpy_from_device: Only available in C/C++
621 function acc_get_num_devices_h (d
)
622 use openacc_internal
, only
: acc_get_num_devices_l
624 integer acc_get_num_devices_h
625 integer (acc_device_kind
) d
626 acc_get_num_devices_h
= acc_get_num_devices_l (d
)
629 subroutine acc_set_device_type_h (d
)
630 use openacc_internal
, only
: acc_set_device_type_l
632 integer (acc_device_kind
) d
633 call acc_set_device_type_l (d
)
636 function acc_get_device_type_h ()
637 use openacc_internal
, only
: acc_get_device_type_l
639 integer (acc_device_kind
) acc_get_device_type_h
640 acc_get_device_type_h
= acc_get_device_type_l ()
643 subroutine acc_set_device_num_h (n
, d
)
644 use openacc_internal
, only
: acc_set_device_num_l
647 integer (acc_device_kind
) d
648 call acc_set_device_num_l (n
, d
)
651 function acc_get_device_num_h (d
)
652 use openacc_internal
, only
: acc_get_device_num_l
654 integer acc_get_device_num_h
655 integer (acc_device_kind
) d
656 acc_get_device_num_h
= acc_get_device_num_l (d
)
659 function acc_async_test_h (a
)
660 use openacc_internal
, only
: acc_async_test_l
661 logical acc_async_test_h
663 if (acc_async_test_l (a
) .eq
. 1) then
664 acc_async_test_h
= .TRUE
.
666 acc_async_test_h
= .FALSE
.
670 function acc_async_test_all_h ()
671 use openacc_internal
, only
: acc_async_test_all_l
672 logical acc_async_test_all_h
673 if (acc_async_test_all_l () .eq
. 1) then
674 acc_async_test_all_h
= .TRUE
.
676 acc_async_test_all_h
= .FALSE
.
680 subroutine acc_wait_h (a
)
681 use openacc_internal
, only
: acc_wait_l
686 subroutine acc_wait_async_h (a1
, a2
)
687 use openacc_internal
, only
: acc_wait_async_l
689 call acc_wait_async_l (a1
, a2
)
692 subroutine acc_wait_all_h ()
693 use openacc_internal
, only
: acc_wait_all_l
694 call acc_wait_all_l ()
697 subroutine acc_wait_all_async_h (a
)
698 use openacc_internal
, only
: acc_wait_all_async_l
700 call acc_wait_all_async_l (a
)
703 subroutine acc_init_h (d
)
704 use openacc_internal
, only
: acc_init_l
706 integer (acc_device_kind
) d
710 subroutine acc_shutdown_h (d
)
711 use openacc_internal
, only
: acc_shutdown_l
713 integer (acc_device_kind
) d
714 call acc_shutdown_l (d
)
717 function acc_on_device_h (d
)
718 use openacc_internal
, only
: acc_on_device_l
720 integer (acc_device_kind
) d
721 logical acc_on_device_h
722 if (acc_on_device_l (d
) .eq
. 1) then
723 acc_on_device_h
= .TRUE
.
725 acc_on_device_h
= .FALSE
.
729 subroutine acc_copyin_32_h (a
, len
)
730 use iso_c_binding
, only
: c_int32_t
, c_size_t
731 use openacc_internal
, only
: acc_copyin_l
732 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
733 type (*), dimension (*) :: a
734 integer (c_int32_t
) len
735 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
738 subroutine acc_copyin_64_h (a
, len
)
739 use iso_c_binding
, only
: c_int64_t
, c_size_t
740 use openacc_internal
, only
: acc_copyin_l
741 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
742 type (*), dimension (*) :: a
743 integer (c_int64_t
) len
744 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
747 subroutine acc_copyin_array_h (a
)
748 use openacc_internal
, only
: acc_copyin_l
749 type (*), dimension (..), contiguous
:: a
750 call acc_copyin_l (a
, sizeof (a
))
753 subroutine acc_present_or_copyin_32_h (a
, len
)
754 use iso_c_binding
, only
: c_int32_t
, c_size_t
755 use openacc_internal
, only
: acc_present_or_copyin_l
756 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
757 type (*), dimension (*) :: a
758 integer (c_int32_t
) len
759 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
762 subroutine acc_present_or_copyin_64_h (a
, len
)
763 use iso_c_binding
, only
: c_int64_t
, c_size_t
764 use openacc_internal
, only
: acc_present_or_copyin_l
765 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
766 type (*), dimension (*) :: a
767 integer (c_int64_t
) len
768 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
771 subroutine acc_present_or_copyin_array_h (a
)
772 use openacc_internal
, only
: acc_present_or_copyin_l
773 type (*), dimension (..), contiguous
:: a
774 call acc_present_or_copyin_l (a
, sizeof (a
))
777 subroutine acc_create_32_h (a
, len
)
778 use iso_c_binding
, only
: c_int32_t
, c_size_t
779 use openacc_internal
, only
: acc_create_l
780 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
781 type (*), dimension (*) :: a
782 integer (c_int32_t
) len
783 call acc_create_l (a
, int (len
, kind
= c_size_t
))
786 subroutine acc_create_64_h (a
, len
)
787 use iso_c_binding
, only
: c_int64_t
, c_size_t
788 use openacc_internal
, only
: acc_create_l
789 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
790 type (*), dimension (*) :: a
791 integer (c_int64_t
) len
792 call acc_create_l (a
, int (len
, kind
= c_size_t
))
795 subroutine acc_create_array_h (a
)
796 use openacc_internal
, only
: acc_create_l
797 type (*), dimension (..), contiguous
:: a
798 call acc_create_l (a
, sizeof (a
))
801 subroutine acc_present_or_create_32_h (a
, len
)
802 use iso_c_binding
, only
: c_int32_t
, c_size_t
803 use openacc_internal
, only
: acc_present_or_create_l
804 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
805 type (*), dimension (*) :: a
806 integer (c_int32_t
) len
807 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
810 subroutine acc_present_or_create_64_h (a
, len
)
811 use iso_c_binding
, only
: c_int64_t
, c_size_t
812 use openacc_internal
, only
: acc_present_or_create_l
813 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
814 type (*), dimension (*) :: a
815 integer (c_int64_t
) len
816 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
819 subroutine acc_present_or_create_array_h (a
)
820 use openacc_internal
, only
: acc_present_or_create_l
821 type (*), dimension (..), contiguous
:: a
822 call acc_present_or_create_l (a
, sizeof (a
))
825 subroutine acc_copyout_32_h (a
, len
)
826 use iso_c_binding
, only
: c_int32_t
, c_size_t
827 use openacc_internal
, only
: acc_copyout_l
828 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
829 type (*), dimension (*) :: a
830 integer (c_int32_t
) len
831 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
834 subroutine acc_copyout_64_h (a
, len
)
835 use iso_c_binding
, only
: c_int64_t
, c_size_t
836 use openacc_internal
, only
: acc_copyout_l
837 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
838 type (*), dimension (*) :: a
839 integer (c_int64_t
) len
840 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
843 subroutine acc_copyout_array_h (a
)
844 use openacc_internal
, only
: acc_copyout_l
845 type (*), dimension (..), contiguous
:: a
846 call acc_copyout_l (a
, sizeof (a
))
849 subroutine acc_delete_32_h (a
, len
)
850 use iso_c_binding
, only
: c_int32_t
, c_size_t
851 use openacc_internal
, only
: acc_delete_l
852 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
853 type (*), dimension (*) :: a
854 integer (c_int32_t
) len
855 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
858 subroutine acc_delete_64_h (a
, len
)
859 use iso_c_binding
, only
: c_int64_t
, c_size_t
860 use openacc_internal
, only
: acc_delete_l
861 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
862 type (*), dimension (*) :: a
863 integer (c_int64_t
) len
864 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
867 subroutine acc_delete_array_h (a
)
868 use openacc_internal
, only
: acc_delete_l
869 type (*), dimension (..), contiguous
:: a
870 call acc_delete_l (a
, sizeof (a
))
873 subroutine acc_update_device_32_h (a
, len
)
874 use iso_c_binding
, only
: c_int32_t
, c_size_t
875 use openacc_internal
, only
: acc_update_device_l
876 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
877 type (*), dimension (*) :: a
878 integer (c_int32_t
) len
879 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
882 subroutine acc_update_device_64_h (a
, len
)
883 use iso_c_binding
, only
: c_int64_t
, c_size_t
884 use openacc_internal
, only
: acc_update_device_l
885 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
886 type (*), dimension (*) :: a
887 integer (c_int64_t
) len
888 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
891 subroutine acc_update_device_array_h (a
)
892 use openacc_internal
, only
: acc_update_device_l
893 type (*), dimension (..), contiguous
:: a
894 call acc_update_device_l (a
, sizeof (a
))
897 subroutine acc_update_self_32_h (a
, len
)
898 use iso_c_binding
, only
: c_int32_t
, c_size_t
899 use openacc_internal
, only
: acc_update_self_l
900 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
901 type (*), dimension (*) :: a
902 integer (c_int32_t
) len
903 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
906 subroutine acc_update_self_64_h (a
, len
)
907 use iso_c_binding
, only
: c_int64_t
, c_size_t
908 use openacc_internal
, only
: acc_update_self_l
909 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
910 type (*), dimension (*) :: a
911 integer (c_int64_t
) len
912 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
915 subroutine acc_update_self_array_h (a
)
916 use openacc_internal
, only
: acc_update_self_l
917 type (*), dimension (..), contiguous
:: a
918 call acc_update_self_l (a
, sizeof (a
))
921 function acc_is_present_32_h (a
, len
)
922 use iso_c_binding
, only
: c_int32_t
, c_size_t
923 use openacc_internal
, only
: acc_is_present_l
924 logical acc_is_present_32_h
925 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
926 type (*), dimension (*) :: a
927 integer (c_int32_t
) len
928 if (acc_is_present_l (a
, int (len
, kind
= c_size_t
)) .eq
. 1) then
929 acc_is_present_32_h
= .TRUE
.
931 acc_is_present_32_h
= .FALSE
.
935 function acc_is_present_64_h (a
, len
)
936 use iso_c_binding
, only
: c_int64_t
, c_size_t
937 use openacc_internal
, only
: acc_is_present_l
938 logical acc_is_present_64_h
939 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
940 type (*), dimension (*) :: a
941 integer (c_int64_t
) len
942 if (acc_is_present_l (a
, int (len
, kind
= c_size_t
)) .eq
. 1) then
943 acc_is_present_64_h
= .TRUE
.
945 acc_is_present_64_h
= .FALSE
.
949 function acc_is_present_array_h (a
)
950 use openacc_internal
, only
: acc_is_present_l
951 logical acc_is_present_array_h
952 type (*), dimension (..), contiguous
:: a
953 acc_is_present_array_h
= acc_is_present_l (a
, sizeof (a
)) == 1