TensorBackward.sliced: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward Lines 1503-1512 of bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&start_line=1503&end_line=1512 import Base import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed # Records a slice of a copy of a's value (Signed.slice, narrow or select) as # a Slice node with a's shape, the slice's shape with the axis kept and its # plan. The value is checked first, so a refusal is the value's: an axis # outside -rank..rank-1 is AxisOutOfBounds (13), a step of 0 StepNotPositive # (19), a narrow past the extent or with a start before -extent, or a select # index outside -extent..extent-1, OutOfRange (20), an unknown id # UnknownNode; the tape comes back unchanged. def sliced(tape: Tape, +a: Nat, +slicing: Slicing) -> Tape & Result<&2, &2, Error, Nat>: Tape{entries} = tape slice_found(a, slicing, value_counted(a, counted(entries))) Uses (9): 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=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Slicing https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=Tape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=counted https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=slice_found https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend&name=value_counted