6 Replies Latest reply on Dec 27, 2009 9:37 AM by genaganna

    How to "memcpy" on GPU with strings?

    diapolo

      I'm an OpenCL beginner, and I currently try to work with strings in Kernels. I need some kind of memcpy and read, that such a things is n/a in OpenCL, so I wrote a function by myself.

      I know, that I have to use cl_khr_byte_addressable_store in order to use my function, but cl_khr_byte_addressable_store is missing for my HD5870, it´s only available on the CPU device.

      So how could I implement that kind of function on a GPU? Or perhaps are there better ways to do that? Help is really appreciated!

       

      Thanks,

      Dia

      void memcpy(uchar *dest, __constant uchar *source, uint Len) { for(uint i = 0; i < Len; ++i) { dest[i] = source[i]; } }