diff --git a/gemm-common/src/gemm.rs b/gemm-common/src/gemm.rs index 3ec6f16..66c32be 100644 --- a/gemm-common/src/gemm.rs +++ b/gemm-common/src/gemm.rs @@ -354,10 +354,17 @@ pub unsafe fn gemm_basic_generic< max_threads }; let total_work = m * n_chunk * k_chunk; - let n_threads = if total_work > threading_threshold{ - std::cmp::max(1, std::cmp::min(max_threads, (total_work - threading_threshold + 1) / threading_threshold)) - }else{1} - ; + let n_threads = if total_work > threading_threshold { + std::cmp::max( + 1, + std::cmp::min( + max_threads, + (total_work - threading_threshold + 1) / threading_threshold, + ), + ) + } else { + 1 + }; n_threads } }; diff --git a/gemm/benches/bench.rs b/gemm/benches/bench.rs index 95d0112..415cf26 100644 --- a/gemm/benches/bench.rs +++ b/gemm/benches/bench.rs @@ -357,9 +357,7 @@ pub fn criterion_benchmark_parallelism(c: &mut Criterion) { } } } - } - } criterion_group!(