grid dimension and block dimension

Hello forum

I am going through the recent edition of “Programming Massively Parallel Processor” and i have the following confusions about kernel configuration:

dim3 dimBlock(128,1,1);
dim3 dimGrid(32,1,1);

vecAddKernel<<<dimGrid,dimBlock>>>(...);

Does the above statement means that we have 32 blocks in x-dimension and each block has 128 threads so in total we have 128*32 threads ?

Regards
Sajjadul

1 Like

Yes.

yes, It is. Have you figure out how to realise 3 dimensional calculation of CUDA using Kernels? If you do, can you tell me how to do it by giving an example ?