1 ! OpenACC Runtime Library Definitions.
3 ! Copyright (C) 2014-2016 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
, acc_wait
, acc_wait_async
, acc_wait_all
474 public
:: acc_wait_all_async
, acc_init
, acc_shutdown
, acc_on_device
475 public
:: acc_copyin
, acc_present_or_copyin
, acc_pcopyin
, acc_create
476 public
:: acc_present_or_create
, acc_pcreate
, acc_copyout
, acc_delete
477 public
:: acc_update_device
, acc_update_self
, acc_is_present
479 integer, parameter :: openacc_version
= 201306
481 interface acc_get_num_devices
482 procedure
:: acc_get_num_devices_h
485 interface acc_set_device_type
486 procedure
:: acc_set_device_type_h
489 interface acc_get_device_type
490 procedure
:: acc_get_device_type_h
493 interface acc_set_device_num
494 procedure
:: acc_set_device_num_h
497 interface acc_get_device_num
498 procedure
:: acc_get_device_num_h
501 interface acc_async_test
502 procedure
:: acc_async_test_h
505 interface acc_async_test_all
506 procedure
:: acc_async_test_all_h
510 procedure
:: acc_wait_h
513 interface acc_wait_async
514 procedure
:: acc_wait_async_h
517 interface acc_wait_all
518 procedure
:: acc_wait_all_h
521 interface acc_wait_all_async
522 procedure
:: acc_wait_all_async_h
526 procedure
:: acc_init_h
529 interface acc_shutdown
530 procedure
:: acc_shutdown_h
533 interface acc_on_device
534 procedure
:: acc_on_device_h
537 ! acc_malloc: Only available in C/C++
538 ! acc_free: Only available in C/C++
540 ! As vendor extension, the following code supports both 32bit and 64bit
541 ! arguments for "size"; the OpenACC standard only permits default-kind
542 ! integers, which are of kind 4 (i.e. 32 bits).
543 ! Additionally, the two-argument version also takes arrays as argument.
544 ! and the one argument version also scalars. Note that the code assumes
545 ! that the arrays are contiguous.
548 procedure
:: acc_copyin_32_h
549 procedure
:: acc_copyin_64_h
550 procedure
:: acc_copyin_array_h
553 interface acc_present_or_copyin
554 procedure
:: acc_present_or_copyin_32_h
555 procedure
:: acc_present_or_copyin_64_h
556 procedure
:: acc_present_or_copyin_array_h
559 interface acc_pcopyin
560 procedure
:: acc_present_or_copyin_32_h
561 procedure
:: acc_present_or_copyin_64_h
562 procedure
:: acc_present_or_copyin_array_h
566 procedure
:: acc_create_32_h
567 procedure
:: acc_create_64_h
568 procedure
:: acc_create_array_h
571 interface acc_present_or_create
572 procedure
:: acc_present_or_create_32_h
573 procedure
:: acc_present_or_create_64_h
574 procedure
:: acc_present_or_create_array_h
577 interface acc_pcreate
578 procedure
:: acc_present_or_create_32_h
579 procedure
:: acc_present_or_create_64_h
580 procedure
:: acc_present_or_create_array_h
583 interface acc_copyout
584 procedure
:: acc_copyout_32_h
585 procedure
:: acc_copyout_64_h
586 procedure
:: acc_copyout_array_h
590 procedure
:: acc_delete_32_h
591 procedure
:: acc_delete_64_h
592 procedure
:: acc_delete_array_h
595 interface acc_update_device
596 procedure
:: acc_update_device_32_h
597 procedure
:: acc_update_device_64_h
598 procedure
:: acc_update_device_array_h
601 interface acc_update_self
602 procedure
:: acc_update_self_32_h
603 procedure
:: acc_update_self_64_h
604 procedure
:: acc_update_self_array_h
607 ! acc_map_data: Only available in C/C++
608 ! acc_unmap_data: Only available in C/C++
609 ! acc_deviceptr: Only available in C/C++
610 ! acc_hostptr: Only available in C/C++
612 interface acc_is_present
613 procedure
:: acc_is_present_32_h
614 procedure
:: acc_is_present_64_h
615 procedure
:: acc_is_present_array_h
618 ! acc_memcpy_to_device: Only available in C/C++
619 ! acc_memcpy_from_device: Only available in C/C++
623 function acc_get_num_devices_h (d
)
624 use openacc_internal
, only
: acc_get_num_devices_l
626 integer acc_get_num_devices_h
627 integer (acc_device_kind
) d
628 acc_get_num_devices_h
= acc_get_num_devices_l (d
)
631 subroutine acc_set_device_type_h (d
)
632 use openacc_internal
, only
: acc_set_device_type_l
634 integer (acc_device_kind
) d
635 call acc_set_device_type_l (d
)
638 function acc_get_device_type_h ()
639 use openacc_internal
, only
: acc_get_device_type_l
641 integer (acc_device_kind
) acc_get_device_type_h
642 acc_get_device_type_h
= acc_get_device_type_l ()
645 subroutine acc_set_device_num_h (n
, d
)
646 use openacc_internal
, only
: acc_set_device_num_l
649 integer (acc_device_kind
) d
650 call acc_set_device_num_l (n
, d
)
653 function acc_get_device_num_h (d
)
654 use openacc_internal
, only
: acc_get_device_num_l
656 integer acc_get_device_num_h
657 integer (acc_device_kind
) d
658 acc_get_device_num_h
= acc_get_device_num_l (d
)
661 function acc_async_test_h (a
)
662 use openacc_internal
, only
: acc_async_test_l
663 logical acc_async_test_h
665 if (acc_async_test_l (a
) .eq
. 1) then
666 acc_async_test_h
= .TRUE
.
668 acc_async_test_h
= .FALSE
.
672 function acc_async_test_all_h ()
673 use openacc_internal
, only
: acc_async_test_all_l
674 logical acc_async_test_all_h
675 if (acc_async_test_all_l () .eq
. 1) then
676 acc_async_test_all_h
= .TRUE
.
678 acc_async_test_all_h
= .FALSE
.
682 subroutine acc_wait_h (a
)
683 use openacc_internal
, only
: acc_wait_l
688 subroutine acc_wait_async_h (a1
, a2
)
689 use openacc_internal
, only
: acc_wait_async_l
691 call acc_wait_async_l (a1
, a2
)
694 subroutine acc_wait_all_h ()
695 use openacc_internal
, only
: acc_wait_all_l
696 call acc_wait_all_l ()
699 subroutine acc_wait_all_async_h (a
)
700 use openacc_internal
, only
: acc_wait_all_async_l
702 call acc_wait_all_async_l (a
)
705 subroutine acc_init_h (d
)
706 use openacc_internal
, only
: acc_init_l
708 integer (acc_device_kind
) d
712 subroutine acc_shutdown_h (d
)
713 use openacc_internal
, only
: acc_shutdown_l
715 integer (acc_device_kind
) d
716 call acc_shutdown_l (d
)
719 function acc_on_device_h (d
)
720 use openacc_internal
, only
: acc_on_device_l
722 integer (acc_device_kind
) d
723 logical acc_on_device_h
724 if (acc_on_device_l (d
) .eq
. 1) then
725 acc_on_device_h
= .TRUE
.
727 acc_on_device_h
= .FALSE
.
731 subroutine acc_copyin_32_h (a
, len
)
732 use iso_c_binding
, only
: c_int32_t
, c_size_t
733 use openacc_internal
, only
: acc_copyin_l
734 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
735 type (*), dimension (*) :: a
736 integer (c_int32_t
) len
737 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
740 subroutine acc_copyin_64_h (a
, len
)
741 use iso_c_binding
, only
: c_int64_t
, c_size_t
742 use openacc_internal
, only
: acc_copyin_l
743 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
744 type (*), dimension (*) :: a
745 integer (c_int64_t
) len
746 call acc_copyin_l (a
, int (len
, kind
= c_size_t
))
749 subroutine acc_copyin_array_h (a
)
750 use openacc_internal
, only
: acc_copyin_l
751 type (*), dimension (..), contiguous
:: a
752 call acc_copyin_l (a
, sizeof (a
))
755 subroutine acc_present_or_copyin_32_h (a
, len
)
756 use iso_c_binding
, only
: c_int32_t
, c_size_t
757 use openacc_internal
, only
: acc_present_or_copyin_l
758 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
759 type (*), dimension (*) :: a
760 integer (c_int32_t
) len
761 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
764 subroutine acc_present_or_copyin_64_h (a
, len
)
765 use iso_c_binding
, only
: c_int64_t
, c_size_t
766 use openacc_internal
, only
: acc_present_or_copyin_l
767 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
768 type (*), dimension (*) :: a
769 integer (c_int64_t
) len
770 call acc_present_or_copyin_l (a
, int (len
, kind
= c_size_t
))
773 subroutine acc_present_or_copyin_array_h (a
)
774 use openacc_internal
, only
: acc_present_or_copyin_l
775 type (*), dimension (..), contiguous
:: a
776 call acc_present_or_copyin_l (a
, sizeof (a
))
779 subroutine acc_create_32_h (a
, len
)
780 use iso_c_binding
, only
: c_int32_t
, c_size_t
781 use openacc_internal
, only
: acc_create_l
782 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
783 type (*), dimension (*) :: a
784 integer (c_int32_t
) len
785 call acc_create_l (a
, int (len
, kind
= c_size_t
))
788 subroutine acc_create_64_h (a
, len
)
789 use iso_c_binding
, only
: c_int64_t
, c_size_t
790 use openacc_internal
, only
: acc_create_l
791 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
792 type (*), dimension (*) :: a
793 integer (c_int64_t
) len
794 call acc_create_l (a
, int (len
, kind
= c_size_t
))
797 subroutine acc_create_array_h (a
)
798 use openacc_internal
, only
: acc_create_l
799 type (*), dimension (..), contiguous
:: a
800 call acc_create_l (a
, sizeof (a
))
803 subroutine acc_present_or_create_32_h (a
, len
)
804 use iso_c_binding
, only
: c_int32_t
, c_size_t
805 use openacc_internal
, only
: acc_present_or_create_l
806 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
807 type (*), dimension (*) :: a
808 integer (c_int32_t
) len
809 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
812 subroutine acc_present_or_create_64_h (a
, len
)
813 use iso_c_binding
, only
: c_int64_t
, c_size_t
814 use openacc_internal
, only
: acc_present_or_create_l
815 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
816 type (*), dimension (*) :: a
817 integer (c_int64_t
) len
818 call acc_present_or_create_l (a
, int (len
, kind
= c_size_t
))
821 subroutine acc_present_or_create_array_h (a
)
822 use openacc_internal
, only
: acc_present_or_create_l
823 type (*), dimension (..), contiguous
:: a
824 call acc_present_or_create_l (a
, sizeof (a
))
827 subroutine acc_copyout_32_h (a
, len
)
828 use iso_c_binding
, only
: c_int32_t
, c_size_t
829 use openacc_internal
, only
: acc_copyout_l
830 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
831 type (*), dimension (*) :: a
832 integer (c_int32_t
) len
833 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
836 subroutine acc_copyout_64_h (a
, len
)
837 use iso_c_binding
, only
: c_int64_t
, c_size_t
838 use openacc_internal
, only
: acc_copyout_l
839 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
840 type (*), dimension (*) :: a
841 integer (c_int64_t
) len
842 call acc_copyout_l (a
, int (len
, kind
= c_size_t
))
845 subroutine acc_copyout_array_h (a
)
846 use openacc_internal
, only
: acc_copyout_l
847 type (*), dimension (..), contiguous
:: a
848 call acc_copyout_l (a
, sizeof (a
))
851 subroutine acc_delete_32_h (a
, len
)
852 use iso_c_binding
, only
: c_int32_t
, c_size_t
853 use openacc_internal
, only
: acc_delete_l
854 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
855 type (*), dimension (*) :: a
856 integer (c_int32_t
) len
857 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
860 subroutine acc_delete_64_h (a
, len
)
861 use iso_c_binding
, only
: c_int64_t
, c_size_t
862 use openacc_internal
, only
: acc_delete_l
863 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
864 type (*), dimension (*) :: a
865 integer (c_int64_t
) len
866 call acc_delete_l (a
, int (len
, kind
= c_size_t
))
869 subroutine acc_delete_array_h (a
)
870 use openacc_internal
, only
: acc_delete_l
871 type (*), dimension (..), contiguous
:: a
872 call acc_delete_l (a
, sizeof (a
))
875 subroutine acc_update_device_32_h (a
, len
)
876 use iso_c_binding
, only
: c_int32_t
, c_size_t
877 use openacc_internal
, only
: acc_update_device_l
878 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
879 type (*), dimension (*) :: a
880 integer (c_int32_t
) len
881 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
884 subroutine acc_update_device_64_h (a
, len
)
885 use iso_c_binding
, only
: c_int64_t
, c_size_t
886 use openacc_internal
, only
: acc_update_device_l
887 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
888 type (*), dimension (*) :: a
889 integer (c_int64_t
) len
890 call acc_update_device_l (a
, int (len
, kind
= c_size_t
))
893 subroutine acc_update_device_array_h (a
)
894 use openacc_internal
, only
: acc_update_device_l
895 type (*), dimension (..), contiguous
:: a
896 call acc_update_device_l (a
, sizeof (a
))
899 subroutine acc_update_self_32_h (a
, len
)
900 use iso_c_binding
, only
: c_int32_t
, c_size_t
901 use openacc_internal
, only
: acc_update_self_l
902 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
903 type (*), dimension (*) :: a
904 integer (c_int32_t
) len
905 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
908 subroutine acc_update_self_64_h (a
, len
)
909 use iso_c_binding
, only
: c_int64_t
, c_size_t
910 use openacc_internal
, only
: acc_update_self_l
911 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
912 type (*), dimension (*) :: a
913 integer (c_int64_t
) len
914 call acc_update_self_l (a
, int (len
, kind
= c_size_t
))
917 subroutine acc_update_self_array_h (a
)
918 use openacc_internal
, only
: acc_update_self_l
919 type (*), dimension (..), contiguous
:: a
920 call acc_update_self_l (a
, sizeof (a
))
923 function acc_is_present_32_h (a
, len
)
924 use iso_c_binding
, only
: c_int32_t
, c_size_t
925 use openacc_internal
, only
: acc_is_present_l
926 logical acc_is_present_32_h
927 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
928 type (*), dimension (*) :: a
929 integer (c_int32_t
) len
930 if (acc_is_present_l (a
, int (len
, kind
= c_size_t
)) .eq
. 1) then
931 acc_is_present_32_h
= .TRUE
.
933 acc_is_present_32_h
= .FALSE
.
937 function acc_is_present_64_h (a
, len
)
938 use iso_c_binding
, only
: c_int64_t
, c_size_t
939 use openacc_internal
, only
: acc_is_present_l
940 logical acc_is_present_64_h
941 !GCC$ ATTRIBUTES NO_ARG_CHECK :: a
942 type (*), dimension (*) :: a
943 integer (c_int64_t
) len
944 if (acc_is_present_l (a
, int (len
, kind
= c_size_t
)) .eq
. 1) then
945 acc_is_present_64_h
= .TRUE
.
947 acc_is_present_64_h
= .FALSE
.
951 function acc_is_present_array_h (a
)
952 use openacc_internal
, only
: acc_is_present_l
953 logical acc_is_present_array_h
954 type (*), dimension (..), contiguous
:: a
955 acc_is_present_array_h
= acc_is_present_l (a
, sizeof (a
)) == 1