BendtorchFast.Mat.dup: def of bendtorch-fast@1.3.0.0 Import: import bendtorch-fast@1.3.0.0/main.bend as BendtorchFast Lines 228-232 of bendtorch-fast@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-fast@1.3.0.0/main.bend&start_line=228&end_line=232 import Base import bend-ml-tensor-array@0.1.18.0/main.bend as TA import bend-ml-tensor-fork@0.1.5.0/main.bend as TF import bendtorch@1.3.0.0/main.bend as T # two copies of a matrix (T.Mat.dup) def Mat.dup(+r: Nat, +c: Nat, m: TA.Mat) -> T.Two, TA.Mat>: match m: case TA.Mat{a}: dup_fin(r, c, TF.par2(~Unit, ~F32, ~F32, ~copy_leaf, Unit{}, ew_depth(Nat.mul(r, c)), Nat.mul(r, c), a, T.zeros_a(Nat.mul(r, c)))) Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-array@0.1.19.0/main.bend&name=Mat https://jend.leeeet.dev/definition.txt?path=bend-ml-tensor-fork@0.1.6.0/main.bend&name=par2 https://jend.leeeet.dev/definition.txt?path=bendtorch-fast@1.3.0.0/main.bend&name=copy_leaf https://jend.leeeet.dev/definition.txt?path=bendtorch-fast@1.3.0.0/main.bend&name=dup_fin https://jend.leeeet.dev/definition.txt?path=bendtorch-fast@1.3.0.0/main.bend&name=ew_depth https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Two https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=zeros_a