testsuite/libgomp.graphite/force-parallel-3.c

Go to the documentation of this file.
00001 void abort (void);
00002 
00003 #define N 500
00004 
00005 void foo(void)
00006 {
00007   int i,j;
00008 
00009   int Z[2*N+2][2*N+2], B[2*N+2][2*N+2];
00010 
00011   for (i = 0; i < 2*N+2; i++)
00012     for (j = 0; j < 2*N+2; j++)
00013       B[i][j] = Z[i][j] = i + j;
00014 
00015   for (i = 0; i <= N; i++)
00016     for (j = 0; j <= N; j++)
00017       Z[i][j] = Z[j+N][i+N+1];
00018 
00019   for (i = 0; i <= N; i++)
00020     for (j = 0; j <=N; j++)
00021       if (Z[i][j] != B[j+N][i+N+1])
00022     abort();
00023 }
00024 
00025 int main(void)
00026 {
00027   foo();
00028 
00029   return 0;
00030 }
00031 
00032 /* Check that parallel code generation part make the right answer.  */
00033 /* { dg-final { scan-tree-dump-times "4 loops carried no dependency" 1 "graphite" } } */
00034 /* { dg-final { cleanup-tree-dump "graphite" } } */
00035 /* { dg-final { scan-tree-dump-times "loopfn.0" 5 "optimized" } } */
00036 /* { dg-final { scan-tree-dump-times "loopfn.1" 5 "optimized" } } */
00037 /* { dg-final { cleanup-tree-dump "parloops" } } */
00038 /* { dg-final { cleanup-tree-dump "optimized" } } */

Generated on Fri Apr 5 05:38:10 2013 for Libgomp by  doxygen 1.4.7