get_local_id(1) return zero value

Viewed 69

I tried to run the following simple OpenCL program.

# main program
size_t global[2] = {2048, 2048};
size_t local[2] = {4, 4};
clEnqueueNDRangeKernel(queue, kernel, 2, NULL, global, local, 0, NULL, NULL);
...

# kernel.cl
int localRow = get_local_id(0);
int localCol = get_local_id(1);
int globalRow = get_global_id(0);
int globalCol = get_global_id(1);

I checked that the values of globalRow and global Col were changed from 0 to 2047.

For local case, the value of row was changed from 0 to 3, but the value of col was always 0.

Would you let me know what's the possible causes?

0 Answers
Related