Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small fixups to #600 #601

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Small fixups to #600 #601

merged 3 commits into from
Dec 3, 2024

Conversation

martinholters
Copy link
Member

@martinholters martinholters commented Dec 2, 2024

  • Fix multi-column _small_filt_fir! for ndims(x)>2.
  • Consistently require mutli-column state to match input layout. (A single state as input is still supported.) For a 2D input -- the only shape properly supported prior to Fix multi-column filt for ndims(x)>2 #600 -- this doesn't change anything.

@martinholters martinholters enabled auto-merge (squash) December 2, 2024 12:08
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.90%. Comparing base (1be88b5) to head (e6ffce8).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #601      +/-   ##
==========================================
- Coverage   97.90%   97.90%   -0.01%     
==========================================
  Files          19       19              
  Lines        3249     3246       -3     
==========================================
- Hits         3181     3178       -3     
  Misses         68       68              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wheeheee
Copy link
Member

wheeheee commented Dec 2, 2024

I think the size(si, 2) != ncols check should also be changed.

@martinholters
Copy link
Member Author

Indeed, I think the case of passing in si with per-column-state doesn't work even with these changes as it is unclear whether the state for a, say, $L \times M_1 \times M_2$ input should be $N \times (M_1 \cdot M_2)$ or $N \times M_1 \times M_2$, and it is assumed differently in different places. I'll add tests that cover these and extend the fixup to always use the latter.

@martinholters martinholters changed the title Fix multi-column _small_filt_fir! for ndims(x)>2 Small fixups to #600 Dec 2, 2024
Comment on lines -105 to +102
(size(si, 1) != 2 || (N > 1 && Base.trailingsize(si, 2) != ncols)) &&
(size(si, 1) != 2 || (N > 1 && size(si)[2:end] != size(x)[2:end])) &&
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checks base on trailingsize were more permissive, but the indexing below would then fail if the sizes didn't match, so test up here. (Also, trailingsize was accessing a Base internal.)

likely to lower into better code
@martinholters martinholters enabled auto-merge (squash) December 3, 2024 06:42
@martinholters martinholters merged commit be65e83 into master Dec 3, 2024
11 checks passed
@martinholters martinholters deleted the mh/fixup-600 branch December 3, 2024 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants