Skip to content

Commit

Permalink
fix: gate parallelize option behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k committed Oct 16, 2024
1 parent 7209327 commit 07fec0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/augurs-js/src/dtw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ pub struct DtwOptions {
#[tsify(optional)]
pub upper_bound: Option<f64>,

#[cfg(feature = "parallel")]
/// Parallelize the DTW distance matrix calculation.
#[tsify(optional)]
pub parallelize: Option<bool>,
}
Expand Down Expand Up @@ -134,6 +136,7 @@ impl Dtw {
if let Some(upper_bound) = opts.upper_bound {
dtw = dtw.with_upper_bound(upper_bound);
}
#[cfg(feature = "parallel")]
if let Some(parallelize) = opts.parallelize {
dtw = dtw.parallelize(parallelize);
}
Expand Down

0 comments on commit 07fec0f

Please sign in to comment.