String manipulation in OpenCL Support for string manipulation in OpenCL


I am trying to perform string manipulation in opencl kernel. Looks like its not supported. I got an error like ptxas application error.
Has anyone encountered a similar problem and got it fixed? I want to use functions such as strcpy and strcat.

so I wrote a simple function for string copy. I am not getting what is the problem here. Below is the code
void stringcpy(char* d, char* s)
int i;
for(i = 0; s[i] != ‘\0’; i++)
d[i] = s[i];
d[i] = ‘\0’;

__kernel void HelloWorld(__global const char* src, __global char* dest)

/*dest[0] = 'H';
dest[1] = 'e';
dest[2] = 'l';
dest[3] = 'l';
dest[4] = 'o';
dest[5] = 'W';
dest[6] = 'o';
dest[7] = 'r';
dest[8] = 'l';
dest[9] = 'd';*/


I also tried writing the string on GPU itself which can be seen in those commented lines. That works fine. But for that same thing, if I try doing with the above stringcpy function, then I see the clEnqueueTask()doesn’t return CL_SUCCESS.

Any help is appreciated.