Is there any way from a kernel (GPU Code) to find out which device the code is running on? You can find blockIdx, threadIdx, blockDim and gridDim, but any way to find the CUDA device id?
For those who wonder, i plan to use it in a OptiX program to have more control over OptiX buffers.