Skip to content

Commit e161dd3

Browse files
committed
fix: fix bits to bytes calculation from m
1 parent f16abbe commit e161dd3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/segment/filter/blocked_bloom/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl Builder {
4848
let bpk = m / n;
4949
let k = (((bpk as f32) * LN_2) as usize).max(1);
5050

51-
let num_blocks = m.div_ceil(CACHE_LINE_BYTES);
51+
let num_blocks = m.div_ceil(CACHE_LINE_BYTES * 8);
5252

5353
Self {
5454
inner: BitArrayBuilder::with_capacity(num_blocks * CACHE_LINE_BYTES),
@@ -73,7 +73,7 @@ impl Builder {
7373
let m = n * bpk;
7474
let k = (((bpk as f32) * LN_2) as usize).max(1);
7575

76-
let num_blocks = m.div_ceil(CACHE_LINE_BYTES);
76+
let num_blocks = m.div_ceil(CACHE_LINE_BYTES * 8);
7777

7878
Self {
7979
inner: BitArrayBuilder::with_capacity(num_blocks * CACHE_LINE_BYTES),

0 commit comments

Comments
 (0)