]>
git.ipfire.org Git - thirdparty/gcc.git/blob - libgomp/testsuite/libgomp.oacc-c-c++-common/loop-red-v-1.c
3 #include <gomp-constants.h>
5 #define N (32*32*32+17)
13 #pragma acc parallel vector_length(32) copy(ondev)
15 #pragma acc loop vector reduction (+:t)
16 for (unsigned ix
= 0; ix
< N
; ix
++)
20 if (acc_on_device (acc_device_not_host
))
24 g
= __builtin_goacc_parlevel_id (GOMP_DIM_GANG
);
25 w
= __builtin_goacc_parlevel_id (GOMP_DIM_WORKER
);
26 v
= __builtin_goacc_parlevel_id (GOMP_DIM_VECTOR
);
27 val
= (g
<< 16) | (w
<< 8) | v
;
34 for (ix
= 0; ix
< N
; ix
++)
43 val
= (g
<< 16) | (w
<< 8) | v
;
50 printf ("t=%x expected %x\n", t
, h
);