def strided_arr

bendtorch-core@0.1.0.0 · src/autograd/reduce_replayed_proof.bend:638

import bendtorch-core@0.1.0.0/src/autograd/reduce_replayed_proof.bend as ReduceReplayedProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import bendtorch-core@0.1.0.0/src/autograd/reduce.bend as Reduce

638def strided_arr(+stride: Nat, +left: Nat, +right: Nat, +rest: List<&2, Shape.Row>, +extent: Nat, +others: List<&2, Nat>,
639  +single: {Reduce.single_rows(rest, others) == True{} : Bool}, +fuel: Nat, +target: Nat, +base: Nat, +digit: Nat, +accumulator: F32,
640  +h: List<&2, Api.Effect>, +d: Nat, +f: F32) ->
641  {Reduce.strided(fuel, right, base, digit, Reduce.single_offset(rest, others, Nat.mod(target, left), 0n), accumulator, Api.arr(h, d, f)) ==
642    Reduce.fiber(Shape.Row{stride, left, right} <> rest, extent <> others, fuel, target, base, digit, accumulator, Api.arr(h, d, f)) : F32 & Array<F32>}:
643  match fuel:
644    case 0n:
645      {==}
646    case 1n+remaining:
647      run_arr(stride, left, right, rest, extent, others, single, remaining, target, base, digit, accumulator, h, d, f)

Uses (15)

Used by (1)