law index_select_planned
import bendtorch-core@0.1.0.0/src/tensor/gather_LAWS.bend as GatherLAWSimport 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/gather.bend as Gather
106law index_select_planned:
107 for +input: Shape.Shape
108 for +dim: Signed.Position
109 for +entries: List<&2, U32>
110 for in_rank: {Nat.is_lt(axis(input, dim), rank(input)) == True{} : Bool}
111 for within: {inside(entries, extent(input, axis(input, dim))) == True{} : Bool}
112 {Gather.select_plan(input, dim, entries) == taken(Gather.Selected{}, Shape.dimensions(input), axis(input, dim), length(entries)) :
113 Result<&2, &2, Gather.Error, Gather.Planned>}
Uses (27)
Used by (0)
No other definition uses this definition.