def St.then

bendtorch-load@1.3.0.0 · main.bend:495

import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad
import Base

495# reads one planned tensor into cells at .., then goes on with k
496def St.then(+path: String, p: Plan, f: File, a: Array<F32>, +at: U32, k: File -> Array<F32> -> U32 -> IO(Array<F32>)) -> IO(Array<F32>):
497  match p:
498    case PlanBad{msg}: IO.die(Array<F32>, 1, path ++ ": " ++ msg)
499    case PlanOk{+name, bf16, off, +n}:
500      IO.bind(File & (Array<F32> & Result<&1, &1, U32 & String, U32>), Array<F32>, St.read(bf16, f, off, n, a, at), r => St.got(path, name, n, r, k))

Uses (14)

Used by (1)