def out_balanced

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

import bendtorch-core@0.1.0.0/src/tensor/contracts/binary_proofs.bend as BinaryProofs
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/LAWS.bend as StorageLaws
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise

48def out_balanced(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan, +left: Shape.Shape, +left_fill: F32, +left_ops: List<&2, StorageLaws.Op>, +right: Shape.Shape, +right_fill: F32, +right_ops: List<&2, StorageLaws.Op>, +count: Nat, +depth: Nat, +base: Nat) -> Model.Balanced(F32, depth, out_spec(operation, plan, left, left_fill, left_ops, right, right_fill, right_ops, count, depth, base)):
49  match depth:
50    case 0n:
51      Unit{}
52    case 1n+inner:
53      (out_balanced(operation, plan, left, left_fill, left_ops, right, right_fill, right_ops, count, inner, base), out_balanced(operation, plan, left, left_fill, left_ops, right, right_fill, right_ops, count, inner, Nat.add(Model.capacity(inner), base)))

Uses (13)

Used by (2)