1 Reply Latest reply on Nov 26, 2009 6:02 PM by riza.guntur

    Just notice read and write stream in subkernel, I confuse! Help

    riza.guntur

      I see the subkernel can perform read and write stream in binomial option

      What's the restrictions of this?

      is there anyone could explain?

      For example

      gpu_backwardTraverseFirst(A2.x, puByr4.x, pdByr4.x, A1, A1);
      gpu_backwardTraverseFirst(tempPrice4.x, puByr4.x, pdByr4.x, A2, A2);
      gpu_backwardTraverse8(puByr4.x, pdByr4.x, A1, A2, A1);

      The comment said A1 and A2 in subkernel are used as temporary variables, while at the same time eliminating the original CPU loop inside kernel

      I confuse, how subkernel act now, subkernel I know just get some parameters the return the output, but now it write to the kernel. As there are threads as many as output stream size, didn't one thread will overwrite another thread's stream?

      Help

        • Just notice read and write stream in subkernel, I confuse! Help
          riza.guntur

          just understand that no overwrite there, it create more than one tree, each node on xyzw which is real confusing

          but still, if there is anyone could tell just how broad subkernel could be used

          there is no such novel use in docs, like "a stream can be written inside a parent kernel by subkernel to be read again by parent kernel. As by prior kernel operation, we can conclude it can be writeback to be readback as long as it is within a kernel/subkernel, still with one-to-one mapping"

          Darn...

          edit: in subkernel there is no thread mapping, it just enables us to write in parent stream position

          again, it is hard