dim3 ? What is the data type 'dim3' ?


This is regarding the SDK code for matrix multiplication…

In the host multiplication function, the block and grid dimensions are declared using the following code:


dim3 dimGrid(wB/dimBlock.x, hA/dimBlock.y);

Muld<<<dimGrid,dimBlock>>> (Ad,Bd,wA,wB,Cd);

What is the data type dim3 and also, what do the functions dimBlock() and dimGrid() do?

Are these functions part of the library and where are these declared?


dim3 is just a structure designed for storing block and grid dimensions. dimBlock() and dimGrid() are setting the initial values using constructors.

See the programming guide, section