https://github.com/yuvalif/bmapc
bit counter for bitmaps
https://github.com/yuvalif/bmapc
bitcount bitmap
Last synced: about 1 year ago
JSON representation
bit counter for bitmaps
- Host: GitHub
- URL: https://github.com/yuvalif/bmapc
- Owner: yuvalif
- License: mit
- Created: 2018-01-08T09:07:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T09:14:16.000Z (over 8 years ago)
- Last Synced: 2025-04-11T22:53:08.947Z (about 1 year ago)
- Topics: bitcount, bitmap
- Language: C++
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bmapc
Bitmap Count provide a function that calculates the number of 1-bits in a bitmap. Function is optimized for the case where the array size is divisable by size of int, then it uses the compiler builtin function: `__builtin_popcount` (available in gcc and clang).
If a different compiler need to be used, this project: https://github.com/Noctune/bitcount provide a more general implementation of the popcount function.
Use the folowing command to build the test: `g++ -Wall -o test_bitcount test_bitcount.cpp bitcount.cpp`