Skip to content

Commit

Permalink
fix benches
Browse files Browse the repository at this point in the history
  • Loading branch information
jordens committed Sep 15, 2023
1 parent 55051df commit c4618b6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions benches/micro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use core::f32::consts::PI;

use easybench::bench_env;

use idsp::{atan2, cossin, iir, iir_int, Lowpass, PLL, RPLL};
use idsp::{atan2, cossin, iir, iir_int, Filter, Lowpass, PLL, RPLL};

fn atan2_bench() {
let xi = (10 << 16) as i32;
Expand Down Expand Up @@ -44,11 +44,11 @@ fn pll_bench() {
let mut dut = PLL::default();
println!(
"PLL::update(Some(t), 12, 12): {}",
bench_env(Some(0x241), |x| dut.update(*x, 12, 12))
bench_env(Some(0x241), |x| dut.update(*x, 12))
);
println!(
"PLL::update(Some(t), sf, sp): {}",
bench_env((Some(0x241), 21, 20), |(x, p, q)| dut.update(*x, *p, *q))
bench_env((Some(0x241), 21), |(x, p)| dut.update(*x, *p))
);
}

Expand Down Expand Up @@ -80,14 +80,14 @@ fn iir_f64_bench() {
}

fn lowpass_bench() {
let mut dut = Lowpass::<4>::default();
let mut dut = Lowpass::<1>::default();
println!(
"Lowpass::<4>::update(x, k): {}",
bench_env((0x32421, 14), |(x, k)| dut.update(*x, *k))
"Lowpass::<1>::update(x, k): {}",
bench_env((0x32421, 14), |(x, k)| dut.update(*x, &[*k]))
);
println!(
"Lowpass::<4>::update(x, 14): {}",
bench_env(0x32421, |x| dut.update(*x, 14))
"Lowpass::<1>::update(x, 14): {}",
bench_env(0x32421, |x| dut.update(*x, &[14]))
);
}

Expand Down

0 comments on commit c4618b6

Please sign in to comment.