From 2a25cdf2384da6e62d003d63858fdb521534db81 Mon Sep 17 00:00:00 2001 From: Jeff Chung Date: Tue, 16 Apr 2024 01:03:26 +0100 Subject: [PATCH] fix: add not feature functions to prevent udl compiling error --- mopro-ffi/src/lib.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/mopro-ffi/src/lib.rs b/mopro-ffi/src/lib.rs index d3d9a2bb..93362434 100644 --- a/mopro-ffi/src/lib.rs +++ b/mopro-ffi/src/lib.rs @@ -246,10 +246,27 @@ pub fn arkworks_pippenger( instance_size: u32, num_instance: u32, utils_dir: &str, - benchmark_dir: &str, ) -> Result { println!("gpu-benchmarks feature not enabled!"); - Ok(()) + Ok(BenchmarkResult { + instance_size, + num_instance, + avg_processing_time: 0.0, + }) +} + +#[cfg(not(feature = "gpu-benchmarks"))] +pub fn trapdoortech_zprize_msm( + instance_size: u32, + num_instance: u32, + utils_dir: &str, +) -> Result { + println!("gpu-benchmarks feature not enabled!"); + Ok(BenchmarkResult { + instance_size, + num_instance, + avg_processing_time: 0.0, + }) } fn add(a: u32, b: u32) -> u32 {