5 integer, parameter :: n
= 1024
6 integer, dimension (0:n
-1) :: a
, b
, c
9 ! Parallelism dimensions: compiler/runtime decides.
10 !$acc kernels copyout (a(0:n-1))
16 ! Parallelism dimensions: variable.
17 !$acc kernels copyout (b(0:n-1)) &
18 !$acc num_gangs (3 + a(3)) num_workers (5 + a(5)) vector_length (7 + a(7))
19 ! { dg-prune-output "using vector_length \\(32\\), ignoring runtime setting" }
25 ! Parallelism dimensions: literal.
26 !$acc kernels copyin (a(0:n-1), b(0:n-1)) copyout (c(0:n-1)) &
27 !$acc num_gangs (3) num_workers (5) vector_length (7)
28 ! { dg-prune-output "using vector_length \\(32\\), ignoring 7" }
35 if (a(i
) .ne
. i
* 2) call abort
36 if (b(i
) .ne
. i
* 4) call abort
37 if (c(i
) .ne
. a(i
) + b(i
)) call abort