1 // { dg-additional-sources "target-2-aux.cc" }
3 extern "C" void abort (void);
6 fn1 (double *x, double *y, int z)
9 for (i = 0; i < z; i++)
17 double (&br) [1024] = b;
21 extern double (&fr) [1024];
25 fn2 (int x, double (&dr) [1024], double *&er)
29 double (&hr) [1024] = h;
34 fn1 (hr + 2 * x, ir + 2 * x, x);
35 #pragma omp target map(to: br[:x], cr[0:x], dr[x:x], er[x:x]) \
36 map(to: fr[0:x], gr[0:x], hr[2 * x:x], ir[2 * x:x]) \
38 #pragma omp parallel for reduction(+:s)
39 for (j = 0; j < x; j++)
40 s += br[j] * cr[j] + dr[x + j] + er[x + j]
41 + fr[j] + gr[j] + hr[2 * x + j] + ir[2 * x + j];
52 fn1 (d + 128, e + 128, 128);
54 double h = fn2 (128, d, e);