2 ! { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } }
8 integer, parameter :: N
= 32
9 real, allocatable
:: a(:), b(:), c(:)
21 !$acc parallel copyin (a(1:N)) copyout (b(1:N))
28 if (b(i
) .ne
. 3.0) STOP 1
31 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 2
32 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 3
37 !$acc parallel copyin (a(1:N)) copyout (b(1:N))
44 if (b(i
) .ne
. 5.0) STOP 4
47 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 5
48 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 6
53 call acc_copyin (a
, sizeof (a
))
57 !$acc parallel present_or_copyin (a(1:N)) copyout (b(1:N))
64 if (b(i
) .ne
. 6.0) STOP 7
67 call acc_copyout (a
, sizeof (a
))
69 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 8
70 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 9
75 !$acc parallel copyin (a(1:N)) present_or_copyout (b(1:N))
82 if (b(i
) .ne
. 6.0) STOP 10
85 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 11
86 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 12
91 call acc_copyin (b
, sizeof (b
))
93 !$acc parallel copyin (a(1:N)) present_or_copyout (b(1:N))
100 if (a(i
) .ne
. 5.0) STOP 13
101 if (b(i
) .ne
. 2.0) STOP 14
104 call acc_copyout (b
, sizeof (b
))
106 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 15
107 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 16
112 !$acc parallel copy (a(1:N)) copyout (b(1:N))
120 if (a(i
) .ne
. 4.0) STOP 17
121 if (b(i
) .ne
. 6.0) STOP 18
124 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 19
125 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 20
130 !$acc parallel present_or_copy (a(1:N)) present_or_copy (b(1:N))
138 if (a(i
) .ne
. 5.0) STOP 21
139 if (b(i
) .ne
. 9.0) STOP 22
142 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 23
143 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 24
148 call acc_copyin (a
, sizeof (a
))
149 call acc_copyin (b
, sizeof (b
))
151 !$acc parallel present_or_copy (a(1:N)) present_or_copy (b(1:N))
159 if (a(i
) .ne
. 3.0) STOP 25
160 if (b(i
) .ne
. 7.0) STOP 26
163 call acc_copyout (a
, sizeof (a
))
164 call acc_copyout (b
, sizeof (b
))
166 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 27
167 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 28
172 !$acc parallel copyin (a(1:N)) create (c(1:N)) copyout (b(1:N))
180 if (a(i
) .ne
. 3.0) STOP 29
181 if (b(i
) .ne
. 3.0) STOP 30
184 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 31
185 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 32
186 if (acc_is_present (c
) .eqv
. .TRUE
.) STOP 33
191 !$acc parallel copyin (a(1:N)) present_or_create (c(1:N)) copyout (b(1:N))
199 if (a(i
) .ne
. 4.0) STOP 34
200 if (b(i
) .ne
. 4.0) STOP 35
203 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 36
204 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 37
205 if (acc_is_present (c
) .eqv
. .TRUE
.) STOP 38
209 call acc_copyin (a
, sizeof (a
))
210 call acc_copyin (b
, sizeof (b
))
211 call acc_copyin (c
, sizeof (c
))
213 !$acc parallel present (a(1:N)) present (c(1:N)) present (b(1:N))
220 call acc_copyout (a
, sizeof (a
))
221 call acc_copyout (b
, sizeof (b
))
222 call acc_copyout (c
, sizeof (c
))
225 if (a(i
) .ne
. 4.0) STOP 39
226 if (b(i
) .ne
. 4.0) STOP 40
229 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 41
230 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 42
231 if (acc_is_present (c
) .eqv
. .TRUE
.) STOP 43
236 call acc_copyin (a
, sizeof (a
))
240 !$acc parallel pcopyin (a(1:N)) copyout (b(1:N))
247 if (b(i
) .ne
. 6.0) STOP 44
250 call acc_copyout (a
, sizeof (a
))
252 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 45
253 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 46
258 !$acc parallel copyin (a(1:N)) pcopyout (b(1:N))
265 if (b(i
) .ne
. 6.0) STOP 47
268 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 48
269 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 49
274 !$acc parallel copyin (a(1:N)) pcreate (c(1:N)) copyout (b(1:N))
282 if (a(i
) .ne
. 5.0) STOP 50
283 if (b(i
) .ne
. 5.0) STOP 51
286 if (acc_is_present (a
) .eqv
. .TRUE
.) STOP 52
287 if (acc_is_present (b
) .eqv
. .TRUE
.) STOP 53
288 if (acc_is_present (c
) .eqv
. .TRUE
.) STOP 54