def indexing_plan
bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:1541
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/gather.bend as Gather
1541def indexing_plan(+shape: Shape.Shape, +indexing: Indexing) -> Result<&2, &2, Gather.Error, Gather.Planned>:
1542 match indexing:
1543 case IndexSelected{+dim, +entries}:
1544 Gather.select_plan(shape, dim, entries)
1545 case GatheredBy{+dim, +index}:
1546 Gather.gather_plan(shape, dim, index)