Skip to content

Commit

Permalink
change feature flag to parallel (#774)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego K <[email protected]>
  • Loading branch information
PatStiles and diegokingston authored Jan 22, 2024
1 parent c4586a7 commit f271ed8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -77,7 +77,7 @@ harness = false
[[bench]]
name = "criterion_msm"
harness = false
required-features = ["rayon"]
required-features = ["parallel"]

[[bench]]
name = "criterion_fft"
Expand Down
4 changes: 2 additions & 2 deletions math/src/msm/pippenger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit f271ed8

Please sign in to comment.