Number of used regs in currently loaded CUfunction during run time?



First in my simulation i have to choice CUfunction to load…

Each function have different used registers so i have to calculate max number of threads…

Is there any functionality to check number of used registers of currently loaded CUfunction during run time in host code?


I’m using only *.x direction for parallelism…

uint idx = blockIdx.x * blockDim.x + threadIdx.x;

How to determine max value of threadIdx.x in current block/grid in device code?

I need to do something like:

//maxThreadX = ???

if(maxThreadX >= cntTriangs){

  // Base store to shared memory


  // Store to shared memory in loop




Regards BasY