def Mat.restore
import bendtorch@1.3.0.0/main.bend as Bendtorchimport Base
import bend-ml-tensor-array@0.1.18.0/main.bend as TA
563def Mat.restore(+r: Nat, +c: Nat, m: TA.Mat<r, c>, xs: Array<F32>, +off: U32) -> PA<TA.Mat<r, c>>:
564 match m:
565 case TA.Mat{dst}:
566 mat_restore_fin(r, c, (off + U32.from_nat(Nat.mul(r, c)) : U32), load_cells(Nat.mul(r, c), 0, off, Array.get(F32, xs, off), dst))