def copy_planned
bendtorch-core@0.1.0.0 · src/tensor/transforms.bend:244
import bendtorch-core@0.1.0.0/src/tensor/transforms.bend as Transforms
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/layout.bend as Layout
244def copy_planned(+input: Shape.Shape, +axes: List<&2, U32>, source: Core.Tensor<input>,
245 planned: Result<&2, &2, Layout.Error, Layout.Plan<input, axes>>) -> Core.Tensor<input> & Result<&2, &1, Error, Core.Dynamic>:
246 match planned:
247 case Fail{error}:
248 (source, Fail{LayoutError{error}})
249 case Done{+plan}:
250 copy_allocated(input, axes, plan, source, Core.new(Layout.output(input, axes, plan), 0.0))