Accessing flat thread address for multi-dimensional blocks

Hello! I was wondering if it is possible to directly access the flat address of a thread, as this shows when debugging in nsight (if I remember correctly). It would be particularly useful in multi-dimensional blocks, for example, I need to do a local reduction on some data in shared memory, where this reduction is only part of some larger computation for which is natural to have multi-dimensional blocks, however it seems wasteful to me to have to recompute the flat address (natural for the reduction) every time, so is there a way to access this just like we can access threadIdx.x?