blob: 350174a1031888e9ac38204042290283efb81b44 [file] [log] [blame]
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
typedef float _Complex Type;
#define N 32
int
main (void)
{
Type ary[N];
for (int ix = 0; ix < N; ix++)
ary[ix] = 1.0 + 1.0j;
Type tprod = 1.0;
#pragma acc parallel vector_length(32)
{
#pragma acc loop vector reduction (*:tprod)
for (int ix = 0; ix < N; ix++)
tprod *= ary[ix];
}
Type expected = 65536.0;
if (tprod != expected)
abort ();
return 0;
}