diff --git a/math/Cargo.toml b/math/Cargo.toml index 24d041398..17925011f 100644 --- a/math/Cargo.toml +++ b/math/Cargo.toml @@ -36,10 +36,10 @@ proptest = "1.1.0" pprof = { version = "0.13.0", features = ["criterion","flamegraph"] } [features] -default = ["rayon", "std"] +default = ["parallel", "std"] std = ["alloc", "serde?/std", "serde_json?/std"] alloc = [] -rayon = ["dep:rayon"] +parallel = ["dep:rayon"] lambdaworks-serde-binary = ["dep:serde", "alloc"] lambdaworks-serde-string = ["dep:serde", "dep:serde_json", "alloc"] proptest = ["dep:proptest"] @@ -77,7 +77,7 @@ harness = false [[bench]] name = "criterion_msm" harness = false -required-features = ["rayon"] +required-features = ["parallel"] [[bench]] name = "criterion_fft" diff --git a/math/src/msm/pippenger.rs b/math/src/msm/pippenger.rs index 75aa59c79..1ccfce9c3 100644 --- a/math/src/msm/pippenger.rs +++ b/math/src/msm/pippenger.rs @@ -102,7 +102,7 @@ where .unwrap_or_else(G::neutral_element) } -#[cfg(feature = "rayon")] +#[cfg(feature = "parallel")] // It has the following differences with the sequential one: // 1. It uses one vec per thread to store buckets. // 2. It reduces all window results via a different method. @@ -220,7 +220,7 @@ mod tests { // Property-based test that ensures `pippenger::msm_with` gives same result as `pippenger::parallel_msm_with`. #[test] - #[cfg(feature = "rayon")] + #[cfg(feature = "parallel")] fn test_parallel_pippenger_matches_sequential(window_size in 1.._MAX_WSIZE, cs in unsigned_integer_vec(), points in points_vec()) { let min_len = cs.len().min(points.len()); let cs = cs[..min_len].to_vec();