mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-04 01:50:38 +00:00
25 lines
305 B
C
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;
|
|
}
|