isZeroMask static method

Uint64 isZeroMask(
  1. Uint64 x
)

All-ones iff x is zero, else zero. Branch-free mask builder for code-level constant-time selects (no ?:/if on the value).

Implementation

static Uint64 isZeroMask(Uint64 x) =>
    Uint64.zero - (Uint64.one - _nonzeroBit(x));