I'm trying to use Kepler's Dynamic Parallelism for one of my application. The global index of the thread (in the parent kernel) launching the child kernel is needed in the child kernel. In other words, I want to access the parent's built-in coordinate variables in the child kernel.
Is there a canonical way to do that? Or should I just calculate global index of the parent thread (using built-in variables such as threadIdx.x, etc) and pass it in through one argument of the child kernel?