4 Replies Latest reply on May 25, 2010 7:11 PM by roddomi

    Byte addressable data not working

    roddomi

      Hi,

      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.

      Thank you.