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

- old
+ new

@@ -6,18 +6,18 @@ // == More information on Bones // Contact............Cedric Nugteren <c.nugteren@tue.nl> // Web address........http://parse.ele.tue.nl/bones/ // // == File information -// Filename...........element/example4.c +// Filename...........element/example04.c // Author.............Cedric Nugteren -// Last modified on...16-April-2012 +// Last modified on...10-October-2014 // #include <stdio.h> -// This is 'example4', demonstrating two input arrays and an inner-loop as the computational body +// This is 'example04', demonstrating two input arrays and an inner-loop as the computational body int main(void) { int i,l; float factor = 0; // Declare input/output arrays @@ -30,18 +30,20 @@ A[i] = i*2.3; B[i] = i+6.0; } // Perform the computation - #pragma species kernel 0:699|element ^ 0:699|element -> 0:699|element + #pragma scop + #pragma species kernel A[0:699]|element ^ B[0:699]|element -> C[0:699]|element for(i=0;i<700;i++) { factor = 0.5; for (l=0;l<3;l++) { factor = factor + 0.2*factor; } C[i] = factor*A[i] + factor*B[i]; } #pragma species endkernel example4 + #pragma endscop // Clean-up and exit the function fflush(stdout); return 0; }