Hi,

I'm reading an already existing OpenCL code and it's the first time I see the following.
The code as different layers of complexity so it's difficult for me to really understand what's going on.
But basically, I have the feeling that the author is passing a buffer as argument to a kernel 2 times : one time as read only and the other time as write only...
It C++, the code would be something like that:

Code :
// Function
void f(cont int * input, int * output){
...
}
 
// Calling the function
int * buffer;
...
f(buffer, buffer);

I thought that the compiler would complain and generate an error.
But my concern is more about the performance...
Have you already seen something like that? What do you think?

Thanks,

Vincent