my understanding of the “built-in variables” is, that they are equal to intermediate values that will be evaluated prior to execution for each grid/block/thread.
Now I would like to know if even complex address calculations like below will be compiled into one single constant value:
float val = sharedMem[ (threadIdx.x>>1)*40+(threadIdx.y>>2)*20+(threadIdx.y & 3) ];
Would the machine code look something like this ?
mov reg0, memPtr, constValue
Thanks for your help,