I'm developing an OpenCL kernel that takes several OpenGL buffer objects as arguments. I was reading the clSetKernelArg documentation and I have a doubt with the thread-safe definition.
I understand as no thread-safe a function that can not be invoked by more than one thread at the same time. Is that right? But is correct if I have only one thread that is changing the kernel args and queueing the same kernel a lot of times?

My kernel takes two arguments and my program does something like that:
Code :
for (int i = 0; i < 100; i++) {
clSetKernelArg(myKernel, 0, sizeof(float) * bufferSize, openGLBuffers[i]);
clSetKernelArg(myKernel, 1, sizeof(float) * bufferSize, openGLBuffers[i++]);
clEnqueueNDRangeKernel(myCommandQ, myKernel, ....);

Thanks for any help!