def cell_at_walk
bendtorch-core@0.1.0.0 · src/tensor/elementwise_walk_proof.bend:263
import bendtorch-core@0.1.0.0/src/tensor/elementwise_walk_proof.bend as ElementwiseWalkProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/elementwise.bend as Elementwise
263
264def cell_at_walk(+operation: Elementwise.Operation, +plan: Shape.BroadcastPlan, +position: Nat, -la: Array<F32>, -ra: Array<F32>,
265 inside: Bool) ->
266 {Elementwise.cell_at(Elementwise.walk(Elementwise.Request{operation, plan}), position, (la, ra), inside) ==
267 Elementwise.cell(operation, Shape.extents(Shape.left_shape(plan)), Shape.extents(Shape.right_shape(plan)),
268 Shape.extents(Shape.output_shape(plan)), Shape.index_map(plan), position, la, ra, inside) : F32 & (Array<F32> & Array<F32>)}:
269 +le = Shape.extents(Shape.left_shape(plan))
270 +re = Shape.extents(Shape.right_shape(plan))
271 +oe = Shape.extents(Shape.output_shape(plan))
272 cell_by_same(operation, le, re, oe, Shape.index_map(plan), inside, Elementwise.left_slot(le, re, oe, Shape.index_map(plan)), {==},
273 Elementwise.right_slot(le, re, oe, Shape.index_map(plan)), {==}, position, la, ra)