2 /* { dg-additional-options "-w" } */
4 /* Ignore vector_length warnings for offloaded (nvptx) targets. */
5 /* { dg-additional-options "-foffload=-w" } */
7 /* Multiple reductions. */
18 #define DO_PRAGMA(x) _Pragma (#x)
20 #define check_reduction(gwv_par, gwv_loop) \
23 DO_PRAGMA (acc parallel gwv_par copy (s1, s2)) \
24 DO_PRAGMA (acc loop gwv_loop reduction (+:s1, s2)) \
25 for (i = 0; i < n; i++) \
31 if (s1 != v1 && s2 != v2) \
38 int s1
= 2, s2
= 5, v1
= 2, v2
= 5;
41 for (i
= 0; i
< n
; i
++)
47 check_reduction (num_gangs (ng
), gang
);
49 /* Nvptx targets require a vector_length or 32 in to allow spinlocks with
51 check_reduction (num_workers (nw
) vector_length (vl
), worker
);
52 check_reduction (vector_length (vl
), vector
);
53 check_reduction (num_gangs (ng
) num_workers (nw
) vector_length (vl
), gang