def slice_plan

bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:1475

import bendtorch-core@0.1.0.0/src/autograd/tensor_backward.bend as TensorBackward
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice

1475# The slice each one records: its plan, at the axis and positions the value
1476# takes (Signed.slice, narrow and select), and the value it computes. The
1477# value is checked first, so a narrow whose start lies before -extent, which
1478# only the value refuses, records nothing.
1479def slice_plan(+shape: Shape.Shape, +slicing: Slicing) -> Result<&2, &2, Slice.Error, Slice.Planned>:
1480  slice_axis_plan(shape, Signed.wrap(Shape.rank(shape), slice_dim(slicing)), slicing)

Uses (9)

Used by (1)