Skip to content

Commit

Permalink
Adapt to CPU cache stats now being faillible
Browse files Browse the repository at this point in the history
  • Loading branch information
HadrienG2 committed Jan 4, 2024
1 parent b30a2b2 commit a0f211e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn criterion_benchmark(c: &mut Criterion) {
let min_l1d_bytes = Topology::new()
.unwrap()
.cpu_cache_stats()
.unwrap()
.smallest_data_cache_sizes()[0];
let min_l1d_floats = min_l1d_bytes as usize / std::mem::size_of::<f32>();
let min_l1d_floats_pow2 = usize::BITS - min_l1d_floats.leading_zeros();
Expand Down

0 comments on commit a0f211e

Please sign in to comment.