I was asking myself the same question
I am in the situation where I have data in GPU memory, stream x, and I want to update that x so that I get in the end, say,
x <- x+2
I tried passing x both as an input stream and an output stream:
void kernel updatex ((typeofx) x<>, out (typeofx) x<>){
x = x + 2
}
at runtime, I get a warning saying the the output stream is the same as the input stream and that this may produce unpredictible results...
I see only one solution then, to avoid inefficient reads and writes: "double buffering". Is that what everybody does in that case?
cheers
Guillaume