warp.randu#
- warp.randu(state: uint32) uint32#
Kernel
Python
Generate a uniform random unsigned 32-bit integer in the range [0, 2^32).
In a kernel, advances
statein place, so successive calls return different values; called from the Python scope, it does not modifystate, so repeated calls with the samestatereturn the same value (seerand_init()).
- warp.randu( ) uint32
Kernel
Python
Generate a uniform random unsigned integer in the range [low, high).
In a kernel, advances
statein place, so successive calls return different values; called from the Python scope, it does not modifystate, so repeated calls with the samestatereturn the same value (seerand_init()). Requireshigh > low. Uses modulo reduction, so the distribution is slightly biased toward lower values for very large ranges.