examples/neighbourhood/example04.c in bones-compiler-1.3.1 vs examples/neighbourhood/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...........neighbourhood/example4.c +// Filename...........neighbourhood/example04.c // Author.............Cedric Nugteren -// Last modified on...16-April-2012 +// Last modified on...10-October-2014 // #include <stdio.h> -// This is 'example4', demonstrating naming (optional) in the classification to distingish the two input arrays +// This is 'example04', demonstrating naming (optional) in the classification to distingish the two input arrays int main(void) { int i; float factor; int size = 512; @@ -31,10 +31,11 @@ A[i] = i*2.3; B[i] = i+6.0; } // Perform the computation + #pragma scop #pragma species kernel B[0:size-1]|neighbourhood(-1:1) ^ A[0:size-1]|element -> C[0:size-1]|element for(i=0;i<size;i++) { factor = A[i]/100.0; if ((i >= 1) && (i < size-1)) { C[i] = factor*(B[i-1]+B[i]+B[i+1]); @@ -42,9 +43,10 @@ else { C[i] = B[i]; } } #pragma species endkernel example4 + #pragma endscop // Clean-up and exit the function fflush(stdout); return 0; }