5 subroutine foo (p
, v
, w
, n
)
6 double precision, pointer :: p(:), v(:), w(:)
7 double precision :: q(n
)
9 !$omp target data if (n > 256) map (to: v(1:n), w(:n)) map (from: p(1:n), q)
10 !$omp target if (n > 256)
11 !$omp parallel do simd
17 !$omp target update if (n > 256) from (p)
19 if (p(i
) /= i
* iand (i
, 63)) stop 1
22 !$omp target update if (n > 256) to (v(1:n))
23 !$omp target if (n > 256)
24 !$omp parallel do simd
31 if (q(i
) /= (v(i
) - 1) * w(i
)) stop 2
32 if (p(i
) /= q(i
) + w(i
)) stop 3
36 use target6
, only
: foo
38 double precision, pointer :: p(:), v(:), w(:)
40 allocate (p(n
), v(n
), w(n
))
47 if (p(i
) /= (i
+ 1) * iand (i
, 63)) stop 4