1 /* { dg-additional-options "-fopt-info-note-omp" }
2 { dg-additional-options "--param=openacc-privatization=noisy" }
3 { dg-additional-options "-foffload=-fopt-info-note-omp" }
4 { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
5 for testing/documenting aspects of that functionality. */
9 #include <gomp-constants.h>
11 #define N (32*32*32+17)
19 for (ix
= 0; ix
< N
;ix
++)
22 #pragma acc parallel num_gangs(32) copy(ary) copy(ondev)
23 /* { dg-note {variable 'ix' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
25 #pragma acc loop gang (static:1)
26 /* { dg-note {variable 'ix' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
27 /* { dg-note {variable 'g' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-2 } */
28 /* { dg-note {variable 'w' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-3 } */
29 /* { dg-note {variable 'v' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-4 } */
30 for (unsigned ix
= 0; ix
< N
; ix
++)
32 if (acc_on_device (acc_device_not_host
))
36 g
= __builtin_goacc_parlevel_id (GOMP_DIM_GANG
);
37 w
= __builtin_goacc_parlevel_id (GOMP_DIM_WORKER
);
38 v
= __builtin_goacc_parlevel_id (GOMP_DIM_VECTOR
);
39 ary
[ix
] = (g
<< 16) | (w
<< 8) | v
;
47 for (ix
= 0; ix
< N
; ix
++)
56 expected
= (g
<< 16) | (w
<< 8) | v
;
59 if (ary
[ix
] != expected
)
62 printf ("ary[%d]=%x expected %x\n", ix
, ary
[ix
], expected
);