def fg_pairs

bend-ml-tensor-gpu@0.1.5.1 · main.bend:727

import bend-ml-tensor-gpu@0.1.5.1/main.bend as BendMlTensorGpu
import Base

727# the number of global pairs that cells i0 .. i0 + n - 1 touch: (i0 mod 2 + n + 1) / 2
728def fg_pairs(+i0: U32, +n: U32) -> U32:
729  U32.shrn(((U32.and(i0, 1) + n : U32) + 1 : U32), 1n)

Uses (4)

Used by (2)