Skip to content

Commit 44c8e76

Browse files
committed
Updating CRoaring.
1 parent 3ea39e6 commit 44c8e76

File tree

2 files changed

+21
-23
lines changed

2 files changed

+21
-23
lines changed

Sources/CRoaring/include/roaring.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2-
// Created by amalgamation.sh on Mon 5 Jul 2021 13:06:13 EDT
2+
// Created by amalgamation.sh on Sun 25 Jul 2021 12:08:33 EDT
33

44
/*
55
* Copyright 2016-2020 The CRoaring authors
@@ -23,11 +23,11 @@
2323
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
2424
#ifndef ROARING_INCLUDE_ROARING_VERSION
2525
#define ROARING_INCLUDE_ROARING_VERSION
26-
#define ROARING_VERSION = 0.3.2,
26+
#define ROARING_VERSION = 0.3.3,
2727
enum {
2828
ROARING_VERSION_MAJOR = 0,
2929
ROARING_VERSION_MINOR = 3,
30-
ROARING_VERSION_REVISION = 2
30+
ROARING_VERSION_REVISION = 3
3131
};
3232
#endif // ROARING_INCLUDE_ROARING_VERSION
3333
/* end file include/roaring/roaring_version.h */

Sources/CRoaring/roaring.c

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2-
// Created by amalgamation.sh on Mon 5 Jul 2021 13:06:13 EDT
2+
// Created by amalgamation.sh on Sun 25 Jul 2021 12:08:33 EDT
33

44
/*
55
* Copyright 2016-2020 The CRoaring authors
@@ -390,15 +390,15 @@ inline int __builtin_clzll(unsigned long long input_num) {
390390

391391
/* software implementation avoids POPCNT */
392392
/*static inline int __builtin_popcountll(unsigned long long input_num) {
393-
const uint64_t m1 = 0x5555555555555555; //binary: 0101...
394-
const uint64_t m2 = 0x3333333333333333; //binary: 00110011..
395-
const uint64_t m4 = 0x0f0f0f0f0f0f0f0f; //binary: 4 zeros, 4 ones ...
396-
const uint64_t h01 = 0x0101010101010101; //the sum of 256 to the power of 0,1,2,3...
397-
398-
input_num -= (input_num >> 1) & m1;
399-
input_num = (input_num & m2) + ((input_num >> 2) & m2);
400-
input_num = (input_num + (input_num >> 4)) & m4;
401-
return (input_num * h01) >> 56;
393+
const uint64_t m1 = 0x5555555555555555; //binary: 0101...
394+
const uint64_t m2 = 0x3333333333333333; //binary: 00110011..
395+
const uint64_t m4 = 0x0f0f0f0f0f0f0f0f; //binary: 4 zeros, 4 ones ...
396+
const uint64_t h01 = 0x0101010101010101; //the sum of 256 to the power of 0,1,2,3...
397+
398+
input_num -= (input_num >> 1) & m1;
399+
input_num = (input_num & m2) + ((input_num >> 2) & m2);
400+
input_num = (input_num + (input_num >> 4)) & m4;
401+
return (input_num * h01) >> 56;
402402
}*/
403403

404404
/* Use #define so this is effective even under /Ob0 (no inline) */
@@ -2305,7 +2305,7 @@ inline bool bitset_container_contains(const bitset_container_t *bitset,
23052305
* is present in `bitset'. Calls bitset_container_get_all.
23062306
*/
23072307
static inline bool bitset_container_contains_range(const bitset_container_t *bitset,
2308-
uint32_t pos_start, uint32_t pos_end) {
2308+
uint32_t pos_start, uint32_t pos_end) {
23092309
return bitset_container_get_range(bitset, pos_start, pos_end);
23102310
}
23112311

@@ -11279,24 +11279,22 @@ CROARING_UNTARGET_REGION
1127911279
#endif // CROARING_IS_X64
1128011280

1128111281
bool bitset_container_equals(const bitset_container_t *container1, const bitset_container_t *container2) {
11282-
if((container1->cardinality != BITSET_UNKNOWN_CARDINALITY) && (container2->cardinality != BITSET_UNKNOWN_CARDINALITY)) {
11283-
if(container1->cardinality != container2->cardinality) {
11284-
return false;
11285-
}
11282+
if((container1->cardinality != BITSET_UNKNOWN_CARDINALITY) && (container2->cardinality != BITSET_UNKNOWN_CARDINALITY)) {
11283+
if(container1->cardinality != container2->cardinality) {
11284+
return false;
11285+
}
1128611286
if (container1->cardinality == INT32_C(0x10000)) {
11287-
return true;
11287+
return true;
1128811288
}
11289-
}
11289+
}
1129011290
#ifdef CROARING_IS_X64
1129111291
if( croaring_avx2() ) {
1129211292
return _avx2_bitset_container_equals(container1, container2);
1129311293
}
11294-
#else
11294+
#endif
1129511295
return memcmp(container1->words,
1129611296
container2->words,
1129711297
BITSET_CONTAINER_SIZE_IN_WORDS*sizeof(uint64_t)) == 0;
11298-
#endif
11299-
return true;
1130011298
}
1130111299

1130211300
bool bitset_container_is_subset(const bitset_container_t *container1,

0 commit comments

Comments
 (0)