def step_right

bendtorch-core@0.1.0.0 · src/tensor/elementwise.bend:149

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

149def step_right(+operation: Operation, -shape: Shape.Shape, +index: U32, left: Core.Dynamic,
150  output: Core.Tensor<shape>, left_value: F32, pair: Core.Dynamic & Result<&2, &2, Core.Error, F32>) -> Step<shape>:
151  (right, result) = pair
152  match result:
153    case Fail{error}:
154      Stop{left, right, error}
155    case Done{right_value}:
156      step_write(shape, left, right, Core.write_flat(shape, output, index, scalar(operation, left_value, right_value)))

Uses (14)

Used by (6)