1 ! Test for omp_target_memcpy_async without considering dependence objects.
6 implicit none (external, type)
8 integer, target
:: q(0:127), q2(0:127)
10 integer(omp_depend_kind
) :: obj(1:0)
12 d
= omp_get_default_device ()
13 id
= omp_get_initial_device ()
15 if (d
< 0 .or
. d
>= omp_get_num_devices ()) &
18 p
= omp_target_alloc (130 * c_sizeof (q
), d
)
19 if (.not
. c_associated (p
)) &
23 if (omp_target_memcpy_async (p
, c_loc (q
), 128 * sizeof (q(0)), 0_c_size_t
, &
24 0_c_size_t
, d
, id
, 0, obj
) /= 0) &
29 q2
= [(0, i
= 0, 127)]
30 if (omp_target_memcpy_async (c_loc (q2
), p
, 128 * sizeof (q2(0)), 0_c_size_t
,&
31 0_c_size_t
, id
, d
, 0, obj
) /= 0) &
41 call omp_target_free (p
, d
)