def plan_selected

bendtorch-core@0.1.0.0 · src/tensor/layout.bend:121

import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

121def plan_selected(+input: Shape.Shape, +axes: List<&2, U32>, valid: {True{} == bijective(input, axes) : Bool},
122  selected: Maybe<&2, List<&2, U32>>,
123  same: {selected == reorder(Shape.dimensions(input), axes) : Maybe<&2, List<&2, U32>>}) -> Result<&2, &2, Error, Plan<input, axes>>:
124  match selected:
125    case None{}:
126      Fail{MappingError{}}
127    case Some{+dimensions}:
128      plan_built(input, axes, dimensions, valid, same, Shape.construct(dimensions))

Uses (13)

Used by (2)