gpu.c: remove_local_accesses: pass in relevant schedule instead of computing it
[ppcg.git] / tests / struct.c
blobc67b7bd5619a75ae2a57efbf2cbc2799439e7e91
1 #include <stdlib.h>
3 struct s {
4 int c[10][10];
5 };
7 int main()
9 struct s a[10][10], b[10][10];
11 for (int i = 0; i < 10; ++i)
12 for (int j = 0; j < 10; ++j)
13 for (int k = 0; k < 10; ++k)
14 for (int l = 0; l < 10; ++l)
15 a[i][j].c[k][l] = i + j + k + l;
16 #pragma scop
17 for (int i = 0; i < 10; ++i)
18 for (int j = 0; j < 10; ++j)
19 for (int k = 0; k < 10; ++k)
20 for (int l = 0; l < 10; ++l)
21 b[i][j].c[k][l] = i + j + k + l;
22 #pragma endscop
23 for (int i = 0; i < 10; ++i)
24 for (int j = 0; j < 10; ++j)
25 for (int k = 0; k < 10; ++k)
26 for (int l = 0; l < 10; ++l)
27 if (b[i][j].c[k][l] != a[i][j].c[k][l])
28 return EXIT_FAILURE;
30 return EXIT_SUCCESS;