def Flat.rowmax.go

bend-tensors@0.0.0.2 · bend_tensors.bend:1924

import bend-tensors@0.0.0.2/bend_tensors.bend as BendTensors
import Base

1924# the largest cell of a row segment
1925def Flat.rowmax.go(n: Nat, +i: U32, r: Array<F32> & F32, +best: F32) -> Array<F32> & F32:
1926  match n:
1927    case 0n:
1928      (a, x) = r
1929      (a, F32.max(best, x))
1930    case 1n+p:
1931      (a, x) = r
1932      Flat.rowmax.go(p, (i + 1 : U32), Array.get(F32, a, (i + 1 : U32)), F32.max(best, x))

Uses (9)

Used by (1)