Retro68/gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/combined-reduction.c
2017-04-10 13:32:00 +02:00

24 lines
308 B
C

/* Test a combined acc parallel loop reduction. */
/* { dg-do run } */
#include <assert.h>
int
main ()
{
int i, v1 = 0, v2 = 0, n = 100;
#pragma acc parallel loop reduction(+:v1, v2)
for (i = 0; i < n; i++)
{
v1++;
v2++;
}
assert (v1 == n);
assert (v2 == n);
return 0;
}