def bitw.popcount

bend-osdev-algo@0.1.0.0 · algo.bend:44

import bend-osdev-algo@0.1.0.0/algo.bend as Algo
import Base

44def bitw.popcount(n: Nat, w: Word(n)) -> Nat:
45  match n:
46    case 0n:
47      0n
48    case 1n+p:
49      match w:
50        case WCon{b, t}:
51          bitw.popcount.step(b, bitw.popcount(p, t))

Uses (4)

Used by (4)