Elementwise.cell_by: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise Lines 384-409 of bendtorch-core@0.1.0.0/src/tensor/elementwise.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&start_line=384&end_line=409 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape # A padding cell is the one `cell` computes; an inside cell reads each input # at the slot its `Slot` names. def cell_by(inside: Bool, +left: Slot, +right: Slot, +operation: Operation, -le: List<&2, Nat>, -re: List<&2, Nat>, -oe: List<&2, Nat>, +map: Shape.Index, +position: Nat, la: Array, ra: Array) -> F32 & (Array & Array): match inside left right: case False{} left right: cell(operation, le, re, oe, map, position, la, ra, False{}) case True{} OwnSlot{} OwnSlot{}: direct_cell(operation, position, position, la, ra) case True{} OwnSlot{} FirstSlot{}: direct_cell(operation, position, 0n, la, ra) case True{} OwnSlot{} WalkedSlot{}: direct_cell(operation, position, right_walk(le, re, oe, map, position), la, ra) case True{} FirstSlot{} OwnSlot{}: direct_cell(operation, 0n, position, la, ra) case True{} FirstSlot{} FirstSlot{}: direct_cell(operation, 0n, 0n, la, ra) case True{} FirstSlot{} WalkedSlot{}: direct_cell(operation, 0n, right_walk(le, re, oe, map, position), la, ra) case True{} WalkedSlot{} OwnSlot{}: direct_cell(operation, left_walk(le, re, oe, map, position), position, la, ra) case True{} WalkedSlot{} FirstSlot{}: direct_cell(operation, left_walk(le, re, oe, map, position), 0n, la, ra) case True{} WalkedSlot{} WalkedSlot{}: cell(operation, le, re, oe, map, position, la, ra, True{}) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=F32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Index https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=Operation https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=Slot https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=cell https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=direct_cell https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=left_walk https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise.bend&name=right_walk