From 41be4f79755fa867e19cbf46d16b5adbf4035e4e Mon Sep 17 00:00:00 2001 From: Russel Arbore <rarbore2@illinois.edu> Date: Mon, 24 Feb 2025 13:48:01 -0600 Subject: [PATCH] fix bench --- juno_samples/edge_detection/Cargo.toml | 1 + .../edge_detection/benches/edge_detection_bench.rs | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/juno_samples/edge_detection/Cargo.toml b/juno_samples/edge_detection/Cargo.toml index 483724d8..fa4ca1ff 100644 --- a/juno_samples/edge_detection/Cargo.toml +++ b/juno_samples/edge_detection/Cargo.toml @@ -33,3 +33,4 @@ criterion = { version = "0.5", features = ["html_reports"] } [[bench]] name = "edge_detection_bench" harness = false +required-features = ["opencv"] diff --git a/juno_samples/edge_detection/benches/edge_detection_bench.rs b/juno_samples/edge_detection/benches/edge_detection_bench.rs index 806a8865..76035275 100644 --- a/juno_samples/edge_detection/benches/edge_detection_bench.rs +++ b/juno_samples/edge_detection/benches/edge_detection_bench.rs @@ -63,6 +63,10 @@ fn edge_detection_bench(c: &mut Criterion) { let num_frames = 5; let mut r = runner!(edge_detection); + let gaussian_filter_h = gaussian_filter_h.to(); + let structure_h = structure_h.to(); + let sx_h = sx_h.to(); + let sy_h = sy_h.to(); let frames: Vec<_> = (0..num_frames).map(|_| load_frame(&mut video)).collect(); @@ -87,10 +91,10 @@ fn edge_detection_bench(c: &mut Criterion) { sz as u64, sb as u64, input_h.to(), - gaussian_filter_h.to(), - structure_h.to(), - sx_h.to(), - sy_h.to(), + gaussian_filter_h, + structure_h, + sx_h, + sy_h, theta, ) .await -- GitLab