1 ! OpenACC Runtime Library Definitions.
3 ! Copyright (C) 2014-2017 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 ! Keep in sync with include/gomp-constants.h.
43 integer (acc_device_kind
), parameter :: acc_device_none
= 0
44 integer (acc_device_kind
), parameter :: acc_device_default
= 1
45 integer (acc_device_kind
), parameter :: acc_device_host
= 2
46 ! integer (acc_device_kind), parameter :: acc_device_host_nonshm = 3 removed.
47 integer (acc_device_kind
), parameter :: acc_device_not_host
= 4
48 integer (acc_device_kind
), parameter :: acc_device_nvidia
= 5
50 public
:: acc_handle_kind
52 integer, parameter :: acc_handle_kind
= int32
54 public
:: acc_async_noval
, acc_async_sync
56 ! Keep in sync with include/gomp-constants.h.
57 integer (acc_handle_kind
), parameter :: acc_async_noval
= -1
58 integer (acc_handle_kind
), parameter :: acc_async_sync
= -2
62 module openacc_internal
67 function acc_get_num_devices_h (d
)
69 integer acc_get_num_devices_h
70 integer (acc_device_kind
) d
73 subroutine acc_set_device_type_h (d
)
75 integer (acc_device_kind
) d
78 function acc_get_device_type_h ()
80 integer (acc_device_kind
) acc_get_device_type_h
83 subroutine acc_set_device_num_h (n
, d
)
86 integer (acc_device_kind
) d
89 function acc_get_device_num_h (d
)
91 integer acc_get_device_num_h
92 integer (acc_device_kind
) d
95 function acc_async_test_h (a
)
96 logical acc_async_test_h
100 function acc_async_test_all_h ()
101 logical acc_async_test_all_h
104 subroutine acc_wait_h (a
)
108 subroutine acc_wait_async_h (a1
, a2
)
112 subroutine acc_wait_all_h ()
115 subroutine acc_wait_all_async_h (a
)
119 subroutine acc_init_h (d
)
121 integer (acc_device_kind
) d
124 subroutine acc_shutdown_h (d
)
126 integer (acc_device_kind
) d
129 function acc_on_device_h (d
)
131 integer (acc_device_kind
) d
132 logical acc_on_device_h
135 subroutine acc_copyin_32_h (a
, len
)
136 use iso_c_binding
, only
: c_int32_t
137 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
138 type (*), dimension (*) :: a
139 integer (c_int32_t
) len
142 subroutine acc_copyin_64_h (a
, len
)
143 use iso_c_binding
, only
: c_int64_t
144 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
145 type (*), dimension (*) :: a
146 integer (c_int64_t
) len
149 subroutine acc_copyin_array_h (a
)
150 type (*), dimension (..), contiguous
:: a
153 subroutine acc_present_or_copyin_32_h (a
, len
)
154 use iso_c_binding
, only
: c_int32_t
155 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
156 type (*), dimension (*) :: a
157 integer (c_int32_t
) len
160 subroutine acc_present_or_copyin_64_h (a
, len
)
161 use iso_c_binding
, only
: c_int64_t
162 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
163 type (*), dimension (*) :: a
164 integer (c_int64_t
) len
167 subroutine acc_present_or_copyin_array_h (a
)
168 type (*), dimension (..), contiguous
:: a
171 subroutine acc_create_32_h (a
, len
)
172 use iso_c_binding
, only
: c_int32_t
173 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
174 type (*), dimension (*) :: a
175 integer (c_int32_t
) len
178 subroutine acc_create_64_h (a
, len
)
179 use iso_c_binding
, only
: c_int64_t
180 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
181 type (*), dimension (*) :: a
182 integer (c_int64_t
) len
185 subroutine acc_create_array_h (a
)
186 type (*), dimension (..), contiguous
:: a
189 subroutine acc_present_or_create_32_h (a
, len
)
190 use iso_c_binding
, only
: c_int32_t
191 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
192 type (*), dimension (*) :: a
193 integer (c_int32_t
) len
196 subroutine acc_present_or_create_64_h (a
, len
)
197 use iso_c_binding
, only
: c_int64_t
198 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
199 type (*), dimension (*) :: a
200 integer (c_int64_t
) len
203 subroutine acc_present_or_create_array_h (a
)
204 type (*), dimension (..), contiguous
:: a
207 subroutine acc_copyout_32_h (a
, len
)
208 use iso_c_binding
, only
: c_int32_t
209 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
210 type (*), dimension (*) :: a
211 integer (c_int32_t
) len
214 subroutine acc_copyout_64_h (a
, len
)
215 use iso_c_binding
, only
: c_int64_t
216 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
217 type (*), dimension (*) :: a
218 integer (c_int64_t
) len
221 subroutine acc_copyout_array_h (a
)
222 type (*), dimension (..), contiguous
:: a
225 subroutine acc_delete_32_h (a
, len
)
226 use iso_c_binding
, only
: c_int32_t
227 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
228 type (*), dimension (*) :: a
229 integer (c_int32_t
) len
232 subroutine acc_delete_64_h (a
, len
)
233 use iso_c_binding
, only
: c_int64_t
234 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
235 type (*), dimension (*) :: a
236 integer (c_int64_t
) len
239 subroutine acc_delete_array_h (a
)
240 type (*), dimension (..), contiguous
:: a
243 subroutine acc_update_device_32_h (a
, len
)
244 use iso_c_binding
, only
: c_int32_t
245 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
246 type (*), dimension (*) :: a
247 integer (c_int32_t
) len
250 subroutine acc_update_device_64_h (a
, len
)
251 use iso_c_binding
, only
: c_int64_t
252 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
253 type (*), dimension (*) :: a
254 integer (c_int64_t
) len
257 subroutine acc_update_device_array_h (a
)
258 type (*), dimension (..), contiguous
:: a
261 subroutine acc_update_self_32_h (a
, len
)
262 use iso_c_binding
, only
: c_int32_t
263 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
264 type (*), dimension (*) :: a
265 integer (c_int32_t
) len
268 subroutine acc_update_self_64_h (a
, len
)
269 use iso_c_binding
, only
: c_int64_t
270 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
271 type (*), dimension (*) :: a
272 integer (c_int64_t
) len
275 subroutine acc_update_self_array_h (a
)
276 type (*), dimension (..), contiguous
:: a
279 function acc_is_present_32_h (a
, len
)
280 use iso_c_binding
, only
: c_int32_t
281 logical acc_is_present_32_h
282 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
283 type (*), dimension (*) :: a
284 integer (c_int32_t
) len
287 function acc_is_present_64_h (a
, len
)
288 use iso_c_binding
, only
: c_int64_t
289 logical acc_is_present_64_h
290 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
291 type (*), dimension (*) :: a
292 integer (c_int64_t
) len
295 function acc_is_present_array_h (a
)
296 logical acc_is_present_array_h
297 type (*), dimension (..), contiguous
:: a
302 function acc_get_num_devices_l (d
) &
303 bind (C
, name
= "acc_get_num_devices")
304 use iso_c_binding
, only
: c_int
305 integer (c_int
) :: acc_get_num_devices_l
306 integer (c_int
), value
:: d
309 subroutine acc_set_device_type_l (d
) &
310 bind (C
, name
= "acc_set_device_type")
311 use iso_c_binding
, only
: c_int
312 integer (c_int
), value
:: d
315 function acc_get_device_type_l () &
316 bind (C
, name
= "acc_get_device_type")
317 use iso_c_binding
, only
: c_int
318 integer (c_int
) :: acc_get_device_type_l
321 subroutine acc_set_device_num_l (n
, d
) &
322 bind (C
, name
= "acc_set_device_num")
323 use iso_c_binding
, only
: c_int
324 integer (c_int
), value
:: n
, d
327 function acc_get_device_num_l (d
) &
328 bind (C
, name
= "acc_get_device_num")
329 use iso_c_binding
, only
: c_int
330 integer (c_int
) :: acc_get_device_num_l
331 integer (c_int
), value
:: d
334 function acc_async_test_l (a
) &
335 bind (C
, name
= "acc_async_test")
336 use iso_c_binding
, only
: c_int
337 integer (c_int
) :: acc_async_test_l
338 integer (c_int
), value
:: a
341 function acc_async_test_all_l () &
342 bind (C
, name
= "acc_async_test_all")
343 use iso_c_binding
, only
: c_int
344 integer (c_int
) :: acc_async_test_all_l
347 subroutine acc_wait_l (a
) &
348 bind (C
, name
= "acc_wait")
349 use iso_c_binding
, only
: c_int
350 integer (c_int
), value
:: a
353 subroutine acc_wait_async_l (a1
, a2
) &
354 bind (C
, name
= "acc_wait_async")
355 use iso_c_binding
, only
: c_int
356 integer (c_int
), value
:: a1
, a2
359 subroutine acc_wait_all_l () &
360 bind (C
, name
= "acc_wait_all")
361 use iso_c_binding
, only
: c_int
364 subroutine acc_wait_all_async_l (a
) &
365 bind (C
, name
= "acc_wait_all_async")
366 use iso_c_binding
, only
: c_int
367 integer (c_int
), value
:: a
370 subroutine acc_init_l (d
) &
371 bind (C
, name
= "acc_init")
372 use iso_c_binding
, only
: c_int
373 integer (c_int
), value
:: d
376 subroutine acc_shutdown_l (d
) &
377 bind (C
, name
= "acc_shutdown")
378 use iso_c_binding
, only
: c_int
379 integer (c_int
), value
:: d
382 function acc_on_device_l (d
) &
383 bind (C
, name
= "acc_on_device")
384 use iso_c_binding
, only
: c_int
385 integer (c_int
) :: acc_on_device_l
386 integer (c_int
), value
:: d
389 subroutine acc_copyin_l (a
, len
) &
390 bind (C
, name
= "acc_copyin")
391 use iso_c_binding
, only
: c_size_t
392 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
393 type (*), dimension (*) :: a
394 integer (c_size_t
), value
:: len
397 subroutine acc_present_or_copyin_l (a
, len
) &
398 bind (C
, name
= "acc_present_or_copyin")
399 use iso_c_binding
, only
: c_size_t
400 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
401 type (*), dimension (*) :: a
402 integer (c_size_t
), value
:: len
405 subroutine acc_create_l (a
, len
) &
406 bind (C
, name
= "acc_create")
407 use iso_c_binding
, only
: c_size_t
408 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
409 type (*), dimension (*) :: a
410 integer (c_size_t
), value
:: len
413 subroutine acc_present_or_create_l (a
, len
) &
414 bind (C
, name
= "acc_present_or_create")
415 use iso_c_binding
, only
: c_size_t
416 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
417 type (*), dimension (*) :: a
418 integer (c_size_t
), value
:: len
421 subroutine acc_copyout_l (a
, len
) &
422 bind (C
, name
= "acc_copyout")
423 use iso_c_binding
, only
: c_size_t
424 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
425 type (*), dimension (*) :: a
426 integer (c_size_t
), value
:: len
429 subroutine acc_delete_l (a
, len
) &
430 bind (C
, name
= "acc_delete")
431 use iso_c_binding
, only
: c_size_t
432 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
433 type (*), dimension (*) :: a
434 integer (c_size_t
), value
:: len
437 subroutine acc_update_device_l (a
, len
) &
438 bind (C
, name
= "acc_update_device")
439 use iso_c_binding
, only
: c_size_t
440 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
441 type (*), dimension (*) :: a
442 integer (c_size_t
), value
:: len
445 subroutine acc_update_self_l (a
, len
) &
446 bind (C
, name
= "acc_update_self")
447 use iso_c_binding
, only
: c_size_t
448 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
449 type (*), dimension (*) :: a
450 integer (c_size_t
), value
:: len
453 function acc_is_present_l (a
, len
) &
454 bind (C
, name
= "acc_is_present")
455 use iso_c_binding
, only
: c_int32_t
, c_size_t
456 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
457 integer (c_int32_t
) :: acc_is_present_l
458 type (*), dimension (*) :: a
459 integer (c_size_t
), value
:: len
469 public
:: openacc_version
471 public
:: acc_get_num_devices
, acc_set_device_type
, acc_get_device_type
472 public
:: acc_set_device_num
, acc_get_device_num
, acc_async_test
473 public
:: acc_async_test_all
474 public
:: acc_wait
, acc_async_wait
, acc_wait_async
475 public
:: acc_wait_all
, acc_async_wait_all
, acc_wait_all_async
476 public
:: acc_init
, acc_shutdown
, acc_on_device
477 public
:: acc_copyin
, acc_present_or_copyin
, acc_pcopyin
, acc_create
478 public
:: acc_present_or_create
, acc_pcreate
, acc_copyout
, acc_delete
479 public
:: acc_update_device
, acc_update_self
, acc_is_present
481 integer, parameter :: openacc_version
= 201306
483 interface acc_get_num_devices
484 procedure
:: acc_get_num_devices_h
487 interface acc_set_device_type
488 procedure
:: acc_set_device_type_h
491 interface acc_get_device_type
492 procedure
:: acc_get_device_type_h
495 interface acc_set_device_num
496 procedure
:: acc_set_device_num_h
499 interface acc_get_device_num
500 procedure
:: acc_get_device_num_h
503 interface acc_async_test
504 procedure
:: acc_async_test_h
507 interface acc_async_test_all
508 procedure
:: acc_async_test_all_h
512 procedure
:: acc_wait_h
515 ! acc_async_wait is an OpenACC 1.0 compatibility name for acc_wait.
516 interface acc_async_wait
517 procedure
:: acc_wait_h
520 interface acc_wait_async
521 procedure
:: acc_wait_async_h
524 interface acc_wait_all
525 procedure
:: acc_wait_all_h
528 ! acc_async_wait_all is an OpenACC 1.0 compatibility name for acc_wait_all.
529 interface acc_async_wait_all
530 procedure
:: acc_wait_all_h
533 interface acc_wait_all_async
534 procedure
:: acc_wait_all_async_h
538 procedure
:: acc_init_h
541 interface acc_shutdown
542 procedure
:: acc_shutdown_h
545 interface acc_on_device
546 procedure
:: acc_on_device_h
549 ! acc_malloc: Only available in C/C++
550 ! acc_free: Only available in C/C++
552 ! As vendor extension, the following code supports both 32bit and 64bit
553 ! arguments for "size"; the OpenACC standard only permits default-kind
554 ! integers, which are of kind 4 (i.e. 32 bits).
555 ! Additionally, the two-argument version also takes arrays as argument.
556 ! and the one argument version also scalars. Note that the code assumes
557 ! that the arrays are contiguous.
560 procedure
:: acc_copyin_32_h
561 procedure
:: acc_copyin_64_h
562 procedure
:: acc_copyin_array_h
565 interface acc_present_or_copyin
566 procedure
:: acc_present_or_copyin_32_h
567 procedure
:: acc_present_or_copyin_64_h
568 procedure
:: acc_present_or_copyin_array_h
571 interface acc_pcopyin
572 procedure
:: acc_present_or_copyin_32_h
573 procedure
:: acc_present_or_copyin_64_h
574 procedure
:: acc_present_or_copyin_array_h
578 procedure
:: acc_create_32_h
579 procedure
:: acc_create_64_h
580 procedure
:: acc_create_array_h
583 interface acc_present_or_create
584 procedure
:: acc_present_or_create_32_h
585 procedure
:: acc_present_or_create_64_h
586 procedure
:: acc_present_or_create_array_h
589 interface acc_pcreate
590 procedure
:: acc_present_or_create_32_h
591 procedure
:: acc_present_or_create_64_h
592 procedure
:: acc_present_or_create_array_h
595 interface acc_copyout
596 procedure
:: acc_copyout_32_h
597 procedure
:: acc_copyout_64_h
598 procedure
:: acc_copyout_array_h
602 procedure
:: acc_delete_32_h
603 procedure
:: acc_delete_64_h
604 procedure
:: acc_delete_array_h
607 interface acc_update_device
608 procedure
:: acc_update_device_32_h
609 procedure
:: acc_update_device_64_h
610 procedure
:: acc_update_device_array_h
613 interface acc_update_self
614 procedure
:: acc_update_self_32_h
615 procedure
:: acc_update_self_64_h
616 procedure
:: acc_update_self_array_h
619 ! acc_map_data: Only available in C/C++
620 ! acc_unmap_data: Only available in C/C++
621 ! acc_deviceptr: Only available in C/C++
622 ! acc_hostptr: Only available in C/C++
624 interface acc_is_present
625 procedure
:: acc_is_present_32_h
626 procedure
:: acc_is_present_64_h
627 procedure
:: acc_is_present_array_h
630 ! acc_memcpy_to_device: Only available in C/C++
631 ! acc_memcpy_from_device: Only available in C/C++
635 function acc_get_num_devices_h (d
)
636 use openacc_internal
, only
: acc_get_num_devices_l
638 integer acc_get_num_devices_h
639 integer (acc_device_kind
) d
640 acc_get_num_devices_h
= acc_get_num_devices_l (d
)
643 subroutine acc_set_device_type_h (d
)
644 use openacc_internal
, only
: acc_set_device_type_l
646 integer (acc_device_kind
) d
647 call acc_set_device_type_l (d
)
650 function acc_get_device_type_h ()
651 use openacc_internal
, only
: acc_get_device_type_l
653 integer (acc_device_kind
) acc_get_device_type_h
654 acc_get_device_type_h
= acc_get_device_type_l ()
657 subroutine acc_set_device_num_h (n
, d
)
658 use openacc_internal
, only
: acc_set_device_num_l
661 integer (acc_device_kind
) d
662 call acc_set_device_num_l (n
, d
)
665 function acc_get_device_num_h (d
)
666 use openacc_internal
, only
: acc_get_device_num_l
668 integer acc_get_device_num_h
669 integer (acc_device_kind
) d
670 acc_get_device_num_h
= acc_get_device_num_l (d
)
673 function acc_async_test_h (a
)
674 use openacc_internal
, only
: acc_async_test_l
675 logical acc_async_test_h
677 if (acc_async_test_l (a
) .eq
. 1) then
678 acc_async_test_h
= .TRUE
.
680 acc_async_test_h
= .FALSE
.
684 function acc_async_test_all_h ()
685 use openacc_internal
, only
: acc_async_test_all_l
686 logical acc_async_test_all_h
687 if (acc_async_test_all_l () .eq
. 1) then
688 acc_async_test_all_h
= .TRUE
.
690 acc_async_test_all_h
= .FALSE
.
694 subroutine acc_wait_h (a
)
695 use openacc_internal
, only
: acc_wait_l
700 subroutine acc_wait_async_h (a1
, a2
)
701 use openacc_internal
, only
: acc_wait_async_l
703 call acc_wait_async_l (a1
, a2
)
706 subroutine acc_wait_all_h ()
707 use openacc_internal
, only
: acc_wait_all_l
708 call acc_wait_all_l ()
711 subroutine acc_wait_all_async_h (a
)
712 use openacc_internal
, only
: acc_wait_all_async_l
714 call acc_wait_all_async_l (a
)
717 subroutine acc_init_h (d
)
718 use openacc_internal
, only
: acc_init_l
720 integer (acc_device_kind
) d
724 subroutine acc_shutdown_h (d
)
725 use openacc_internal
, only
: acc_shutdown_l
727 integer (acc_device_kind
) d
728 call acc_shutdown_l (d
)
731 function acc_on_device_h (d
)
732 use openacc_internal
, only
: acc_on_device_l
734 integer (acc_device_kind
) d
735 logical acc_on_device_h
736 if (acc_on_device_l (d
) .eq
. 1) then
737 acc_on_device_h
= .TRUE
.
739 acc_on_device_h
= .FALSE
.
743 subroutine acc_copyin_32_h (a
, len
)
744 use iso_c_binding
, only
: c_int32_t
, c_size_t
745 use openacc_internal
, only
: acc_copyin_l
746 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
747 type (*), dimension (*) :: a
748 integer (c_int32_t
) len
749 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
752 subroutine acc_copyin_64_h (a
, len
)
753 use iso_c_binding
, only
: c_int64_t
, c_size_t
754 use openacc_internal
, only
: acc_copyin_l
755 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
756 type (*), dimension (*) :: a
757 integer (c_int64_t
) len
758 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
761 subroutine acc_copyin_array_h (a
)
762 use openacc_internal
, only
: acc_copyin_l
763 type (*), dimension (..), contiguous
:: a
764 call acc_copyin_l (a
, sizeof (a
))
767 subroutine acc_present_or_copyin_32_h (a
, len
)
768 use iso_c_binding
, only
: c_int32_t
, c_size_t
769 use openacc_internal
, only
: acc_present_or_copyin_l
770 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
771 type (*), dimension (*) :: a
772 integer (c_int32_t
) len
773 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
776 subroutine acc_present_or_copyin_64_h (a
, len
)
777 use iso_c_binding
, only
: c_int64_t
, c_size_t
778 use openacc_internal
, only
: acc_present_or_copyin_l
779 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
780 type (*), dimension (*) :: a
781 integer (c_int64_t
) len
782 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
785 subroutine acc_present_or_copyin_array_h (a
)
786 use openacc_internal
, only
: acc_present_or_copyin_l
787 type (*), dimension (..), contiguous
:: a
788 call acc_present_or_copyin_l (a
, sizeof (a
))
791 subroutine acc_create_32_h (a
, len
)
792 use iso_c_binding
, only
: c_int32_t
, c_size_t
793 use openacc_internal
, only
: acc_create_l
794 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
795 type (*), dimension (*) :: a
796 integer (c_int32_t
) len
797 call acc_create_l (a
, int (len
, kind
= c_size_t
))
800 subroutine acc_create_64_h (a
, len
)
801 use iso_c_binding
, only
: c_int64_t
, c_size_t
802 use openacc_internal
, only
: acc_create_l
803 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
804 type (*), dimension (*) :: a
805 integer (c_int64_t
) len
806 call acc_create_l (a
, int (len
, kind
= c_size_t
))
809 subroutine acc_create_array_h (a
)
810 use openacc_internal
, only
: acc_create_l
811 type (*), dimension (..), contiguous
:: a
812 call acc_create_l (a
, sizeof (a
))
815 subroutine acc_present_or_create_32_h (a
, len
)
816 use iso_c_binding
, only
: c_int32_t
, c_size_t
817 use openacc_internal
, only
: acc_present_or_create_l
818 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
819 type (*), dimension (*) :: a
820 integer (c_int32_t
) len
821 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
824 subroutine acc_present_or_create_64_h (a
, len
)
825 use iso_c_binding
, only
: c_int64_t
, c_size_t
826 use openacc_internal
, only
: acc_present_or_create_l
827 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
828 type (*), dimension (*) :: a
829 integer (c_int64_t
) len
830 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
833 subroutine acc_present_or_create_array_h (a
)
834 use openacc_internal
, only
: acc_present_or_create_l
835 type (*), dimension (..), contiguous
:: a
836 call acc_present_or_create_l (a
, sizeof (a
))
839 subroutine acc_copyout_32_h (a
, len
)
840 use iso_c_binding
, only
: c_int32_t
, c_size_t
841 use openacc_internal
, only
: acc_copyout_l
842 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
843 type (*), dimension (*) :: a
844 integer (c_int32_t
) len
845 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
848 subroutine acc_copyout_64_h (a
, len
)
849 use iso_c_binding
, only
: c_int64_t
, c_size_t
850 use openacc_internal
, only
: acc_copyout_l
851 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
852 type (*), dimension (*) :: a
853 integer (c_int64_t
) len
854 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
857 subroutine acc_copyout_array_h (a
)
858 use openacc_internal
, only
: acc_copyout_l
859 type (*), dimension (..), contiguous
:: a
860 call acc_copyout_l (a
, sizeof (a
))
863 subroutine acc_delete_32_h (a
, len
)
864 use iso_c_binding
, only
: c_int32_t
, c_size_t
865 use openacc_internal
, only
: acc_delete_l
866 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
867 type (*), dimension (*) :: a
868 integer (c_int32_t
) len
869 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
872 subroutine acc_delete_64_h (a
, len
)
873 use iso_c_binding
, only
: c_int64_t
, c_size_t
874 use openacc_internal
, only
: acc_delete_l
875 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
876 type (*), dimension (*) :: a
877 integer (c_int64_t
) len
878 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
881 subroutine acc_delete_array_h (a
)
882 use openacc_internal
, only
: acc_delete_l
883 type (*), dimension (..), contiguous
:: a
884 call acc_delete_l (a
, sizeof (a
))
887 subroutine acc_update_device_32_h (a
, len
)
888 use iso_c_binding
, only
: c_int32_t
, c_size_t
889 use openacc_internal
, only
: acc_update_device_l
890 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
891 type (*), dimension (*) :: a
892 integer (c_int32_t
) len
893 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
896 subroutine acc_update_device_64_h (a
, len
)
897 use iso_c_binding
, only
: c_int64_t
, c_size_t
898 use openacc_internal
, only
: acc_update_device_l
899 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
900 type (*), dimension (*) :: a
901 integer (c_int64_t
) len
902 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
905 subroutine acc_update_device_array_h (a
)
906 use openacc_internal
, only
: acc_update_device_l
907 type (*), dimension (..), contiguous
:: a
908 call acc_update_device_l (a
, sizeof (a
))
911 subroutine acc_update_self_32_h (a
, len
)
912 use iso_c_binding
, only
: c_int32_t
, c_size_t
913 use openacc_internal
, only
: acc_update_self_l
914 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
915 type (*), dimension (*) :: a
916 integer (c_int32_t
) len
917 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
920 subroutine acc_update_self_64_h (a
, len
)
921 use iso_c_binding
, only
: c_int64_t
, c_size_t
922 use openacc_internal
, only
: acc_update_self_l
923 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
924 type (*), dimension (*) :: a
925 integer (c_int64_t
) len
926 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
929 subroutine acc_update_self_array_h (a
)
930 use openacc_internal
, only
: acc_update_self_l
931 type (*), dimension (..), contiguous
:: a
932 call acc_update_self_l (a
, sizeof (a
))
935 function acc_is_present_32_h (a
, len
)
936 use iso_c_binding
, only
: c_int32_t
, c_size_t
937 use openacc_internal
, only
: acc_is_present_l
938 logical acc_is_present_32_h
939 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
940 type (*), dimension (*) :: a
941 integer (c_int32_t
) len
942 if (acc_is_present_l (a
, int (len
, kind
= c_size_t
)) .eq
. 1) then
943 acc_is_present_32_h
= .TRUE
.
945 acc_is_present_32_h
= .FALSE
.
949 function acc_is_present_64_h (a
, len
)
950 use iso_c_binding
, only
: c_int64_t
, c_size_t
951 use openacc_internal
, only
: acc_is_present_l
952 logical acc_is_present_64_h
953 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
954 type (*), dimension (*) :: a
955 integer (c_int64_t
) len
956 if (acc_is_present_l (a
, int (len
, kind
= c_size_t
)) .eq
. 1) then
957 acc_is_present_64_h
= .TRUE
.
959 acc_is_present_64_h
= .FALSE
.
963 function acc_is_present_array_h (a
)
964 use openacc_internal
, only
: acc_is_present_l
965 logical acc_is_present_array_h
966 type (*), dimension (..), contiguous
:: a
967 acc_is_present_array_h
= acc_is_present_l (a
, sizeof (a
)) == 1