examples/chunk/example01.c in bones-compiler-1.3.1 vs examples/chunk/example01.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...........chunk/example1.c
+// Filename...........chunk/example01.c
// Author.............Cedric Nugteren
-// Last modified on...16-April-2012
+// Last modified on...10-October-2014
//
#include <stdio.h>
-// This is 'example1', a basic chunk to element example using a 2D tile
+// This is 'example01', a basic chunk to element example using a 2D tile
int main(void) {
int i,j;
int i2,j2;
int result = 0;
@@ -31,11 +31,12 @@
A[i][j] = i+j;
}
}
// Perform the computation
- #pragma species kernel 0:559,0:31|chunk(0:9,0:1) -> 0:55,0:15|element
+ #pragma scop
+ #pragma species kernel A[0:559,0:31]|chunk(0:9,0:1) -> B[0:55,0:15]|element
for(i=0;i<56;i++) {
for(j=0;j<16;j++) {
result = 0;
for (i2=0;i2<10;i2++) {
for (j2=0;j2<2;j2++) {
@@ -44,9 +45,10 @@
}
B[i][j] = result;
}
}
#pragma species endkernel example1
+ #pragma endscop
// Clean-up and exit the function
fflush(stdout);
return 0;
}