I’m trying to write code to act on a 2D sheet with different boundary conditions at each edge. In order to do this, I’d like to access the maximum+minimum size of each block + thread. In the main code I have
Inside this kernel, I can find the minmums, where threadIdx and blockIdx ==0, and the maximum where blockIdx = blockDim, however threadDim is undefined.
I have seen information that claims threadDim does not exist, however earlier presentations such as [url=“CNRGlab @ UWaterloo”]CNRGlab @ UWaterloo - page ten. claim that it does exist.
Has the variable changed names at some point? Does it still exist? Is there an easy way to find the maximum number of threads?
Afaik, there is no threadDim variable, and never has been. blockDim describes the size(s) of a thread block (aka CTA) and gridDim describes the size(s) of the totality of your threads (measured in blocks).
Afaik, there is no threadDim variable, and never has been. blockDim describes the size(s) of a thread block (aka CTA) and gridDim describes the size(s) of the totality of your threads (measured in blocks).
GridDim sounds like exactly what I’m looking for! I have no idea why the lectures I was reading referred to it as threadDim. I’ll try that out now, thanks a lot.
GridDim sounds like exactly what I’m looking for! I have no idea why the lectures I was reading referred to it as threadDim. I’ll try that out now, thanks a lot.