HOWTO: Program in CUDA
- No. of blocks should be multiple of streaming multiprocessors
-
Block contains no. of threads that is multiple of 32 (warp size)
gridDim.x – No. of blocks in grid blockIdx.x – Index of current block in grid blockDim.x – No. of threads in block threadIdx.x – Index of thread within block