5 #define DO_PRAGMA(x) _Pragma (#x)
7 #define test(idx,type,ngangs) \
13 for (unsigned int i = 0; i < 100; i++) \
16 DO_PRAGMA(acc parallel num_gangs (ngangs) copy (b)) \
18 _Pragma("acc loop gang") \
19 for (type j = 0; j < 5; j++) \
21 _Pragma("acc loop vector") \
22 for (unsigned int i = 0; i < 20; i++) \
27 for (unsigned int i = 0; i < 100; i++) \
28 assert (b[i] == -2); \
31 test (0, signed char, 256)
32 test (1, unsigned char, 256)
33 test (2, signed short, 65535)
34 test (3, unsigned short, 65535)