2 Replies Latest reply on May 21, 2009 11:32 AM by hennequi

    Can we read a output stream buffer?

      output buffer

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


        • Can we read a output stream buffer?

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

            • Can we read a output stream buffer?

              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?