examples/fusion/example04.c in bones-compiler-1.3.1 vs examples/fusion/example04.c in bones-compiler-1.6.0

- old
+ new

@@ -8,11 +8,11 @@ // Web address........http://parse.ele.tue.nl/bones/ // // == File information // Filename...........fusion/example04.c // Author.............Cedric Nugteren -// Last modified on...02-Oct-2013 +// Last modified on...11-October-2014 // #include <stdio.h> // This is 'example04', with code similar to PolyBench's "atax" benchmark @@ -34,25 +34,27 @@ A[i][j] = ((float) i*(j+1)) / 4096; } } // Perform the computation (y := A'Ax) - #pragma species kernel 0:4095,0:4095|chunk(0:0,0:4095) ^ 0:4095|full -> 0:4095|element + #pragma scop + #pragma species kernel A[0:4095,0:4095]|chunk(0:0,0:4095) ^ x[0:4095]|full -> tmp[0:4095]|element for (i=0; i<4096; i++) { tmp[i] = 0; for (j=0; j<4096; j++) { tmp[i] = tmp[i] + A[i][j] * x[j]; } } #pragma species endkernel atax-part1 - #pragma species kernel 0:4095,0:4095|chunk(0:4095,0:0) ^ 0:4095|full -> 0:4095|element + #pragma species kernel A[0:4095,0:4095]|chunk(0:4095,0:0) ^ tmp[0:4095]|full -> y[0:4095]|element for (j=0; j<4096; j++) { y[j] = 0; for (i=0; i<4096; i++) { y[j] = y[j] + A[i][j] * tmp[i]; } } #pragma species endkernel atax-part2 + #pragma endscop // Clean-up and exit the function fflush(stdout); y[9] = y[9]; return 0;