Reduce.terms: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/reduce.bend as Reduce Lines 216-218 of bendtorch-core@0.1.0.0/src/autograd/reduce.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/reduce.bend&start_line=216&end_line=218 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape # A target cell costs one term per contribution word that lands on it. def terms(+plan: Shape.BroadcastPlan, +length: Nat) -> Nat: Nat.div(Shape.elements(Shape.output_shape(plan)), length) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=BroadcastPlan https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=elements https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=output_shape