// // This file is part of the Bones source-to-source compiler examples. This C-code // example is meant to illustrate the use of Bones. For more information on Bones // use the contact information below. // // == More information on Bones // Contact............Cedric Nugteren // Web address........http://parse.ele.tue.nl/bones/ // // == File information // Filename...........chunk/example06.c // Author.............Cedric Nugteren // Last modified on...10-October-2014 // #include // This is 'example06', a chunk/chunk with a step of 2 int main(void) { int i; int N = 256; // Declare input/output arrays int A[N]; int B[N]; // Set the input data for(i=0;i B[2:N-1]|chunk(0:1) for (i = 2; i < N - 1; i = i + 2) { B[i] = A[i]; B[i + 1] = A[i + 1]; } #pragma species endkernel example06_k1 } #pragma endscop // Clean-up and exit the function fflush(stdout); return 0; }