Hard to say what the error might be without access to the actual kernel, but I can at least help you with the error value. All errors are listed in cl.h, which should be supplied with the OpenCL installation. Here you can find
#define CL_OUT_OF_RESOURCES -5
A way to translate for error codes to human-readable strings can be found at
Yes I’m sure, because before this i++, ‘i’ was incremented, so if it wasn’t negative, its ready to receive the ‘\0’. But the change that I did, do exactly the same that the previous code, but works… It’s OK for now:P
I know that is not equivalent, but for this case they are, because I don’t use ‘i’ anymore.
But take a look, if you copy paste wiki code and run it on CPU code or even in GPU code, but without passing get_global_id() size_t as parameter, it works well… The error its very very weird, as I said, I’ve tried to overflow the number manually and the itoa always worked, but when I started to call itoa(get_local_id(0)) it simply crashes… returning a OUT_OF_RESOURCES, what I thought that was a infinite loop somewhere… or an invalid access to an array position… don’t know, the run time error check does not help very much too:P
I tried everything, convert_to_int() and traditional casts…but nothing worked…