cupyx.jit.gridsize#

cupyx.jit.gridsize(ndim) = <cupyx.jit function>#

Compute the grid size.

Computation of the first integer is as follows:

jit.blockDim.x * jit.gridDim.x

and for the other two integers the y and z attributes are used.

Parameters:

ndim (int) – The dimension of the grid. Only 1, 2, or 3 is allowed.

Returns:

If ndim is 1, an integer is returned, otherwise a tuple.

Return type:

int or tuple

Note

This function follows the convention of Numba’s numba.cuda.gridsize().