The kernel below executes correctly when d_odata and d_idata point to int. However, if I change them to point to char the data doesn't get copied over. I can see that only 1 every 4 bytes is being copied but the rest is left untouched. It seems as if byte addressing was not working.
#pragma OPENCL EXTENSION cl_khr_byte_addressable_store : enable
__kernel void testKernel(__global uchar *d_odata, __global uchar *d_idata, int numElements)
int tid = get_global_id(0);
int numThreads = get_global_size(0);
for (int pos = tid ; pos < numElements ; pos += numThreads)
d_odata[pos] = d_idata[pos];
I am using ATI Stream SDK 2.1.
Which GPU are you using? What is the behavior with CPU?
I am using an ATI Radeon HD 5870 (Catalyst 10.2). When I create the context on the CPU (CL_DEVICE_TYPE_CPU) it works fine.
Could you upgrade the driver to Catalyst 10.4 and see if it makes any difference?
Yes. It works now. Thank you.