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

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