def gather_planned
bendtorch-core@0.1.0.0 · src/autograd/tensor_backward.bend:1562
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/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
1562def gather_planned(+a: Nat, +shape: Shape.Shape, +indexing: Indexing, entries: List<&1, Entry>,
1563 result: Result<&2, &1, Gather.Error, Core.Dynamic>, planned: Result<&2, &2, Gather.Error, Gather.Planned>) ->
1564 Tape & Result<&2, &2, Error, Nat>:
1565 match planned:
1566 case Fail{error}:
1567 (Tape{entries}, Fail{GatherError{error}})
1568 case Done{Gather.Planned{+plan, +output}}:
1569 gather_kept(Gathered{a, shape, plan, indexing_entries(indexing)}, entries, result)