def independent_loop_mapping

bendtorch-core@0.1.0.0 · src/tensor/core_PROOF.bend:1088

import bendtorch-core@0.1.0.0/src/tensor/core_PROOF.bend as CorePROOF
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/elementwise.bend as Elementwise
import bendtorch-core@0.1.0.0/src/tensor/core_LAWS.bend as Laws

1088def independent_loop_mapping(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan,
1089  left: Core.Dynamic, right: Core.Dynamic, output: Core.Tensor<Shape.output_shape(plan)>) ->
1090  Laws.IndependentModel<operation, plan, left, right,
1091    Elementwise.loop(Shape.elements(Shape.output_shape(plan)), operation, plan, 0n, Elementwise.State{left, right, output})>:
1092  Laws.IndependentModel{
1093    {\{Elementwise.MappingModel: mapping =>
1094      {\{Laws.IndependentModel: independent => independent} :
1095        Laws.IndependentModel<operation, plan, left, right, Elementwise.loop(Shape.elements(Shape.output_shape(plan)), operation, plan, 0n, Elementwise.State{left, right, output})> ->
1096          Laws.IndependentMapping(operation, plan, left, right, Elementwise.loop(Shape.elements(Shape.output_shape(plan)), operation, plan, 0n, Elementwise.State{left, right, output}))}(independent_pair_mapping(operation, plan, left, right,
1097            Elementwise.loop(Shape.elements(Shape.output_shape(plan)), operation, plan, 0n, Elementwise.State{left, right, output}), mapping))
1098    } : Elementwise.MappingModel<operation, plan, left, right, Elementwise.loop(Shape.elements(Shape.output_shape(plan)), operation, plan, 0n, Elementwise.State{left, right, output})> ->
1099      Laws.IndependentMapping(operation, plan, left, right, Elementwise.loop(Shape.elements(Shape.output_shape(plan)), operation, plan, 0n, Elementwise.State{left, right, output}))}(successful_cached_loop_mapping(operation, plan, left, right, output))}

Uses (13)

Used by (1)