Skip to content

Commit

Permalink
fix: add not feature functions to prevent udl compiling error
Browse files Browse the repository at this point in the history
  • Loading branch information
FoodChain1028 committed Apr 16, 2024
1 parent 52a94d8 commit 2a25cdf
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions mopro-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,27 @@ pub fn arkworks_pippenger(
instance_size: u32,
num_instance: u32,
utils_dir: &str,
benchmark_dir: &str,
) -> Result<BenchmarkResult, MoproError> {
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<BenchmarkResult, MoproError> {
println!("gpu-benchmarks feature not enabled!");
Ok(BenchmarkResult {
instance_size,
num_instance,
avg_processing_time: 0.0,
})
}

fn add(a: u32, b: u32) -> u32 {
Expand Down

0 comments on commit 2a25cdf

Please sign in to comment.