Totalview® for HPC User Guide : PART V Using the CUDA Debugger : Chapter 27 CUDA Debugging Tutorial : Displaying CUDA Program Elements : CUDA Built-In Runtime Variables
CUDA Built-In Runtime Variables
TotalView allows access to the CUDA built-in runtime variables, which are handled by TotalView like any other variables, except that you cannot change their values.
The supported CUDA built-in runtime variables are as follows:
struct dim3_16 threadIdx;
struct dim3_16 blockIdx;
struct dim3_16 blockDim;
struct dim3_16 gridDim;
int warpSize;
The types of the built-in variables are defined as follows:
struct dim3_16 { unsigned short x, y, z; };
struct dim2_16 { unsigned short x, y; };
You can dive on the name of a runtime variable in the source pane of the process window, or input its name into the View > Lookup Variable… (v) menu command dialog box. Built-in variables can also be used in the TotalView expression system.