__kernel void sample(__global uint* global_A, __global uint* global_B, uint nPoints, uint nQueries) { //for (uint i = 0; i < nPoints; i++) { // printf("%u ", global_A[i]); //} printf("\n\n"); for (uint loopQueryId = 0; loopQueryId < nQueries; loopQueryId++) { global_A[0] = 0; uint maximum_depth = nPoints; for (uint depth = 0; depth <= maximum_depth; depth++) { for (uint i = 0; i < nPoints; i++) { global_B[i] = global_A[i] + 1; printf("%u ", global_B[i]); } printf("\n"); __global uint* temp = global_A; global_A = global_B; global_B = temp; } printf("\n"); } }