1 // 'atomic' access of thread-private variable
3 /* { dg-additional-options "-fopt-info-note-omp" }
4 { dg-additional-options "--param=openacc-privatization=noisy" }
5 { dg-additional-options "-foffload=-fopt-info-note-omp" }
6 { dg-additional-options "-foffload=--param=openacc-privatization=noisy" }
7 for testing/documenting aspects of that functionality. */
16 #pragma acc parallel reduction(+: res)
17 /* { dg-note {variable 'i' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
19 #pragma acc loop vector reduction(+: res)
20 /* { dg-note {variable 'i' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
21 /* { dg-note {variable 'v' declared in block is candidate for adjusting OpenACC privatization level} "" { target *-*-* } .-2 }
22 { dg-note {variable 'v' ought to be adjusted for OpenACC privatization level: 'vector'} "" { target *-*-* } .-3 }
23 { dg-note {variable 'v' adjusted for OpenACC privatization level: 'vector'} "" { target { ! openacc_host_selected } } .-4 } */
24 /* { dg-note {variable 'j' declared in block isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-5 } */
25 for (int i
= 0; i
< 2322; i
++)
30 /* { dg-note {variable 'j' in 'private' clause isn't candidate for adjusting OpenACC privatization level: not addressable} "" { target *-*-* } .-1 } */
31 for (int j
= 0; j
< 121; ++j
)
33 #pragma acc atomic update
37 res
+= (v
== -222 + 121);