def St.plan_of

bendtorch-load@1.3.0.0 · main.bend:457

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

457# data_offsets must be [begin, end] with end - begin the tensor's bytes
458def St.plan_of(+name: String, bf16: Bool, +start: W64, +n: U32, +width: U32, of: List<&2, W64>) -> Plan:
459  match of:
460    case Con{+b, Con{e, Nil{}}}:
461      St.plan_span(W64.eq(W64.add(b, W64.mul_small(W64.of(n), width)), e), name, bf16, W64.add(start, b), n)
462    case _:
463      PlanBad{"tensor " ++ name ++ ": data_offsets is not [begin, end]"}

Uses (12)

Used by (1)