This commit is contained in:
@@ -51,12 +51,12 @@ struct RHeap {
|
||||
struct RHeapNode *buckets;
|
||||
};
|
||||
|
||||
static unsigned int log2(unsigned int x) {
|
||||
static unsigned int uintlog2(unsigned int x) {
|
||||
return 8 * sizeof(unsigned int) - __builtin_clz(x);
|
||||
}
|
||||
|
||||
void rh_init(struct RHeap *rh, unsigned int c) {
|
||||
unsigned int k = 1 + log2(c);
|
||||
unsigned int k = 1 + uintlog2(c);
|
||||
|
||||
rh->min = 0;
|
||||
rh->buckets_size = 1 + k; // extra space for bucket -1
|
||||
|
||||
Reference in New Issue
Block a user