This commit is contained in:
Araq 2015-08-02 01:42:41 +02:00
commit e9899af9b2

View file

@ -20,8 +20,8 @@ proc countBits32(n: int32): int {.compilerproc.} =
result = ((v +% (v shr 4'i32) and 0xF0F0F0F'i32) *% 0x1010101'i32) shr 24'i32 result = ((v +% (v shr 4'i32) and 0xF0F0F0F'i32) *% 0x1010101'i32) shr 24'i32
proc countBits64(n: int64): int {.compilerproc.} = proc countBits64(n: int64): int {.compilerproc.} =
result = countBits32(toU32(n and 0xffff'i64)) + result = countBits32(toU32(n and 0xffffffff'i64)) +
countBits32(toU32(n shr 16'i64)) countBits32(toU32(n shr 32'i64))
proc cardSet(s: NimSet, len: int): int {.compilerproc.} = proc cardSet(s: NimSet, len: int): int {.compilerproc.} =
result = 0 result = 0