def VecT.argmax

bend-tensors@0.0.0.2 · bend_tensors.bend:610

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

610# the index and value of the largest element; the first wins ties
611def VecT.argmax(+n: Nat, v: VecT(n)) -> U32 & F32:
612  match n:
613    case 0n:
614      VecL{x} = v
615      Vec4.argmax(x)
616    case 1n+p:
617      VecN{l, r} = v
618      a b = VecT.argmax(p, l) VecT.argmax(p, r)
619      VecT.argmax.two(U32.from_nat(VecT.size(p)), a, b)

Uses (11)

Used by (0)

No other definition uses this definition.