_popcnt

Calculates the number of set bits in an integer using the X86 SSE4 POPCNT instruction. POPCNT is not available on all X86 CPUs.

  1. ushort _popcnt(ushort x)
    version(AnyX86) pure
    ushort
    _popcnt
    (
    ushort x
    )
  2. int _popcnt(uint x)
  3. int _popcnt(ulong x)
Suggestion Box / Bug Report