PetScan::extract_condition: convert clang::Expr to pet_expr first
[pet.git] / tests / data_dependent.c
blob7a40e1b16b75142fc80ca465da3292a7f7fa2438
1 void compute_row(int, int *);
2 int f(const int *);
3 int g(int, int);
4 int h(int);
6 int M;
7 #pragma parameter M 10 1000
8 int N;
9 #pragma parameter N 10 1000
11 void foo()
13 int i, j;
14 int in1[N][M];
15 int in2[N];
16 int A[N][10];
17 #pragma value_bounds in2 "-1" "1"
18 int C[N];
19 int m;
21 #pragma scop
22 for (i = 0; i < N; ++i) {
23 m = i+1;
24 for (j = 0; j < M; ++j)
25 m = g(h(m), in1[i][j]);
26 compute_row(h(m), A[i]);
28 A[5][6] = 0;
29 for (i = 0; i < N - 2; ++i)
30 C[i] = f(A[i + 1 + in2[i]]);
31 #pragma endscop