Retro68/gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-reduction-1.c
Wolfgang Thaller 6fbf4226da gcc-9.1
2019-06-20 20:10:10 +02:00

25 lines
305 B
C

/* Verify that a simple, explicit acc loop reduction works inside
a kernels region. */
#include <stdlib.h>
#define N 100
int
main ()
{
int i, red = 0;
#pragma acc kernels
{
#pragma acc loop reduction (+:red)
for (i = 0; i < N; i++)
red++;
}
if (red != N)
abort ();
return 0;
}