def sm_loop_f
import bendtorch-gpu@1.3.0.0/main.bend as BendtorchGpuimport Base
import bendtorch@1.3.0.0/main.bend as T
995# softmax over all t of row i, at the dense row start
996def sm_loop_f(k: Nat, +r: U32, +l: U32, +t32: U32, +tr: U32, p: Array<F32>) -> Array<F32>:
997 match k:
998 case 0n: p
999 case 1n+q: sm_loop_f(q, (r + l : U32), l, t32, tr, T.pc_a(T.psmc(U32.to_nat(t32), toff_f(U32.div(r, t32), U32.mod(r, t32), t32, tr), p)))