def spec_balanced

bendtorch-core@0.1.0.0 · src/tensor/contracts/binary_build_proof.bend:48

import bendtorch-core@0.1.0.0/src/tensor/contracts/binary_build_proof.bend as BinaryBuildProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise

48def spec_balanced(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan, +count: Nat, +ha: List<&2, Api.Effect>, +dl: Nat, +fa: F32, +nl: Nat, +hb: List<&2, Api.Effect>, +dr: Nat, +fb: F32, +nr: Nat, +depth: Nat, +base: Nat) -> Model.Balanced(F32, depth, spec(operation, plan, count, ha, dl, fa, nl, hb, dr, fb, nr, depth, base)):
49  match depth:
50    case 0n:
51      Unit{}
52    case 1n+inner:
53      (spec_balanced(operation, plan, count, ha, dl, fa, nl, hb, dr, fb, nr, inner, base), spec_balanced(operation, plan, count, ha, dl, fa, nl, hb, dr, fb, nr, inner, Nat.add(Model.capacity(inner), base)))

Uses (12)

Used by (0)

No other definition uses this definition.