Retro68/gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/kernels-reduction-1.c

25 lines
305 B
C
Raw Normal View History

2019-06-02 15:48:37 +00:00
/* 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;
}