1 /* { dg-do run { target openacc_nvidia_accel_selected } } */
2 /* { dg-set-target-env-var "GOMP_OPENACC_DIM" "::128" } */
4 /* Minimized from ref-1.C. */
8 #pragma acc routine vector
9 void __attribute__((noinline
, noclone
))
10 Vector (int *ptr
, int n
, const int inc
)
12 #pragma acc loop vector
13 for (unsigned ix
= 0; ix
< n
; ix
++)
20 const int n
= 32, m
=32;
27 ary
[ix
][iy
] = (1 << 16) + (ix
<< 8) + iy
;
31 #pragma acc parallel copy (ary)
33 Vector (&ary
[0][0], m
* n
, (1 << 24) - (1 << 16));
38 if (ary
[ix
][iy
] != ((1 << 24) + (ix
<< 8) + iy
))
40 printf ("ary[%u][%u] = %x expected %x\n",
41 ix
, iy
, ary
[ix
][iy
], ((1 << 24) + (ix
<< 8) + iy
));
47 printf ("%d failed\n", err
);
54 /* { dg-prune-output "using vector_length \\(32\\), ignoring runtime setting" } */