Skip to content

Commit

Permalink
windowing: skip windows that do not fit
Browse files Browse the repository at this point in the history
  • Loading branch information
ekiwi committed Apr 16, 2024
1 parent cafdeec commit b6a8460
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions synth/src/windowing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,16 @@ where
for offset in 0..window_size {
// derive past and future k
let past_k = window_size - 1 - offset;
if past_k >= self.conf.fail_at {
// window does not fit on the left
continue;
}
// println!("window_size={window_size}, past_k={past_k}, offset={offset}");
let future_k = window_size - 1 - past_k;
if self.conf.fail_at + future_k > self.rctx.tb.step_count() {
// window does not fit on the right
continue;
}
assert_eq!(past_k + future_k + 1, window_size);
let c = WindowConf {
past_k,
Expand Down

0 comments on commit b6a8460

Please sign in to comment.