pet_scop_free: return struct pet_scop *
[pet.git] / tests / wdp.c
blob4f2e2a183ef4da55c3b2711e3fc89746eed0680b
1 int N;
2 #pragma parameter N 8 16
4 int _Source_x(void);
5 void _Source_yt(int *y, int *t);
6 int _Source_z(void);
7 int F1(int);
8 int F2(int);
9 int F3(int);
10 void F4(int, int, int *, int *);
12 void wdp(void)
14 int i;
15 int x[N], y[N + 1], t[N + 1], z[N + 2];
17 #pragma scop
18 for (i = 0; i < N; ++i)
19 x[i] = _Source_x();
21 for (i = 0; i < N + 1; ++i)
22 _Source_yt(&y[i], &t[i]);
24 for (i = 0; i < N+2; ++i)
25 z[i] = _Source_z();
27 for (i = 0; i < N; ++i) {
28 if (z[i] == 0)
29 x[i] = F1(x[i]);
30 if (x[i] * x[i] > 100) {
31 y[i + 1] = F2(y[i]);
32 t[i] = F3(t[i]);
34 F4(y[i + 1], z[i], &y[i + 1], &z[i + 2]);
36 #pragma endscop