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

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

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