about the value of block_dim

Does this number define the actual number of threads per block? Is 512 the maximum value for current GPUs?

Setting this value differently results in slightly different performance change, is there an optimal value for this?

Does this number define the actual number of threads per block? Is 512 the maximum value for current GPUs?

Setting this value differently results in slightly different performance change, is there an optimal value for this?

Yes block_dim.x (y,z) define the number of threads per block and 512 is the maximum value per block. The optimal value depends on the algorithm you are using, and is hard to predict. Often more is better but sometimes its not. So you have to experiment.

Cheers
Ceearem

Yes block_dim.x (y,z) define the number of threads per block and 512 is the maximum value per block. The optimal value depends on the algorithm you are using, and is hard to predict. Often more is better but sometimes its not. So you have to experiment.

Cheers
Ceearem