cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

anlongstar
Journeyman III

Can we read a output stream buffer?

output buffer

Because some times I have to use the data in the output stream buffer.

Thanks!

0 Likes
2 Replies
gaurav_garg
Adept I

No, you can't. You have to use another input stream for that data.

0 Likes

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

 

0 Likes