5 subroutine foo (p
, v
, w
, n
)
6 double precision, pointer :: p(:), v(:), w(:)
7 double precision :: q(n
)
9 !$omp target if (n > 256) map (to: v(1:n), w(:n)) map (from: p(1:n), q)
10 !$omp parallel do simd
16 if (any (p
/= q
)) call abort
18 if (p(i
) /= i
* iand (i
, 63)) call abort
20 !$omp target data if (n > 256) map (to: v(1:n), w) map (from: p, q)
21 !$omp target if (n > 256)
27 !$omp target if (n > 256)
29 p(i
) = p(i
) + v(i
) * w(i
)
30 q(i
) = q(i
) + v(i
) * w(i
)
33 !$omp target if (n > 256)
34 !$omp teams distribute parallel do simd linear(i:1)
41 if (any (p
+ 2.0 /= q
)) call abort
44 use target1
, only
: foo
46 double precision, pointer :: p(:), v(:), w(:)
48 allocate (p(n
), v(n
), w(n
))
55 if (p(i
) /= i
* iand (i
, 63) + 3) call abort