def cea_max

bend-ml-tensor-array@0.1.19.0 · main.bend:411

import bend-ml-tensor-array@0.1.19.0/main.bend as BendMlTensorArray
import Base

411# the max of k + 1 cells from idx, from m (the first cell's value, already read in r)
412def cea_max(k: Nat, +idx: U32, +m: F32, r: Array<F32> & F32) -> AF:
413  match k r:
414    case 0n Tuple{c, +x}:
415      AF{c, F32.max(m, x)}
416    case 1n+p Tuple{c, +x}:
417      cea_max(p, (idx + 1 : U32), F32.max(m, x), Array.get(F32, c, (idx + 1 : U32)))

Uses (10)

Used by (2)