I know the exact number of threads I will need. The problem is, I am having trouble figuring out how to map that number into Grid and Block dimensions.
The total combinations for a simulation will be: 133,784,560.
Let’s assume anything prefixed with ‘g’ is grid and ‘b’ is block
we basically have this equation: gDimx * gDimy * gDimz * bDimx * bDimy * bDimz = 133,784,560.
all we know about the variables are limitations given by the hardware. ie, gDimz = 1; bDimxbDimybDimz < 512; gDimx || gDimy <= 65535
There are plenty of combinations that will suffice for example:
[indent] gDimx: 611
Now, I’m not very proud of the way I am figuring that out at the moment as I am basically doing a brute force. I’m sure there is a much more elegant algebraic way to solve this getting a range for each of the variables since we have the hardware constraints. But, I am finding my algebra skills are far from good. Can anyone provide some insight?