law broadcast_step_mapping

bendtorch-core@0.1.0.0 · src/tensor/core_LAWS.bend:163

import bendtorch-core@0.1.0.0/src/tensor/core_LAWS.bend as CoreLAWS
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
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

163law broadcast_step_mapping:
164  for +operation: Elementwise.Operation
165  for +shape: Shape.Shape
166  for +depth: Nat
167  for +length: Nat
168  for array: Array<F32>
169  for +index: U32
170  for left: Core.Dynamic
171  for right: Core.Dynamic
172  for +left_value: F32
173  for +right_value: F32
174  for balanced: Model.Balanced(F32, depth, array)
175  for valid: {Storage.bounds(depth, length) == True{} : Bool}
176  for exact: {length == Shape.logical_numel(Shape.dimensions(shape)) : Nat}
177  for allowed: {Nat.is_lt(U32.to_nat(index), length) == True{} : Bool}
178  for matched: {Storage.index_matches(depth, length, index) == True{} : Bool}
179  {Elementwise.step_observe(shape, Elementwise.step_right(operation, shape, index, left,
180    Core.TTensor{Storage.Owned{depth, length, array, balanced, valid}, exact}, left_value,
181    (right, Done{right_value})), index) == Some{Elementwise.scalar(operation, left_value, right_value)} : Maybe<&2, F32>}

Uses (24)

Used by (0)

No other definition uses this definition.