cupyx.jit.gridsize¶
- cupyx.jit.gridsize(ndim) = <cupyx.jit._builtin_funcs.GridFunc object>¶
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
andz
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
Note
This function follows the convention of Numba’s numba.cuda.gridsize.