https://github.com/lemire/croaringunitybuild
Dumps of CRoaring unity builds (for convenience)
https://github.com/lemire/croaringunitybuild
c roaring-bitmaps roaringbitmap
Last synced: 7 months ago
JSON representation
Dumps of CRoaring unity builds (for convenience)
- Host: GitHub
- URL: https://github.com/lemire/croaringunitybuild
- Owner: lemire
- License: other
- Created: 2016-09-13T21:43:15.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-20T20:28:59.000Z (almost 4 years ago)
- Last Synced: 2025-02-01T21:11:08.363Z (over 1 year ago)
- Topics: c, roaring-bitmaps, roaringbitmap
- Language: C
- Size: 479 KB
- Stars: 23
- Watchers: 6
- Forks: 53
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CRoaringUnityBuild
Dumps of CRoaring unity builds (for convenience)
This code is automatically generated from https://github.com/RoaringBitmap/CRoaring
## Building
```bash
echo -e "#include \n int main(){Roaring x;}" > test.cpp && cc -c roaring.c -I. -std=c11 && c++ -o test test.cpp roaring.o -I. -std=c++11
```
You need to compile and link `roaring.c` with your project: this is not a header-only build.
## Usage (C)
```C
#include
#include "roaring.c"
int main() {
roaring_bitmap_t *r1 = roaring_bitmap_create();
for (uint32_t i = 100; i < 1000; i++) roaring_bitmap_add(r1, i);
printf("cardinality = %d\n", (int) roaring_bitmap_get_cardinality(r1));
roaring_bitmap_free(r1);
return 0;
}
```
## Usage (C++)
```C++
#include
#include "roaring.hh"
#include "roaring.c"
int main() {
Roaring r1;
for (uint32_t i = 100; i < 1000; i++) {
r1.add(i);
}
std::cout << "cardinality = " << r1.cardinality() << std::endl;
return 0;
}
```