def rng_uniform

bend-ml-tensor-gpu@0.1.5.1 · main.bend:616

import bend-ml-tensor-gpu@0.1.5.1/main.bend as BendMlTensorGpu
import Base

616# the uniform of index i of counter s, in (0, 1]: the hash's low 24 bits plus one, over 2^24 (exact)
617def rng_uniform(+s: U32, +i: U32) -> F32:
618  (U32.to_f32((U32.and(rng_hash(s, i), 16777215) + 1 : U32)) / 16777216.0 : F32)

Uses (7)

Used by (2)