Where is threadIdx stored? NVIDIA Technology Question

Hello,

I have a discussion with my study colleges about the predefined structure

threadIdx

In which memory is it stored per thread? Register, local, global, constant, …?
How many cycles cost the access to this variable?

Thanks for your answers!

Greetings Manolo

At the PTX level, the thread ID is treated as a special register %tid (.x,.y,.z). The PTX generated by nvcc moves this value to a normal register at the beginning of the kernel.

Thanks for your advice.