I would like to know the Maximum possible number of threads including the maximum number of blocks, for example i have the following results from my device query:

Maximum number of threads per block: 512

Maximum sizes of each dimension of a block: 512 x 512 x 64

Maximum sizes of each dimension of a grid: 65535 x 65535 x 1

then, what is the maximum number of threads that i can achieve without concerning the number of blocks and whatever? i mean please give me a configuration of number of threads and blocks and grids that achieve the total maximum number of threads.

Thanks.