BendtorchLoad.St.plan_of: def of bendtorch-load@1.3.0.0 Import: import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad Lines 457-463 of bendtorch-load@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-load@1.3.0.0/main.bend&start_line=457&end_line=463 import Base # data_offsets must be [begin, end] with end - begin the tensor's bytes def St.plan_of(+name: String, bf16: Bool, +start: W64, +n: U32, +width: U32, of: List<&2, W64>) -> Plan: match of: case Con{+b, Con{e, Nil{}}}: St.plan_span(W64.eq(W64.add(b, W64.mul_small(W64.of(n), width)), e), name, bf16, W64.add(start, b), n) case _: PlanBad{"tensor " ++ name ++ ": data_offsets is not [begin, end]"} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=Plan https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=St.plan_span https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64 https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64.add https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64.eq https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64.mul_small https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=W64.of