IC: progress (#25339)

This commit is contained in:
Andreas Rumpf
2025-12-07 13:07:44 +01:00
committed by GitHub
parent 099ee1ce4a
commit fa4d79f519
9 changed files with 150 additions and 62 deletions

View File

@@ -85,9 +85,3 @@ func countSetBitsImpl*(x: SomeInteger): int {.inline.} =
else:
when sizeof(x) <= 4: result = countBitsImpl(x.uint32)
else: result = countBitsImpl(x.uint64)
proc countBits32*(n: uint32): int {.compilerproc, inline.} =
result = countSetBitsImpl(n)
proc countBits64*(n: uint64): int {.compilerproc, inline.} =
result = countSetBitsImpl(n)

View File

@@ -10,6 +10,13 @@
# set handling
# IC: compilerprocs now must be defined in system.nim or threadpool.nim!
proc countBits32*(n: uint32): int {.compilerproc, inline.} =
result = countSetBitsImpl(n)
proc countBits64*(n: uint64): int {.compilerproc, inline.} =
result = countSetBitsImpl(n)
proc cardSetImpl(s: ptr UncheckedArray[uint8], len: int): int {.inline.} =
var i = 0
result = 0